v4.0.56 added the ?lang=hu URL override for anonymous OPDS clients, but every link in the response was built with bare url_for(...) calls and dropped the language on the floor. Set ?lang=hu on /opds, get a Hungarian root page, click any nav entry → flip back to English. This release closes that loop.
docker pull ghcr.io/new-usemame/calibre-web-nextgen:v4.0.57
docker pull ghcr.io/new-usemame/calibre-web-nextgen:latest
Fixes (user-facing)
- OPDS
?lang=survives every click (closes @droM4X's follow-up on #160). The language you pick on/opds?lang=hunow follows you into/opds/new,/opds/books, pagination "Next" / "Previous", search results, and OpenSearch auto-discovery. Pagination tooltips show in the right language too ("Következő" in Hungarian, "Nächste" in German). The/opds/osdOpenSearch description advertises the resolved request locale instead of hardcodeden-EN. Search via/opds/search/<term>?lang=hureturns the correct results (previously the lang query string contaminated the search term). Thanks again @droM4X for the careful repro.
Verification
Live-verified end-to-end on cwn-local against a 21-book sample library:
/opds?lang=hu→ titles Hungarian, every navhrefcarries?lang=hu/opds/new?lang=hu&offset=5→rel=next=…&offset=10,rel=firststripsoffset, pagination tooltip in Hungarian/opds/search/crime?lang=hu→ 1 match (Crime and Punishment), identical to no-lang variant/opds/osd?lang=de→<Language>de</Language>, clean URL templates- Mixed 60 concurrent requests (30 anon + 30 admin) → all 200, zero errors
- Malformed
lang=(empty, garbage, SQLi-shaped,<script>) → 200 with English fallback, no 500s - Locale normalization:
pt-BR≡pt_BR≡ Portuguese (Brazil);zh-Hans-CN→ Chinese Simplified - 4-quadrant auth matrix (anon-on/off × creds valid/invalid) unchanged from PR #137/#178
- #121 regression: 0 WARN log lines for anonymous probes
tests/unit/test_translations_compile.pygreen across all 30 shipped locales
CHANGES rows
See CHANGES-vs-upstream.md for per-PR detail.