Languages: follow the core's whole roll-out, the Canadian variants included #43
Labels
No labels
bug
documentation
enhancement
performance
security
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo-chromium#43
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The extension ships 40 of the core's 84 languages. The core's roll-out has moved on and
scripts/languages.pycan no longer follow it: it stops on any code with a region or a script that has no entry inSPELLED, and the core now has five of them. The Thunderbird extension already follows the whole roll-out (postulo/postulo-thunderbird#18); this one should too.Found on 2026-10-23 while reviewing the Canadian variants in Weblate: every other component has
en_CAandfr_CAtranslated, butextension-chromiumhas no catalogue for them, so there is nothing for Weblate to translate.What is missing
Compared with
src/postulo/locale/in the core atmain(84 catalogues) againstsrc/_locales/here (40):languages.pycannot spell yet (region or script, noSPELLEDentry):en-CA,fr-CA,es-MX,zh-Hans,zh-Hant.afakamarazbebmbncnreefffohahiidigkabkklnmgnnnrnyomrmrwsnsossstswtitntsurvewoxhyozu.fr,enandsrare here under the extension's own spelling offr-FR,en-GBandsr-Cyrland are not missing.Change
SPELLED. The rule in its comment already decides most of them: the region stays where the core has two varieties of a language, sofr-FRandfr-CAbecome two folders,frandfr_CA; likewiseenanden_CA,esandes_MX. Chinese has two scripts and no plain code, sozh_Hansandzh_Hantneed a decision. Chrome names themzh_CNandzh_TW, which say a region the core does not.python scripts/languages.pyagainst the current core, add an empty catalogue for each new folder in Weblate's layout, and let Weblate fill them (translations come from Weblate only, postulo/postulo#706).arandurare the first right-to-left languages here; check thatdirectionfromlanguages.jsreaches the popup and the review screen.To verify before shipping
i18n.jshas two paths. A language the person picks in the settings is read from its catalogue by the extension itself, so any folder name works there. The browser's own language goes throughchrome.i18n, which only matches the locale names Chrome supports (en_GB,es_419,pt_PT,zh_CNand so on; noten_CA,fr_CAores_MX). Check in a real Chromium, and in a Firefox build of it, that:fr_CAorkabdo not stop the extension loading or packing, and are not refused by the Chrome Web Store;fr-CAfalls back tofrand not to English, and one set toen-CAtoen.If Chrome refuses an unknown folder, the build could leave those languages out of what
chrome.i18nsees and offer them only through the settings' picker.Related: #29 (try the extension in a real Chromium and Firefox).
Done when
python scripts/languages.py --checkpasses against the core's currentmain.src/_locales/has a folder for every language the core has started, andextension-chromiumin Weblate lists them all.languages.py.