test:
$(ENV) DBUS_DEBUG=true \
IBUS_PREFIX=@prefix@ \
+ IBUS_DATAROOTDIR=@datarootdir@ \
+ IBUS_LOCALEDIR=@localedir@ \
PYTHONPATH=$(top_srcdir) \
$(PYTHON) $(srcdir)/main.py
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+datarootdir=@datarootdir@
export IBUS_PREFIX=@prefix@
+export IBUS_DATAROOTDIR=@datarootdir@
+export IBUS_LOCALEDIR=@localedir@
+
exec python @prefix@/share/ibus/ui/gtk/main.py $@
import getopt
import ibus
import gtk
-import locale
+import gettext
import panel
import notifications
launch_panel()
if __name__ == "__main__":
- locale.bind_textdomain_codeset("ibus", "UTF-8")
+ localedir = os.getenv("IBUS_LOCALEDIR")
+ gettext.bindtextdomain("ibus", localedir)
+ gettext.bind_textdomain_codeset("ibus", "UTF-8")
main()