## Summary
- add backend test that locks the i18n API error payload contract to `error`, `error_code`, and `locale`
- keep locale coverage for danish and unsupported-locale fallback to english in backend tests
## Testing
- `.venv/bin/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.LobbyFlowTests.test_join_error_payload_uses_stable_i18n_contract_keys lobby.tests.StartRoundTests.test_start_round_error_localizes_to_danish lobby.tests.StartRoundTests.test_start_round_error_falls_back_to_english_for_unsupported_locale lobby.tests.I18nResolverTests`
Closes #225
nice-to-have: The new contract-key assertion is good; optionally also assert error_code == "session_code_required" in this test to keep key-set and semantic contract checks co-located.
Change is focused and correctly guards the i18n error payload key contract (error, error_code, locale).
Review summary (head 6d99741305313ecada0b61aa55a90846851666a5):
- blocker: none found
- should-fix: none found
- nice-to-have: The new contract-key assertion is good; optionally also assert `error_code == "session_code_required"` in this test to keep key-set and semantic contract checks co-located.
Change is focused and correctly guards the i18n error payload key contract (`error`, `error_code`, `locale`).
Concrete review for head 6d99741305313ecada0b61aa55a90846851666a5:
blocker: none
should-fix: none
nice-to-have: In the same test, optionally assert error_code == "session_code_required" to co-locate key-contract and semantic-contract checks.
Assessment: focused guard that locks error payload keys (error, error_code, locale) for backend i18n responses.
Concrete review for head `6d99741305313ecada0b61aa55a90846851666a5`:
- blocker: none
- should-fix: none
- nice-to-have: In the same test, optionally assert `error_code == "session_code_required"` to co-locate key-contract and semantic-contract checks.
Assessment: focused guard that locks error payload keys (`error`, `error_code`, `locale`) for backend i18n responses.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
error,error_code, andlocaleTesting
.venv/bin/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.LobbyFlowTests.test_join_error_payload_uses_stable_i18n_contract_keys lobby.tests.StartRoundTests.test_start_round_error_localizes_to_danish lobby.tests.StartRoundTests.test_start_round_error_falls_back_to_english_for_unsupported_locale lobby.tests.I18nResolverTestsCloses #225
Review summary (head
6d99741305):error_code == "session_code_required"in this test to keep key-set and semantic contract checks co-located.Change is focused and correctly guards the i18n error payload key contract (
error,error_code,locale).finalize
Concrete review for head
6d99741305313ecada0b61aa55a90846851666a5:error_code == "session_code_required"to co-locate key-contract and semantic-contract checks.Assessment: focused guard that locks error payload keys (
error,error_code,locale) for backend i18n responses.APPROVED: Test-only PR med grøn CI; ny test låser i18n-fejlpayloadens nøglekontrakt uden regressionsrisiko i runtime-kode.
Official review-state: APPROVED.