From b6370c718ac0c2b43ba2a0184d2e8b5dac301120 Mon Sep 17 00:00:00 2001 From: Manu Date: Thu, 21 Nov 2024 14:47:16 +0000 Subject: [PATCH] Workaround to load right language --- src/vorta/i18n/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vorta/i18n/__init__.py b/src/vorta/i18n/__init__.py index 01e68705..0d23438b 100644 --- a/src/vorta/i18n/__init__.py +++ b/src/vorta/i18n/__init__.py @@ -65,7 +65,9 @@ def init_translations(app): qm_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'qm')) ui_langs = locale.uiLanguages() - succeeded = translator.load(locale, 'vorta', prefix='.', directory=qm_path) # e.g. vorta/i18n/qm/vorta.de_DE.qm + succeeded = translator.load( + QLocale(ui_langs[0]), 'vorta', prefix='.', directory=qm_path + ) # e.g. vorta/i18n/qm/vorta.de_DE.qm if succeeded: app.installTranslator(translator) logger.debug('Loading translation %s for %r.' % ('succeeded' if succeeded else 'failed', ui_langs))