mirror of
https://github.com/pretix/pretix.git
synced 2026-05-09 15:54:03 +00:00
Fix babel locale discovery for zh_Hans_US
This commit is contained in:
@@ -141,7 +141,7 @@ def get_babel_locale():
|
|||||||
|
|
||||||
for locale in try_locales:
|
for locale in try_locales:
|
||||||
if localedata.exists(locale):
|
if localedata.exists(locale):
|
||||||
return locale
|
return localedata.normalize_locale(locale)
|
||||||
|
|
||||||
return "en"
|
return "en"
|
||||||
|
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ def test_get_locale():
|
|||||||
("pt-pt", "PT", "pt-pt", "pt-pt", "pt_PT"),
|
("pt-pt", "PT", "pt-pt", "pt-pt", "pt_PT"),
|
||||||
("es", "MX", "es-mx", "es", "es_MX"),
|
("es", "MX", "es-mx", "es", "es_MX"),
|
||||||
("es-419", "MX", "es-419", "es-419", "es_MX"),
|
("es-419", "MX", "es-419", "es-419", "es_MX"),
|
||||||
|
("zh-hans", "US", "zh-hans", "zh-hans", "zh_Hans"),
|
||||||
("zh-hans", "CN", "zh-hans", "zh-hans", "zh_Hans_CN"),
|
("zh-hans", "CN", "zh-hans", "zh-hans", "zh_Hans_CN"),
|
||||||
("zh-hant", "TW", "zh-hant", "zh-hant", "zh_Hant_TW"),
|
("zh-hant", "TW", "zh-hant", "zh-hant", "zh_Hant_TW"),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user