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:
parent
64586dff07
commit
b6370c718a
1 changed files with 3 additions and 1 deletions
|
@ -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))
|
||||
|
|
Loading…
Reference in a new issue