mirror of
https://github.com/apache/superset.git
synced 2026-07-16 11:46:09 +00:00
The language-code regex only allowed a 2-letter region subtag, so locales Superset actually ships with a script subtag (e.g. sr_Latn) were rejected by /language_pack/<lang>/<version>/script.js with a 400 and silently fell back to English. Widen the shared LANGUAGE_CODE_RE to accept both region and script subtags, and add a regression test. Also gives the test helper an explicit dict[str, Any] return type so the inferred `context` locals in test_bootstrap_auth.py are annotated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>