mirror of
https://github.com/mattermost/mattermost.git
synced 2026-10-13 09:27:38 +08:00
* Allow direct modifications to non-English translation files i18n-ci-template.yml existed to fail any PR that touched a non-English translation file unless it came from the weblate account, back when translations arrived exclusively through Weblate. Translations can now be authored in-repo and land in the same PR as the English string they translate, so that gate rejects exactly the change it should be letting through. The changed-file detection stays -- a direct edit to a locale catalog is still worth surfacing on the PR -- but it emits a warning annotation instead of failing, and the weblate-account bypass is gone with nothing left to bypass. * Remove EnableExperimentalLocales and the experimental locales The 42 webapp and 33 server locale catalogs outside the supported 22 were never selectable except behind EnableExperimentalLocales, and they had rotted: hundreds of thousands of missing keys between them, several files 100% missing, and strings that fail to parse with the runtime ICU parser and would throw if a user ever selected that language. We are not shipping those languages, so the catalogs go. With the locale set trimmed to the supported 22 the setting was left inert. It fed getAllLanguages(true), which built entries from langIDs -- the list of locale files on disk -- and then spread the curated languages map over the top. With langIDs now a subset of that map, every experimental entry was shadowed and the flag changed nothing: getAllLanguages(true) deep-equalled getAllLanguages(). Rather than leave an admin console toggle that does nothing, this removes the setting end to end: the model field and its default, the client prop, the TypeScript config types, the admin console control and its two strings, the playwright default config, and the configuration docs. Downstream of that, getAllLanguages no longer takes a parameter, and getLanguageInfo reads the supported map directly instead of going through the experimental path -- so it now resolves the supported 22 rather than whatever JSON happens to sit in the locale directory. That in turn orphaned the langIDs and langLabels exports from gen_lang_imports.mjs, and langmap.mjs existed only to populate langLabels, so all three go too. imports.ts is regenerated and now imports exactly the 21 supported non-English catalogs. The two orphaned admin strings are dropped from en.json and from the 13 translated catalogs that carried them. Existing config.json files keep working: config is decoded without DisallowUnknownFields, so a stale EnableExperimentalLocales key is ignored. The v10 changelog entry for the setting stays: it is a historical record of a release that did ship it.