diff --git a/deluge/core/core.py b/deluge/core/core.py index e01250a6c..ec495c841 100644 --- a/deluge/core/core.py +++ b/deluge/core/core.py @@ -105,22 +105,9 @@ class Core( self.register_introspection_functions() # Initialize gettext - if deluge.common.windows_check() or deluge.common.osx_check(): - locale.setlocale(locale.LC_ALL, '') - else: - locale.setlocale(locale.LC_MESSAGES, '') - locale.bindtextdomain("deluge", - pkg_resources.resource_filename( - "deluge", "i18n")) - locale.textdomain("deluge") + locale.setlocale(locale.LC_ALL, '') + gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n")) - gettext.bindtextdomain("deluge", - pkg_resources.resource_filename( - "deluge", "i18n")) - gettext.textdomain("deluge") - gettext.install("deluge", - pkg_resources.resource_filename( - "deluge", "i18n")) # Setup signals signal.signal(signal.SIGINT, self._shutdown) signal.signal(signal.SIGTERM, self._shutdown) diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index 6074fbe9f..449f27006 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -117,22 +117,8 @@ class GtkUI: gobject.threads_init() # Initialize gettext - if deluge.common.windows_check() or deluge.common.osx_check(): - locale.setlocale(locale.LC_ALL, '') - else: - locale.setlocale(locale.LC_MESSAGES, '') - locale.bindtextdomain("deluge", - pkg_resources.resource_filename( - "deluge", "i18n")) - locale.textdomain("deluge") - - gettext.bindtextdomain("deluge", - pkg_resources.resource_filename( - "deluge", "i18n")) - gettext.textdomain("deluge") - gettext.install("deluge", - pkg_resources.resource_filename( - "deluge", "i18n")) + locale.setlocale(locale.LC_ALL, '') + gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n")) # Setup signals try: