diff options
author | fujiwarat <takao.fujiwara1@gmail.com> | 2012-03-23 11:40:29 +0900 |
---|---|---|
committer | fujiwarat <takao.fujiwara1@gmail.com> | 2012-03-23 11:40:29 +0900 |
commit | ceaeb86d9b7c5d8674151c863551564a15c0924f (patch) | |
tree | 2c8e5820d183a0da4486fdeacd185ca42b825500 | |
parent | b8c12964e9d14b8a15ef55b2f9ae23bf1592d6ee (diff) | |
download | ibus-ceaeb86d9b7c5d8674151c863551564a15c0924f.tar.gz |
Enable bindtextdomain in ibus-ui-gtk3.
TEST=Linux desktop
Review URL: https://codereview.appspot.com/5876049
-rw-r--r-- | configure.ac | 3 | ||||
-rw-r--r-- | ui/gtk3/Makefile.am | 1 | ||||
-rw-r--r-- | ui/gtk3/application.vala | 5 |
3 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 1c4b2831..4c8b7f90 100644 --- a/configure.ac +++ b/configure.ac @@ -105,6 +105,9 @@ GETTEXT_PACKAGE=ibus10 AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [The prefix for out gettext translation domains.]) +GLIB_DEFINE_LOCALEDIR(GLIB_LOCALE_DIR) +GLIB_LOCALE_DIR=$localedir +AC_SUBST(GLIB_LOCALE_DIR) # For dislpay date. m4_define(ibus_datedisplay, diff --git a/ui/gtk3/Makefile.am b/ui/gtk3/Makefile.am index 0fb9d3c6..87a7373d 100644 --- a/ui/gtk3/Makefile.am +++ b/ui/gtk3/Makefile.am @@ -50,6 +50,7 @@ AM_CFLAGS = \ @X11_CFLAGS@ \ $(INCLUDES) \ -DGETTEXT_PACKAGE=\"@GETTEXT_PACKAGE@\" \ + -DGLIB_LOCALE_DIR=\"@GLIB_LOCALE_DIR@\" \ -DG_LOG_DOMAIN=\"IBUS\" \ -DPKGDATADIR=\"$(pkgdatadir)\" \ -DLIBEXECDIR=\"$(libexecdir)\" \ diff --git a/ui/gtk3/application.vala b/ui/gtk3/application.vala index 280da57a..d49deb4d 100644 --- a/ui/gtk3/application.vala +++ b/ui/gtk3/application.vala @@ -24,12 +24,17 @@ using IBus; using GLib; using Gtk; +public extern const string GETTEXT_PACKAGE; +public extern const string GLIB_LOCALE_DIR; + class Application { private IBus.Bus m_bus; private Panel m_panel; private IBus.Config m_config; public Application(string[] argv) { + GLib.Intl.bindtextdomain(GETTEXT_PACKAGE, GLIB_LOCALE_DIR); + GLib.Intl.bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); IBus.init(); Gtk.init(ref argv); |