Commit 69bc0213 authored by Mathieu Bridon's avatar Mathieu Bridon

setup: Make the dialog title translatable

parent b1a890eb
......@@ -16,6 +16,10 @@
# along with ibus-cangjie. If not, see <http://www.gnu.org/licenses/>.
import gettext
# FIXME: Find a way to de-hardcode the gettext package
_ = lambda x: gettext.dgettext("ibus-cangjie", x)
from gi.repository import Gdk
from gi.repository import GLib
from gi.repository import Gtk
......@@ -23,6 +27,10 @@ from gi.repository import Gtk
from ibus_cangjie.config import options, Config
titles = {"cangjie": _("Cangjie Preferences"),
"quick": _("Quick Preferences")}
class Setup(object):
def __init__ (self, bus, engine, datadir, gettext_package):
self.__config = Config(bus, engine, self.on_value_changed)
......@@ -37,7 +45,7 @@ class Setup(object):
prepare_func(option)
self.__window = self.__builder.get_object("setup_dialog")
self.__window.set_title("%s Preferences" % engine.capitalize())
self.__window.set_title(titles[engine])
try:
# Pretend to be a GNOME Control Center dialog if appropriate
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment