From f309f210d1c6b00bcf08c6e3576f5556a229febf Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 28 Feb 2013 19:22:35 +0000 Subject: [PATCH] [r21488]GrampsLocale: Restore call to locale.bindtextdomain() for GtkBuilder Apparently some Linuxes require it for GtkBuilder to find the localization files. It's not supported on Win32, though, so don't try in that case. svn: r21496 --- gramps/gen/utils/grampslocale.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gramps/gen/utils/grampslocale.py b/gramps/gen/utils/grampslocale.py index 6bd1982a7..0a5f19e25 100644 --- a/gramps/gen/utils/grampslocale.py +++ b/gramps/gen/utils/grampslocale.py @@ -195,6 +195,11 @@ class GrampsLocale(object): os.environ["LANG"] = self.lang os.environ["LANGUAGE"] = ':'.join(self.language) + # GtkBuilder uses GLib's g_dgettext wrapper, which oddly is bound + # with locale instead of gettext. Win32 doesn't support bindtextdomain. + if not win(): + locale.bindtextdomain(self.localedomain, self.localedir) + self.initialized = True