-
Notifications
You must be signed in to change notification settings - Fork 13
Localization
The UI ships in 17 locales: en, es, pt-BR, ko, ja, ru, zh-CN, zh-TW, fr, pl, uk, da, ar, de, it, tr. No build step, no fetch — everything loads via <script src>.
-
One dict file per locale:
public/js/lib/locales/i18n-dict.<lang>.js, each definingwindow.__I18N_DICT_<LANG> = { key: string }, plusi18n-dict.aliases.js. -
Assembler:
public/js/lib/i18n-dict.jsmerges them intowindow.__I18N_DICT(itsLANGS/TABLESlists enumerate the locales). -
Runtime:
public/js/lib/i18n.js— locale detection (LANGS+detect()), thet()lookup, and thedata-i18nDOM walker. The language picker is a flag<select>rendered byrenderLangSwitcherinapp.js. - Node tests and tooling load the dictionaries through
tests/helpers/i18n-vm.mjs(I18N_LANGS).
i18n.js sets <html dir="rtl"> for locales in RTL_LANGS; the [dir="rtl"] block in public/css/app.css mirrors the chrome (sidebar, drawers, the docs FAB moves bottom-left, the usage HUD bottom-right). LTR locales are byte-for-byte unchanged by RTL work.
- Add the key to all 16 locale files. Parity is gated by
tests/i18n-locale-files.test.mjs+tests/i18n-coverage.test.mjs. - Regenerate the snapshot
tests/fixtures/i18n-dict.snapshot.json. - Run
node tools/i18n-audit.mjs(also part ofnpm run test:ci).
Fan-out hazard: parallel translation fan-outs have silently produced duplicated key-blocks and English glosses that the parity gate is blind to — grep each dict for dup keys and stray English after every fan-out. Note that
grepmay treat emoji-heavy dict files as binary (usegrep -aorrg).
Touches, in one PR: the new locale file · the assembler's LANGS/TABLES · i18n.js LANGS + detect() · the <script> order in public/index.html · tests/helpers/i18n-vm.mjs I18N_LANGS · tools/i18n-audit.mjs · scripts/check-changelog-parity.mjs · then the snapshot. If the locale is RTL, also RTL_LANGS + CSS mirroring.
The in-app help guide lives at docs/help/<lang>.md, fully translated in all 17 locales and served by GET /api/help/:lang (fallback to en). Structure parity is test-gated:
-
28
##sections / 103###subsections as of v1.118.0 (§26 "Lifetime & compensation" added the 103rd H3). - Gates:
tests/canonical-docs-coverage.test.mjs,tests/help-ru-config-section.test.mjs,tests/help-ui.test.mjs. Adding an H2 means bumping the count incanonical-docs-coverage+help-ui; adding an H3 means bumpinghelp-ru-config-section. - The grounded docs assistant (
POST /api/docs-assistant/ask) answers from these bundles only — help quality is product quality.
Every release fans out user-facing docs to all locales:
-
CHANGELOG ×16 —
CHANGELOG.md+ 15 translated clones, gated byscripts/check-changelog-parity.mjs("all 15 locales at v"). -
README ×16 —
README.md+ 15 clones (each localized README must point at its own./images/dashboard-<locale>.png). - Help ×16 — every touched help section updated in all 16 bundles.
The server speaks English (logs, API error strings); all user-facing translation happens in the SPA layer. The SPA injects lang on <html>.
career-ops-ui v1.209.0 · Repository · Releases · Issues
Guides
Reference
Development
Languages (Home)