diff options
author | Marcos Pinto <markybob@dipconsultants.com> | 2007-11-21 23:42:35 +0000 |
---|---|---|
committer | Marcos Pinto <markybob@dipconsultants.com> | 2007-11-21 23:42:35 +0000 |
commit | 037be4d1703805fe0c7ed828769563c805cd693e (patch) | |
tree | 6cc1ba7415634f166675cbcdd02b690182da3246 | |
parent | d918302e3e4cc5d91a5563a8c57c7694bbdc4e09 (diff) | |
download | deluge-037be4d1703805fe0c7ed828769563c805cd693e.tar.gz deluge-037be4d1703805fe0c7ed828769563c805cd693e.tar.bz2 deluge-037be4d1703805fe0c7ed828769563c805cd693e.zip |
tweak local setting
-rw-r--r-- | src/__init__.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/__init__.py b/src/__init__.py index cb77d8019..56e05e0db 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -37,14 +37,17 @@ import common APP = 'deluge' DIR = os.path.join(common.INSTALL_PREFIX, 'share', 'locale') -if not common.windows_check(): - locale.setlocale(locale.LC_MESSAGES, '') - locale.bindtextdomain(APP, DIR) - locale.textdomain(APP) +if not common.windows_check(): + try: + locale.setlocale(locale.LC_MESSAGES, '') + locale.bindtextdomain(APP, DIR) + locale.textdomain(APP) + except: + pass else: import gtk.glade locale.setlocale(locale.LC_ALL, '') - gtk.glade.bindtextdomain(APP,DIR) + gtk.glade.bindtextdomain(APP, DIR) gtk.glade.textdomain(APP) gettext.bindtextdomain(APP, DIR) gettext.textdomain(APP) |