feat(ui): locale persistence + i18n completeness guards (F3)
An audit found the client already i18n-first: one hard-coded UI string (the battle-scene aria-label, now keyed) and en/ru already share an identical 692-key set. - Persist the locale: i18n.setLocale writes localStorage (galaxy-locale) and the store boots from stored > browser detection > default, so a language switch survives reloads. - tests/i18n-completeness.test.ts: en/ru key-set parity, non-empty values, and locale persistence. - Docs: ui/docs/i18n.md; mark F3 done in ui/PLAN-finalize.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+11
-1
@@ -69,7 +69,17 @@ axe-core scan; full keyboard reachability with visible focus.
|
||||
Tests: axe-core integration tests on every top-level view; Playwright
|
||||
keyboard-only navigation.
|
||||
|
||||
## F3 — Localisation completeness
|
||||
## F3 — Localisation completeness — done
|
||||
|
||||
An audit found the client already i18n-first (the single hard-coded UI
|
||||
string, the battle-scene `aria-label`, is now keyed); en/ru already have
|
||||
identical key sets (692 keys). Added locale **persistence** to the i18n
|
||||
store (`localStorage` `galaxy-locale`: stored choice > browser detection
|
||||
> default) so a switch survives reloads, and
|
||||
`tests/i18n-completeness.test.ts` enforcing en/ru key-set parity,
|
||||
non-empty values, and persistence. A noisy literal-text lint was
|
||||
deliberately skipped — the structural parity test plus the i18n-first
|
||||
convention cover drift. Docs: `ui/docs/i18n.md`.
|
||||
|
||||
(From Phase 35.) Goal: every visible string is translated (en + ru).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user