Repository navigation
i18n: language registry — a locales/ directory is a language or a build error - #801
Merged
Merged
Conversation
Translate all 1,000 catalog messages with context-aware Italian copy, wire Italian into locale selection and message generation, and extend per-language fit and locale tests. Shorten strings identified by host text-fit checks while retaining the complete consent disclosures.
Adds the five settings.playback.hdr_overlay strings main gained after #783 was cut. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…docs Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ed shape Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
marked this pull request as ready for review
October 16, 2026 12:43
GLinnik21
added a commit
to tiper/fin-native
that referenced
this pull request
Oct 16, 2026
main gained a data-driven language registry (plxnative#801) and English-only technical strings (plxnative#806), so the language needs no Rust wiring now: the catalogs move to locales/pt/ with one locales/languages.json row (region pt-PT, excluded_regions ["BR"] so pt-BR keeps the English fallback), and the hand-wired Rust changes from this branch are superseded by main's. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
What
A data-driven language registry for the catalog compiler.
locales/languages.jsondeclares every UI language; the platform build script discoverslocales/*/, refuses any directory that is not registered (and any registration without a directory), and generatesPreference,Languageand their tables intoOUT_DIR/languages.rs.Why
#771 merged green but dead:
catalog::buildread four hard-coded directories and nothing else, solocales/it/was never compiled. Adding Italian then took 25 files in #783. Now a new language is a catalog directory, one registry line andpkg/resources/<tag>/appinfo.json: 0 Rust files.How
locales/languages.json): tag, native name, region, script, CLDR plurals, Settings row. Validated in the build (tag shape, reserved tags, renderer scripts, unique rows 1..999, English present).platform/build_support/catalog.rs): unregistered directory, registered-but-missing directory, stray files, non-JSON files in a locale, wrapped{"value","description","args"}translations (Add Italian localization (it) #771's mistake), missing/extra keys, missing or never-selected plural forms. Errors are collected, sorted, prefixed<tag>/<file>: <key>:and capped per language.compile(source, langs) -> Result<Generated, Vec<String>>pluscheck_keys(lang, &expected)is the seam the English-only ("translate": false) follow-up plugs into.i18n/mod.rskeeps only behavior;Preference/Language,from_tag,tag,native_name,settings_row,regional,parse, saved-slot mapping andSHIPPEDcome from the registry. Persisted values are the tag strings, unchanged. Settings' Language page isSystem + SHIPPED; Contribute moves to row 1000.i18n::SHIPPED, includinglogin.rs's off-canvas check that silently omitted French.preferences_text_fit_testsno longer falls back to Belarusian with_ =>.pluralsmust equal ICU'sPluralRules::categories(), and decimal/plural data must be the language's own, not root's.ci/check-language-lists.py(+ unit test, counted allowlistci/allow/language-lists.txtof the 5 pinned-translation files), run fromci/check-python-steps.txt.docs/localization.md"Adding a language",ui/src/CLAUDE.md,module-layers.md;SCREEN_SHAPESstring left as is with a "never generate from the registry" comment.Verification
Regression test
an_unread_locale_directory_is_an_errorwritten before the registry code, run against the unchangedbuild()(templocales/with en/es/be/fr/it plus an unregisteredxx/):Green after the registry:
make test-crate C=plx_platform T=i18n19 passed (23 with the ICU/compat tests); plx_screenslanguage,readouts,consent,preferences,item_menu,collection,person,plaintext; plx_appkitcapsule,hud; plx_uiroute_screen,text_view; plx_plexpms_headers;cargo +nightly check --workspace --lib --testsand--lib --no-default-featuresclean;ci/test_check_language_lists.py,ci/test_ci_split.py,ci/check-deps.sh,ci/check-module-layers.pygreen.Known:
plx_appkit track_menu::style_page_tests::the_style_note_fits_two_lines_at_the_player_menu_floorfails for Italian ("It pgs: the note takes 4 lines at 440px") on the #795 base too; this PR does not touch that test.Full gates: CI on this draft.
Stacked on #795.
🤖 Generated with Claude Code