diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-12-07 19:22:02 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-12-07 19:22:02 +0100 |
commit | b575e03d6621cd236df7de3879507efa38ad16b8 (patch) | |
tree | b454c2336f6dbc2048863b2457af2810a0ea1cc3 /pyLoadCli.py | |
parent | new l18n files, closed #448 (diff) | |
download | pyload-b575e03d6621cd236df7de3879507efa38ad16b8.tar.xz |
closed #436
Diffstat (limited to 'pyLoadCli.py')
-rwxr-xr-x | pyLoadCli.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/pyLoadCli.py b/pyLoadCli.py index c992914a7..079cee19c 100755 --- a/pyLoadCli.py +++ b/pyLoadCli.py @@ -20,7 +20,7 @@ from __future__ import with_statement from getopt import GetoptError, getopt -import gettext +import module.common.pylgettext as gettext import os from os import _exit from os.path import join, exists, abspath, basename @@ -490,8 +490,9 @@ def main(): for opt in configFile.items("cli"): config[opt[0]] = opt[1] + gettext.setpaths([join(os.sep, "usr", "share", "pyload", "locale"), None]) translation = gettext.translation("pyLoadCli", join(pypath, "locale"), - languages=["en", config["language"]]) + languages=[config["language"],"en"],fallback=True) translation.install(unicode=True) interactive = False @@ -515,8 +516,9 @@ def main(): config["port"] = params elif option in ("-l", "--language"): config["language"] = params + gettext.setpaths([join(os.sep, "usr", "share", "pyload", "locale"), None]) translation = gettext.translation("pyLoadCli", join(pypath, "locale"), - languages=["en", config["language"]]) + languages=[config["language"],"en"],fallback=True) translation.install(unicode=True) elif option in ("-h", "--help"): print_help(config) @@ -585,4 +587,4 @@ def main(): if __name__ == "__main__": - main()
\ No newline at end of file + main() |