Merge pull request 'docs(#225): add backend i18n baseline verification artifact' (#258) from dev/issue-225-backend-i18n-baseline into main
Some checks failed
CI / test-and-quality (push) Has been cancelled
Some checks failed
CI / test-and-quality (push) Has been cancelled
This commit was merged in pull request #258.
This commit is contained in:
43
docs/ISSUE-225-BACKEND-I18N-BASELINE-ARTIFACT.md
Normal file
43
docs/ISSUE-225-BACKEND-I18N-BASELINE-ARTIFACT.md
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
# ISSUE-225 Artifact — Backend i18n baseline (resolver + fallback)
|
||||||
|
|
||||||
|
Issue: **#225** (`[MVP][READY] #175-A: Backend i18n baseline (resolver + fallback)`)
|
||||||
|
|
||||||
|
## Scope verified
|
||||||
|
|
||||||
|
- Backend locale resolver supports `da` + `en` and normalizes language tags.
|
||||||
|
- Unsupported locale requests fall back to default locale (`en`).
|
||||||
|
- Error payload contract is stable for API errors:
|
||||||
|
- `error_code`
|
||||||
|
- `error`
|
||||||
|
- `locale`
|
||||||
|
|
||||||
|
## Implementation references
|
||||||
|
|
||||||
|
- Locale resolution + fallback chain:
|
||||||
|
- `lobby/i18n.py`
|
||||||
|
- `resolve_locale()`
|
||||||
|
- `resolve_error_message()`
|
||||||
|
- `api_error()`
|
||||||
|
- Shared locale contract source:
|
||||||
|
- `shared/i18n/lobby.json` (`locales.default=en`, supported includes `en`, `da`)
|
||||||
|
|
||||||
|
## Acceptance checks run
|
||||||
|
|
||||||
|
Command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
.venv/bin/python manage.py test \
|
||||||
|
lobby.tests.I18nResolverTests \
|
||||||
|
lobby.tests.LobbyFlowTests \
|
||||||
|
lobby.tests.StartRoundTests
|
||||||
|
```
|
||||||
|
|
||||||
|
Result:
|
||||||
|
|
||||||
|
- `Ran 28 tests ... OK`
|
||||||
|
- Confirms resolver behavior for locale normalization + fallback and stable error payload fields across flow endpoints.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
- Existing merged follow-ups in `main` include Accept-Language parsing fixes for q-values and locale tag normalization.
|
||||||
|
- This artifact documents the final baseline state and verification evidence for #225.
|
||||||
Reference in New Issue
Block a user