From 38963c9a121497d35a249bf78ca2f3c20c1590f7 Mon Sep 17 00:00:00 2001 From: qlrd Date: Sun, 25 Aug 2024 21:15:18 -0300 Subject: [PATCH] fixed bug on default locale if OS locale isnt supported --- src/app/config_krux_installer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/config_krux_installer.py b/src/app/config_krux_installer.py index f4349959..3565517d 100644 --- a/src/app/config_krux_installer.py +++ b/src/app/config_krux_installer.py @@ -172,12 +172,12 @@ def build_config(self, config): if sys.platform == "win32": lang_file = os.path.join(self.i18n_path, f"{lang}.UTF-8.json") if os.path.isfile(lang_file): - config.setdefaults("locale", {"lang": f"{lang}.UTF-8.json"}) + config.setdefaults("locale", {"lang": lang}) self.info(f"{config}.lang={lang}") else: - self.warning(f"{lang} not supported. Default {config}.lang=en_US.UTF-8") - config.setdefaults("locale", {"lang": "en_US.UTF-8"}) + self.warning(f"{lang} not supported. Default {config}.lang=en_US") + config.setdefaults("locale", {"lang": "en_US"}) def build_settings(self, settings): """Create settings panel"""