carpentries / sandpaper

User Interface for The Carpentries Workbench
https://carpentries.github.io/sandpaper
Other
41 stars 26 forks source link

Missing translation strings #579

Closed Bisaloo closed 2 months ago

Bisaloo commented 3 months ago

While working on #578, I noticed some missing strings in translation. I'm not entirely sure where these strings are located in the codebase so I'm not sure how to add them.

(This message initially listed more strings but I realized they are hardcoded in the lesson source code so this is not related to the workbench.)

"the authors" in page footer

image

ErinBecker commented 3 months ago

Thanks for reporting this @Bisaloo! The variable that is being referenced by the footer construction code here is {MaterialsTranslatedUnder} (defined by Line 130 of utils-translate.R)

MaterialsLicensedUnder = tr_('Materials licensed under {license} by {authors}'),

which is itself referencing the variable {authors} defined on line 399

authors = "the authors",

because "the authors" is hardcoded in English in the original variable definition, it is appearing in English in the final footer. The immediate fix to this would be to remove the {authors} variable altogether and include "the authors" as text in the {MaterialsLicensedUnder} variable. This would make it possible for lesson translators to specify the translation for those words in their .po file.

In the longer run, it might be worthwhile to reinstate the {authors} variable and have it link to the contributor list, but for now the simple fix will be as stated above. This will also require existing lesson translations (e.g. Ukrainian, Japanese, Spanish) to update their .po files to include their translation for "the authors". I'll coordinate this fix later this week.