From 4cd0dbea1f97e6dbc2606b39259554444ba98f91 Mon Sep 17 00:00:00 2001 From: Bryann Valderrama Date: Thu, 14 Sep 2023 17:39:30 -0500 Subject: [PATCH] fix: turn language name (en-us) into a locale name (en_US) --- mindmap/mindmap.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindmap/mindmap.py b/mindmap/mindmap.py index 5d9bbf8..821b91f 100644 --- a/mindmap/mindmap.py +++ b/mindmap/mindmap.py @@ -663,7 +663,7 @@ def _get_statici18n_js_url(): return None text_js = 'public/js/translations/{locale_code}/text.js' lang_code = locale_code.split('-')[0] - for code in (locale_code, lang_code, 'en'): + for code in (translation.to_locale(locale_code), lang_code, 'en'): if pkg_resources.resource_exists( loader.module_name, text_js.format(locale_code=code)): return text_js.format(locale_code=code)