1.5 KiB
1.5 KiB
ISSUE-175 Artifact — shared i18n contract + MVP host/player flow
Delivered
- Shared i18n contract is centralized in
shared/i18n/lobby.json(da/en, defaulten, robust fallback). - Frontend host/player MVP copy is read via shared keys (no hardcoded Danish strings in Angular MVP flow components).
- Backend error messages resolve from shared keyspace with locale-aware API payload (
error_code,error,locale). - Audio-routing policy is explicit and shared:
frontend.capabilities.client_has_no_audio_output=true. - Architecture + key naming documented in
docs/I18N_ARCHITECTURE.md.
Smoke / e2e evidence
Backend locale + fallback
Command:
. .venv/bin/activate && python manage.py test \
lobby.tests.LobbyFlowTests.test_join_error_localizes_to_danish_with_accept_language_header \
lobby.tests.LobbyFlowTests.test_join_error_falls_back_to_english_for_unsupported_locale \
lobby.tests.I18nResolverTests
Result:
- PASS (7 tests)
- Confirms
dalocalization and fallback toenfor unsupported locale.
Frontend host/player + language switch + audio policy
Command:
cd frontend/angular
npm test -- --run \
src/app/lobby-i18n.spec.ts \
src/app/i18n-mvp-flow-smoke.spec.ts \
src/app/features/host/host-shell.component.spec.ts \
src/app/features/player/player-shell.component.spec.ts
Result:
- PASS (22 tests)
- Includes smoke for host/player copy in both en and da and verifies primary-only audio policy flag (
clientHasNoAudioOutput=true).