-
-
Notifications
You must be signed in to change notification settings - Fork 9
One translation key labels two different fields on the branch form #445
Copy link
Copy link
Closed
Labels
area: localizationTranslations, language packs, locale formatting, fontsTranslations, language packs, locale formatting, fontsbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededsize: smallSmall, focused task suitable for a short PRSmall, focused task suitable for a short PR
Description
Activity
Metadata
Metadata
Assignees
Labels
area: localizationTranslations, language packs, locale formatting, fontsTranslations, language packs, locale formatting, fontsbugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededsize: smallSmall, focused task suitable for a short PRSmall, focused task suitable for a short PR
Found while seeding the language packs (#444):
lang_register_titleis used for two different labels in the same file.frontend/modals/branch.html:209
frontend/modals/branch.html:264
One key cannot correctly translate both "Pincode" and "Low Stock Notification Range" in any language — whichever word is chosen, one of the two fields is mislabelled.
It is already wrong in Tamil today: both render as
பதிவுகள்("registers"), which matches neither. A shopkeeper reading Tamil sees a field called "registers" where the form is asking for a postal code.English readers never see this, which is why it has survived.
The fix
Give each field its own key — the name suggests
lang_register_titlewas a copy-paste from a third place, so check where else it appears before renaming.lang_pincode_title(which already exists — check whether it fits) and a new one for the notification range.languages/ta.json, and any other pack that has a word for the old key.node tests/tools/i18n-coverage.jsandnode --test tests/i18n.test.jsshould stay clean.Good first issue because
It needs no knowledge of the codebase beyond the two lines above, and the change is contained to markup plus one language file. Reading Tamil helps for the second half but is not required — say so in the PR and somebody who does can check the wording.