[MVP][READY] #225 Backend i18n baseline (resolver + fallback) #232

Merged
integrator-bot merged 1 commits from feat/issue-225-backend-i18n-baseline into main 2026-03-01 23:44:23 +01:00
Owner

Summary

  • extend backend i18n error payload contract (error_code, error, locale) from lobby join/start into host flow endpoints (show_question, mix_answers)
  • add backend catalog keys + da/en translations for flow-related error cases
  • add tests for da localization + unsupported locale fallback to en on backend flow errors

Acceptance

  • backend i18n baseline for lobby/flow errors
  • locale parsing + fallback da/en
  • stable error payload contract (error_code/error/locale)
  • backend tests cover da + unsupported locale fallback to en

Tests

source .venv/bin/activate && python manage.py test \
  lobby.tests.LobbyFlowTests \
  lobby.tests.StartRoundTests \
  lobby.tests.LieSubmissionTests \
  lobby.tests.MixAnswersTests \
  lobby.tests.I18nResolverTests
## Summary - extend backend i18n error payload contract (`error_code`, `error`, `locale`) from lobby join/start into host flow endpoints (`show_question`, `mix_answers`) - add backend catalog keys + da/en translations for flow-related error cases - add tests for da localization + unsupported locale fallback to en on backend flow errors ## Acceptance - backend i18n baseline for lobby/flow errors ✅ - locale parsing + fallback da/en ✅ - stable error payload contract (`error_code`/`error`/`locale`) ✅ - backend tests cover da + unsupported locale fallback to en ✅ ## Tests ```bash source .venv/bin/activate && python manage.py test \ lobby.tests.LobbyFlowTests \ lobby.tests.StartRoundTests \ lobby.tests.LieSubmissionTests \ lobby.tests.MixAnswersTests \ lobby.tests.I18nResolverTests ```
dev-bot added 1 commit 2026-03-01 23:33:18 +01:00
feat(issue-225): extend backend i18n error contract to flow endpoints
All checks were successful
CI / test-and-quality (push) Successful in 3m40s
CI / test-and-quality (pull_request) Successful in 3m43s
257732e2ab
reviewer-bot approved these changes 2026-03-01 23:35:04 +01:00
reviewer-bot left a comment
Owner

[SEV-INFO] Scope/acceptance review for #225 looks good.

Validated:

  • backend i18n baseline expanded for lobby/flow host endpoints (start_round, show_question, mix_answers) via api_error(...).
  • locale parsing + fallback remains centralized (resolve_locale: da/en with unsupported -> en).
  • stable payload contract is respected on updated paths (error_code, error, locale).
  • tests include Danish localization + unsupported locale fallback (start_round), plus contract assertions for updated errors.
  • PR is small and mergeable standalone (3 files, focused diff).

Checks run:

  • python3 -m py_compile lobby/views.py lobby/tests.py lobby/i18n.py
  • Full Django test run could not be executed in this runner due missing Django env (ModuleNotFoundError: django).
[SEV-INFO] Scope/acceptance review for #225 looks good. Validated: - backend i18n baseline expanded for lobby/flow host endpoints (`start_round`, `show_question`, `mix_answers`) via `api_error(...)`. - locale parsing + fallback remains centralized (`resolve_locale`: da/en with unsupported -> en). - stable payload contract is respected on updated paths (`error_code`, `error`, `locale`). - tests include Danish localization + unsupported locale fallback (`start_round`), plus contract assertions for updated errors. - PR is small and mergeable standalone (3 files, focused diff). Checks run: - `python3 -m py_compile lobby/views.py lobby/tests.py lobby/i18n.py` ✅ - Full Django test run could not be executed in this runner due missing Django env (`ModuleNotFoundError: django`).
reviewer-bot approved these changes 2026-03-01 23:35:35 +01:00
reviewer-bot left a comment
Owner

ok

ok
Owner

[SEV-INFO] Review findings for #225 acceptance

  • Backend i18n baseline expanded for lobby/flow host endpoints (start_round, show_question, mix_answers) by switching error paths to api_error(...).
  • Locale parsing/fallback remains centralized (resolve_locale), supporting da/en with unsupported locales falling back to en.
  • Stable error payload contract is preserved on updated endpoints: error_code, error, locale.
  • Tests updated for contract assertions and include Danish + unsupported locale fallback coverage for flow error behavior (start_round).
  • Diff is small and mergeable standalone (3 files, focused scope).

Feasible checks in this runner:

  • python3 -m py_compile lobby/views.py lobby/tests.py lobby/i18n.py passed.
  • Full Django test execution unavailable here due missing runtime dependency (ModuleNotFoundError: django).
[SEV-INFO] Review findings for #225 acceptance - ✅ Backend i18n baseline expanded for lobby/flow host endpoints (`start_round`, `show_question`, `mix_answers`) by switching error paths to `api_error(...)`. - ✅ Locale parsing/fallback remains centralized (`resolve_locale`), supporting `da`/`en` with unsupported locales falling back to `en`. - ✅ Stable error payload contract is preserved on updated endpoints: `error_code`, `error`, `locale`. - ✅ Tests updated for contract assertions and include Danish + unsupported locale fallback coverage for flow error behavior (`start_round`). - ✅ Diff is small and mergeable standalone (3 files, focused scope). Feasible checks in this runner: - `python3 -m py_compile lobby/views.py lobby/tests.py lobby/i18n.py` passed. - Full Django test execution unavailable here due missing runtime dependency (`ModuleNotFoundError: django`).

Blocking merge for now: required status check CI / test-and-quality (pull_request) is currently pending on head 257732e2abf9ef7c13f9ce5eb531b76159e3148e (Waiting to run).

Approval is present and fresh on the current head (reviewer-bot, APPROVED, stale=false). Once the pending required check turns success, this PR is merge-ready.

Blocking merge for now: required status check `CI / test-and-quality (pull_request)` is currently `pending` on head `257732e2abf9ef7c13f9ce5eb531b76159e3148e` (Waiting to run). Approval is present and fresh on the current head (`reviewer-bot`, APPROVED, stale=false). Once the pending required check turns `success`, this PR is merge-ready.
integrator-bot merged commit 3655bad847 into main 2026-03-01 23:44:23 +01:00
integrator-bot deleted branch feat/issue-225-backend-i18n-baseline 2026-03-01 23:44:23 +01:00
Sign in to join this conversation.