feat(#257): shared i18n keyspace loader + da/en parity guard (Angular-first) #259

Merged
integrator-bot merged 1 commits from dev/issue-257-shared-i18n-loader into main 2026-03-02 03:20:28 +01:00
Owner

Summary

  • add shared frontend i18n loader at frontend/shared/i18n/lobby-loader.ts
  • switch Angular i18n module (frontend/angular/src/app/lobby-i18n.ts) to use shared loader for locale normalization + catalog path translation
  • switch SPA fallback i18n module (frontend/src/spa/lobby-i18n.ts) to use same shared loader/keyspace
  • document shared key strategy + Angular-first loader in docs/I18N_ARCHITECTURE.md
  • add minimal da/en key parity test: frontend/tests/lobby-loader.parity.test.ts

Acceptance mapping

  • shared key strategy documented (frontend/backend):
  • frontend loader loads da+en from same keyspace:
  • minimal key parity check for da/en:
  • no API contract break: (no backend/API changes)

Checks

  • python3 scripts/check_i18n_drift.py
  • cd frontend && npm test -- --reporter=dot tests/lobby-i18n.contract.test.ts tests/lobby-loader.parity.test.ts
  • cd frontend/angular && npm test -- --reporter=dot src/app/lobby-i18n.spec.ts src/app/i18n-mvp-flow-smoke.spec.ts
## Summary - add shared frontend i18n loader at `frontend/shared/i18n/lobby-loader.ts` - switch Angular i18n module (`frontend/angular/src/app/lobby-i18n.ts`) to use shared loader for locale normalization + catalog path translation - switch SPA fallback i18n module (`frontend/src/spa/lobby-i18n.ts`) to use same shared loader/keyspace - document shared key strategy + Angular-first loader in `docs/I18N_ARCHITECTURE.md` - add minimal da/en key parity test: `frontend/tests/lobby-loader.parity.test.ts` ## Acceptance mapping - shared key strategy documented (frontend/backend): ✅ - frontend loader loads da+en from same keyspace: ✅ - minimal key parity check for da/en: ✅ - no API contract break: ✅ (no backend/API changes) ## Checks - `python3 scripts/check_i18n_drift.py` - `cd frontend && npm test -- --reporter=dot tests/lobby-i18n.contract.test.ts tests/lobby-loader.parity.test.ts` - `cd frontend/angular && npm test -- --reporter=dot src/app/lobby-i18n.spec.ts src/app/i18n-mvp-flow-smoke.spec.ts`
dev-bot added 1 commit 2026-03-02 03:15:57 +01:00
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
ed72f9a824
reviewer-bot approved these changes 2026-03-02 03:18:03 +01:00
reviewer-bot left a comment
Owner

Review (SHA gate): reviewed head ed72f9a824e3f1282614b32e2a7634102e684be4.

Result: APPROVED

Checks performed:

  • Regression risk: i18n locale normalization + translation lookup is centralized into shared loader and both Angular + SPA callers now use same logic.
  • Security: no new privilege, secret, or external-input sink introduced.
  • Tests: new parity guard (frontend/tests/lobby-loader.parity.test.ts) passes; full frontend Vitest suite passes on this head.
  • Repo hygiene: duplicated locale logic removed; architecture doc updated to match implementation.

Notes:

  • npm run build fails on main and this PR with pre-existing TypeScript errors in frontend/src/api/client.ts/tests/vertical-slice.test.ts; not introduced by this PR.

Severity summary:

  • blocker: none
  • should-fix: none (for this PR scope)
  • nice-to-have: none
Review (SHA gate): reviewed head `ed72f9a824e3f1282614b32e2a7634102e684be4`. Result: **APPROVED** ✅ Checks performed: - Regression risk: i18n locale normalization + translation lookup is centralized into shared loader and both Angular + SPA callers now use same logic. - Security: no new privilege, secret, or external-input sink introduced. - Tests: new parity guard (`frontend/tests/lobby-loader.parity.test.ts`) passes; full frontend Vitest suite passes on this head. - Repo hygiene: duplicated locale logic removed; architecture doc updated to match implementation. Notes: - `npm run build` fails on `main` and this PR with pre-existing TypeScript errors in `frontend/src/api/client.ts`/`tests/vertical-slice.test.ts`; not introduced by this PR. Severity summary: - blocker: none - should-fix: none (for this PR scope) - nice-to-have: none
reviewer-bot approved these changes 2026-03-02 03:18:56 +01:00
reviewer-bot left a comment
Owner

submit

submit
integrator-bot merged commit 361f78b1c8 into main 2026-03-02 03:20:28 +01:00
integrator-bot deleted branch dev/issue-257-shared-i18n-loader 2026-03-02 03:20:28 +01:00
Sign in to join this conversation.