ADFA-4537: content page translations for the full language set#182
Merged
Conversation
Add 31 machine-translated lang files (pending human review) so the content page (static/site) matches the Android app's supported languages. Expand supportedLangs accordingly and set the document direction for RTL locales (ar, fa). Brand names (Code on the Go, Kiwix, Kolibri, Matomo) stay as-is.
Reads each lang/*.js the way the browser does (builds window.i18n) and fails loudly on anything that would break before it ships in the rootfs: parse/ syntax errors, duplicate keys, keys missing vs the English source, and any mismatch between the loader's supported-languages list and the files on disk. Covers both the index and the dashboard tracks; cross-checks with node when available. Exits non-zero so it can gate a commit or CI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the content exploration page (
static/site/) up to the Android app's supported languages (see ADFA-4537).lang/*.jsfiles, machine-translated and marked "pending human review" in a header comment. Brand names (Code on the Go, Kiwix, Kolibri, Matomo) are left untranslated.app.js:supportedLangsexpanded to the full 33-locale set; the documentlang/dirare set on load, flipping to RTL for Arabic and Persian.zh-CNships aszh.js(Simplified) because the loader matches on the 2-letter language code.Also adds
tools/i18n/validate_i18n.py, which reads each lang file the way the browser does and fails on missing keys, parse errors, or loader/file mismatches (covers the dashboard track too).The dashboard translations are a separate PR. This is rootfs-distributed static content, so it needs a rootfs rebuild to reach devices.