Fix crash when not language is set

This commit is contained in:
Raphael Michel
2026-01-16 21:39:38 +01:00
parent cdea82d206
commit b5ad372bb2

View File

@@ -123,6 +123,7 @@ def get_babel_locale():
# fallback to english # fallback to english
try_locales = [] try_locales = []
if current_language:
if "-" in current_language: if "-" in current_language:
lng_parts = current_language.split("-") lng_parts = current_language.split("-")
if current_region: if current_region: