Adding commandline argument to force language.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
74ea50d19f
commit
5384dbfc89
3 changed files with 6 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -11,6 +11,7 @@ linux/flatpak/.flatpak-builder
|
|||
**/**.qmlc
|
||||
**/**.jsc
|
||||
**/**.pyc
|
||||
**/**.qm
|
||||
*.jsc
|
||||
*.qmlc
|
||||
.DS_Store
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
"""
|
||||
from shutil import which
|
||||
|
||||
__VERSION__ = "0.1.3"
|
||||
__VERSION__ = "0.1.4"
|
||||
is_release = False
|
||||
|
||||
|
||||
|
|
|
@ -176,7 +176,10 @@ def run():
|
|||
|
||||
# Installing translators
|
||||
translator = QTranslator()
|
||||
if (translator.load(QLocale(), "lp", "_", path.realpath(path.join(getcwd(), "i18n")))):
|
||||
# Check if lang is forced.
|
||||
forcedlang = [p for p in argv if p[:7]=="--lang="]
|
||||
locale = QLocale(forcedlang[0][7:]) if len(forcedlang) > 0 else QLocale()
|
||||
if (translator.load(locale, "lp", "_", path.realpath(path.join(getcwd(), "i18n")))):
|
||||
app.installTranslator(translator);
|
||||
|
||||
# Installing macOS file handler.
|
||||
|
|
Loading…
Reference in a new issue