Fix previous commit [5864]
This commit is contained in:
parent
c6eaec6998
commit
c6d4208a29
|
@ -47,6 +47,21 @@ import pkg_resources
|
|||
import gtk, gtk.glade
|
||||
import sys
|
||||
|
||||
# Initialize gettext
|
||||
try:
|
||||
if hasattr(locale, "bindtextdomain"):
|
||||
locale.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
if hasattr(locale, "textdomain"):
|
||||
locale.textdomain("deluge")
|
||||
gettext.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
gettext.textdomain("deluge")
|
||||
gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
gtk.glade.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
gtk.glade.textdomain("deluge")
|
||||
except Exception, e:
|
||||
log.error("Unable to initialize gettext/locale!")
|
||||
log.exception(e)
|
||||
|
||||
import deluge.component as component
|
||||
from deluge.ui.client import client
|
||||
from mainwindow import MainWindow
|
||||
|
@ -141,21 +156,6 @@ DEFAULT_PREFS = {
|
|||
|
||||
class GtkUI(object):
|
||||
def __init__(self, args):
|
||||
|
||||
# Initialize gettext
|
||||
try:
|
||||
if hasattr(locale, "bindtextdomain"):
|
||||
locale.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
if hasattr(locale, "textdomain"):
|
||||
locale.textdomain("deluge")
|
||||
gettext.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
gettext.textdomain("deluge")
|
||||
gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
gtk.glade.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
gtk.glade.textdomain("deluge")
|
||||
except Exception, e:
|
||||
log.error("Unable to initialize gettext/locale!")
|
||||
log.exception(e)
|
||||
# Setup signals
|
||||
try:
|
||||
import gnome.ui
|
||||
|
|
Loading…
Reference in New Issue