From 2e844dbabf8b17390ebdb2159cace48cfdd19a34 Mon Sep 17 00:00:00 2001 From: mkaay Date: Thu, 11 Feb 2010 17:27:22 +0100 Subject: locale fix --- pyLoadCore.py | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'pyLoadCore.py') diff --git a/pyLoadCore.py b/pyLoadCore.py index 01646212f..b2ee524a6 100755 --- a/pyLoadCore.py +++ b/pyLoadCore.py @@ -110,15 +110,7 @@ class Core(object): self.do_kill = False self.do_restart = False translation = gettext.translation("pyLoad", self.make_path("locale"), languages=[self.config['general']['language']]) - try: - translation.ugettext("äöü") - unicode = True - except: - unicode = False - - #@TODO cleaner method, if possible - - translation.install(unicode) + translation.install(unicode=(False if sys.stdout.encoding == "ascii" else True)) self.check_install("Crypto", _("pycrypto to decode container files")) self.check_install("Image", _("Python Image Libary (PIL) for captha reading")) @@ -641,4 +633,4 @@ if __name__ == "__main__": except KeyboardInterrupt: pyload_core.shutdown() pyload_core.logger.info(_("killed pyLoad from Terminal")) - exit() \ No newline at end of file + exit() -- cgit v1.2.3