Lines 17-23
Link Here
|
17 |
@author: RaNaN |
17 |
@author: RaNaN |
18 |
""" |
18 |
""" |
19 |
from getpass import getpass |
19 |
from getpass import getpass |
20 |
import gettext |
20 |
import module.common.pylgettext as gettext |
21 |
import os |
21 |
import os |
22 |
from os import makedirs |
22 |
from os import makedirs |
23 |
from os.path import abspath |
23 |
from os.path import abspath |
Lines 44-50
Link Here
|
44 |
|
44 |
|
45 |
langs = self.config.getMetaData("general", "language")["type"].split(";") |
45 |
langs = self.config.getMetaData("general", "language")["type"].split(";") |
46 |
lang = self.ask(u"Choose your Language / Wähle deine Sprache", "en", langs) |
46 |
lang = self.ask(u"Choose your Language / Wähle deine Sprache", "en", langs) |
47 |
translation = gettext.translation("setup", join(self.path, "locale"), languages=["en", lang]) |
47 |
gettext.setpaths([join(os.sep, "usr", "share", "pyload", "locale"), None]) |
|
|
48 |
translation = gettext.translation("setup", join(self.path, "locale"), languages=[lang, "en"],fallback=True) |
48 |
translation.install(True) |
49 |
translation.install(True) |
49 |
|
50 |
|
50 |
# print "" |
51 |
# print "" |
Lines 342-349
Link Here
|
342 |
self.config["ssl"]["activated"] = self.ask(_("Activate SSL?"), "y", bool=True) |
343 |
self.config["ssl"]["activated"] = self.ask(_("Activate SSL?"), "y", bool=True) |
343 |
|
344 |
|
344 |
def set_user(self): |
345 |
def set_user(self): |
345 |
|
346 |
gettext.setpaths([join(os.sep, "usr", "share", "pyload", "locale"), None]) |
346 |
translation = gettext.translation("setup", join(self.path, "locale"), languages=["en", self.config["general"]["language"]]) |
347 |
translation = gettext.translation("setup", join(self.path, "locale"), languages=[self.config["general"]["language"],"en"],fallback=True) |
347 |
translation.install(True) |
348 |
translation.install(True) |
348 |
|
349 |
|
349 |
from module.database import DatabaseBackend |
350 |
from module.database import DatabaseBackend |
Lines 394-400
Link Here
|
394 |
|
395 |
|
395 |
def conf_path(self, trans=False): |
396 |
def conf_path(self, trans=False): |
396 |
if trans: |
397 |
if trans: |
397 |
translation = gettext.translation("setup", join(self.path, "locale"), languages=[self.config["general"]["language"]]) |
398 |
gettext.setpaths([join(os.sep, "usr", "share", "pyload", "locale"), None]) |
|
|
399 |
translation = gettext.translation("setup", join(self.path, "locale"), languages=[self.config["general"]["language"], "en"],fallback=True) |
398 |
translation.install(True) |
400 |
translation.install(True) |
399 |
|
401 |
|
400 |
print _("Setting new configpath, current configuration will not be transfered!") |
402 |
print _("Setting new configpath, current configuration will not be transfered!") |