mirror of
https://github.com/borgbase/vorta
synced 2024-12-22 07:43:09 +00:00
Workaround to load right language (#2148)
This commit is contained in:
parent
64586dff07
commit
108d64816c
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'))
|
qm_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'qm'))
|
||||||
ui_langs = locale.uiLanguages()
|
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:
|
if succeeded:
|
||||||
app.installTranslator(translator)
|
app.installTranslator(translator)
|
||||||
logger.debug('Loading translation %s for %r.' % ('succeeded' if succeeded else 'failed', ui_langs))
|
logger.debug('Loading translation %s for %r.' % ('succeeded' if succeeded else 'failed', ui_langs))
|
||||||
|
|
Loading…
Reference in a new issue