Describe the bug
Javascript files include non-translated user-facing strings.
Here are all the instances I found (by using git ls-files '*.js' ':!*.min.js' to find all non-minified js files then auditing them manually):
|
button.textContent = "Submitting..."; |
|
alert("Please select at least one item."); |
|
$batchTitleCount.append(`${selectedIDs.length} submissions selected`); |
|
let errorMessage = "This field is required."; |
|
nextReportDueSlot.innerHTML = `${ |
|
weeks > 0 ? `${weeks} week${pluraliseWeeks}` : "" |
|
} ${days} day${pluraliseDays}`; |
|
} |
|
function pluraliseTimePeriod(number) { |
|
if (!frequencyPeriodSlot || !frequencyPeriodSelect) { |
|
return; |
|
} |
|
frequencyPeriodSlot.innerHTML = `${frequencyPeriodSelect.value || ""}${ |
|
Number(number) === 1 ? "" : "s" |
|
}`; |
|
} |
|
"\n\nLimit this field to " + |
|
input_item = input_item + " (selected)"; |
|
.text("Copy questions to clipboard") |
|
"Copies all the questions and user input to the clipboard in plain text." |
|
if (element.textContent.includes("characters")) { |
|
element.dataset.afterWordCount = ` out of ${limit}`; |
|
element.dataset.afterWordCount += " (Close to the limit)"; |
|
element.dataset.afterWordCount += " (Over the limit)"; |
Expected behavior
User-facing strings should be translated, either by using Django's javascript translation infrastructure, or by storing strings on HTML elements as data attributes for example, and using standard {% translate %} tags in Django templates to translate them.
Priority
- Low priority (annoying, would be nice to not see)
Affected roles
This affects all users really, but mostly applicants.
Describe the bug
Javascript files include non-translated user-facing strings.
Here are all the instances I found (by using
git ls-files '*.js' ':!*.min.js'to find all non-minified js files then auditing them manually):hypha/hypha/static_src/javascript/application-form.js
Line 58 in df928ec
hypha/hypha/static_src/javascript/batch-actions.js
Line 67 in df928ec
hypha/hypha/static_src/javascript/batch-actions.js
Line 87 in df928ec
hypha/hypha/static_src/javascript/file-uploads.js
Line 42 in df928ec
hypha/hypha/static_src/javascript/report-calculator.js
Lines 124 to 127 in df928ec
hypha/hypha/static_src/javascript/report-calculator.js
Lines 154 to 161 in df928ec
hypha/hypha/static_src/javascript/submission-form-copy.js
Line 46 in df928ec
hypha/hypha/static_src/javascript/submission-form-copy.js
Line 58 in df928ec
hypha/hypha/static_src/javascript/submission-form-copy.js
Line 87 in df928ec
hypha/hypha/static_src/javascript/submission-form-copy.js
Line 91 in df928ec
hypha/hypha/static_src/javascript/tinymce-word-count.js
Line 26 in df928ec
hypha/hypha/static_src/javascript/tinymce-word-count.js
Line 31 in df928ec
hypha/hypha/static_src/javascript/tinymce-word-count.js
Line 36 in df928ec
hypha/hypha/static_src/javascript/tinymce-word-count.js
Line 40 in df928ec
Expected behavior
User-facing strings should be translated, either by using Django's javascript translation infrastructure, or by storing strings on HTML elements as data attributes for example, and using standard
{% translate %}tags in Django templates to translate them.Priority
Affected roles
This affects all users really, but mostly applicants.