[meld] bin/meld: Fix missing translations for GTK-loaded resources (#321)
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] bin/meld: Fix missing translations for GTK-loaded resources (#321)
- Date: Sat, 4 May 2019 22:29:36 +0000 (UTC)
commit 0e6230f77941b240744670f010f169d931e697ca
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sun May 5 08:17:51 2019 +1000
bin/meld: Fix missing translations for GTK-loaded resources (#321)
Moving to having template widgets broke translation for those widgets,
because we moved from loading via GtkBuilder with explicit domains from
Python to loading with the domains set in the C library. We'd done
*almost* all the work to bind those, but for some reason hadn't
correctly set `textdomain`.
The Windows libintl change here is purely theoretical; translations
don't work on Windows in the current build, so we can't even test
whether this does the right thing.
bin/meld | 2 ++
1 file changed, 2 insertions(+)
---
diff --git a/bin/meld b/bin/meld
index 6a8ff9eb..ec0e7301 100755
--- a/bin/meld
+++ b/bin/meld
@@ -115,10 +115,12 @@ try:
libintl = cdll.intl
libintl.bindtextdomain(locale_domain, locale_dir)
libintl.bind_textdomain_codeset(locale_domain, 'UTF-8')
+ libintl.textdomain(locale_domain)
del libintl
else:
locale.bindtextdomain(locale_domain, locale_dir)
locale.bind_textdomain_codeset(locale_domain, 'UTF-8')
+ locale.textdomain(locale_domain)
except AttributeError as e:
# Python builds linked without libintl (i.e., OSX) don't have
# bindtextdomain(), which causes Gtk.Builder translations to fail.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]