Skip to content

Commit

Permalink
fix: turn language name (en-us) into a locale name (en_US)
Browse files Browse the repository at this point in the history
  • Loading branch information
BryanttV committed Sep 14, 2023
1 parent d9316d5 commit 4cd0dbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mindmap/mindmap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4cd0dbe

Please sign in to comment.