summaryrefslogtreecommitdiffstats
path: root/setup
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-09-25 13:46:37 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-09-25 13:46:37 +0800
commit9b8c9a850f271f22eb70c3ae19b202753f6c919b (patch)
tree544849c392db8ad64664a4ee85ce0c77d86385bb /setup
parent791de25117257159a981d3220e492f17ff808186 (diff)
downloadibus-9b8c9a850f271f22eb70c3ae19b202753f6c919b.tar.gz
ibus-9b8c9a850f271f22eb70c3ae19b202753f6c919b.tar.xz
ibus-9b8c9a850f271f22eb70c3ae19b202753f6c919b.zip
Fix problem in non-UTF8 locale.
Diffstat (limited to 'setup')
-rw-r--r--setup/main.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/setup/main.py b/setup/main.py
index a13c2ab..f2d1d4c 100644
--- a/setup/main.py
+++ b/setup/main.py
@@ -19,19 +19,21 @@
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA
+import locale
+import gettext
import os
import sys
-from os import path
import time
-from xdg import BaseDirectory
import gtk
import gobject
import ibus
-from gtk import gdk, glade
import keyboardshortcut
+from os import path
+from xdg import BaseDirectory
+from gtk import gdk
+from gtk import glade
-from gettext import dgettext
-_ = lambda a : dgettext("ibus", a)
+_ = lambda a : gettext.dgettext("ibus", a)
N_ = lambda a : a
(
@@ -68,6 +70,7 @@ class Setup(object):
def __init__(self):
super(Setup, self).__init__()
+ locale.bind_textdomain_codeset("ibus", "UTF-8")
glade.textdomain("ibus")
glade_file = path.join(path.dirname(__file__), "./setup.glade")
self.__xml = glade.XML(glade_file)