From 6c4eabfc4b686a72224ff06cb56c385bfc489790 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Wed, 10 Feb 2010 21:59:31 +0100 Subject: Webinterface with lighttpd! locale fixing try. --- pyLoadCore.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index 483750152..5ea4b43c5 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -108,8 +108,16 @@ class Core(object): self.do_kill = False self.do_restart = False translation = gettext.translation("pyLoad", join(self.path, "locale"), languages=[self.config['general']['language']]) - translation.install(unicode=(False if sys.stdout.encoding == "ascii" else True)) + try: + translation.ugettext("äöü") + unicode = True + except: + unicode = False + #@TODO cleaner method, if possible + + translation.install(unicode) + self.check_install("Crypto", _("pycrypto to decode container files")) self.check_install("Image", _("Python Image Libary (PIL) for captha reading")) self.check_install("pycurl", _("pycurl for lower memory footprint while downloading")) -- cgit v1.2.3