feat(ui): localisation completeness — persistence + parity guards (F3) #28
Reference in New Issue
Block a user
Delete Branch "feature/ui-finalize-f3-i18n"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
F3 — Localisation completeness
From
ui/PLAN-finalize.mdF3. An audit found the client alreadyi18n-first, so this stage is small: it closes the persistence gap and
adds structural guards against translation drift.
Findings
aria-label="battle scene"— now routed through i18n.What changed
i18n.setLocalewriteslocalStorage(
galaxy-locale); the store boots from stored choice > browserdetection > default, so a language switch survives reloads (an
unrecognised stored value is ignored). Previously the choice was lost
on reload.
tests/i18n-completeness.test.ts: en/ru key-set parity (a key inone locale but not the other fails), non-empty values, and the
persistence round-trip.
aria-label→game.battle.scene_label(en + ru).ui/docs/i18n.md; F3 marked done inui/PLAN-finalize.md.A noisy literal-text lint was deliberately skipped — the structural
parity test plus the existing compile-time
Record<keyof typeof en,…>annotation and the i18n-first convention already cover drift.
Verification
pnpm check0/0;pnpm test740 passing (5 new).🤖 Generated with Claude Code