1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-03-13 03:51:38 +00:00

Compare commits

..

1 Commits

Author SHA1 Message Date
4b2fbe87ea Default to English on unsupported system language Fix #976
- Add check for supported language to system locale detection
- Fall-back to English when not a supported locale
2022-03-12 04:36:13 -06:00

View File

@@ -150,7 +150,9 @@ def install_gettext_trans_under_qt(base_folder, lang=None):
if not lang:
lang = str(QLocale.system().name())[:2]
localename = get_locale_name(lang)
if localename is not None:
if localename is None:
lang = "en"
localename = get_locale_name(lang)
try:
locale.setlocale(locale.LC_ALL, localename)
except locale.Error: