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)