mirror of
https://github.com/storytold/AniCraft.git
synced 2026-11-19 17:12:19 +01:00
A translation layer in the shell (src/i18n): English source text is the key (tr!, trn! with CLDR plurals, trc!, tr_noop!), catalogs in the craft-i18n TSV format read by our own parser and embedded from CRAFT_I18N_DIR by build.rs, fallback app > shared > base > English. Preferences > Appearance > Language (system language by default) and --lang for one run. Every shell string and screen-reader name goes through it; menus translate the registry's labels when drawn, ids stay English. Guardrails: a source guideline test fails on prose literals outside the macros, a pseudo-locale accessibility audit fails on untranslated names, and scripts/i18n-extract.sh writes the translators' template (1173 strings) and per-locale coverage. Lookups: 13 ns from a catalog, 16 ns pseudo, none in English.