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:
@@ -621,6 +621,7 @@ const ru: Record<keyof typeof en, string> = {
|
||||
"game.battle.not_found": "сражение не найдено",
|
||||
"game.battle.back_to_report": "к отчёту",
|
||||
"game.battle.back_to_map": "к карте",
|
||||
"game.battle.scene_label": "сцена боя",
|
||||
"game.battle.controls.play": "запустить",
|
||||
"game.battle.controls.pause": "пауза",
|
||||
"game.battle.controls.step_forward": "шаг вперёд",
|
||||
|
||||
Reference in New Issue
Block a user