feat(i18n): share frontend lobby loader and add da/en parity check (#257)
All checks were successful
CI / test-and-quality (push) Successful in 3m21s
CI / test-and-quality (pull_request) Successful in 3m2s

This commit is contained in:
2026-03-02 02:15:17 +00:00
parent 0bc4e6f066
commit ed72f9a824
5 changed files with 104 additions and 54 deletions

View File

@@ -9,7 +9,7 @@ Issue #175 requires one shared i18n contract for MVP host/player flows across fr
- supported: `en`, `da`
- default/fallback: `en`
Both Angular (`frontend/angular/src/app/lobby-i18n.ts`) and Django (`lobby/i18n.py`) read from this catalog.
Django (`lobby/i18n.py`) reads directly from the catalog. Frontend runtimes are Angular-first and use a shared loader (`frontend/shared/i18n/lobby-loader.ts`) so Angular shell and SPA fallback consume the same keyspace + locale normalization.
## Key naming convention
- Domain-first namespaces:
@@ -46,3 +46,4 @@ Both Angular (`frontend/angular/src/app/lobby-i18n.ts`) and Django (`lobby/i18n.
- `frontend/angular/src/app/i18n-mvp-flow-smoke.spec.ts`
- `frontend/angular/src/app/features/host/host-shell.component.spec.ts`
- `frontend/angular/src/app/features/player/player-shell.component.spec.ts`
- `frontend/tests/lobby-loader.parity.test.ts` (minimal da/en key parity guard for shared keyspace)