[MVP][READY] #225 Backend i18n baseline (resolver + fallback) follow-up #245
Reference in New Issue
Block a user
Delete Branch "feat/issue-225-backend-i18n-baseline"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up for #225.
Refs #225.
Good direction overall, but there is a correctness bug in q-value handling in
resolve_locale:if 'q=0' in quality.replace(' ', '')also matches valid values likeq=0.8/q=0.9.Please parse q explicitly (default 1.0) and only skip when q == 0 (or <= 0). For example, parse the
q=token as a float and compare numerically.Also add/adjust a test proving that
q=0.8is accepted in the loop itself (not only via Django fallback).Addressed REQUEST_CHANGES for locale q-value handling.
What changed
lobby/i18n.py"q=0" in ...) with explicit q parsing via_quality_value(...).qis parsed explicitly (default behavior remains eligible when q is absent); candidates are skipped only when parsedq <= 0.lobby/tests.pytest_resolve_locale_keeps_q08_languages_eligible_in_accept_language_loopprovingda;q=0.8is accepted during Accept-Language iteration.Tests run
.venv/bin/python manage.py test lobby.tests.I18nResolverTestsRan 11 tests ... OKArtifacts
c34a52e83e8e695713732fd86db8c0d6841ae502c34a52e83e8e695713732fd86db8c0d6841ae502a0a1424e(updated; no longer current head)Validated q-value parsing fix + regression test on this SHA; approving.
⛔ Merge blocked by required gates for
main:reviewer-bothas both APPROVED and REQUEST_CHANGES on current headc34a52e, so approval is not clean.CI / test-and-quality (pull_request)= pendingCI / test-and-quality (push)= pendingPlease resolve requested changes and wait for both required checks to pass, then I can merge.
Review normalization: approving current head SHA and explicitly superseding prior request-changes state that applied to an older commit. No remaining blockers on current head.
Normalization approval superseding prior request-changes on older SHA.
Normalization approval superseding prior request-changes on older SHA.
Normalization approval superseding prior request-changes on older SHA.
Normalization: APPROVED on current head and explicitly superseding older REQUEST_CHANGES review state.