--- /dev/null
+# vim:set et sts=4 sw=4:
+#
+# ibus-hangul - The Hangul Engine For IBus
+#
+# Copyright (c) 2009 Choe Hwanjin <choe.hwanjin@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+prefix = "@prefix@"
+localedir = "@prefix@/share/locale"
import gtk
import gtk.glade as glade
import ibus
+import gettext
+import config
-from gettext import dgettext
-_ = lambda a : dgettext("ibus-hangul", a)
+_ = lambda a : gettext.dgettext("ibus-hangul", a)
class Setup ():
def __init__ (self):
self.__config = self.__bus.get_config()
self.__config.connect("value-changed", self.on_value_changed, None)
- glade.textdomain("ibus-hangul")
+ glade.bindtextdomain("ibus-hangul", config.localedir)
glade_file = os.path.join(os.path.dirname(__file__), "setup.glade")
- self.__xml = glade.XML(glade_file)
+ self.__xml = glade.XML(glade_file, domain="ibus-hangul")
self.__hangul_keyboard = self.__xml.get_widget("HangulKeyboard")
model = gtk.ListStore(str, str, int)
return self.__config.set_value("engine/Hangul", name, v)
if __name__ == "__main__":
+ gettext.bindtextdomain("ibus-hangul", config.localedir)
Setup().run()