1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-21 23:33:13 +00:00

Workaround to load right language

This commit is contained in:
Manu 2024-11-21 14:47:16 +00:00
parent 64586dff07
commit b6370c718a

View file

@ -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))