GNOME Bugzilla – Bug 317080
Incorrect gtk.immodules might make GTK+ lose its translation
Last modified: 2006-12-23 21:25:36 UTC
If one of the input modules listed in gtk.immodules uses the same translation domain as GTK+ ("gtk20") but specifies a different locale directory, gtk_im_multicontext_append_menuitems() will gladly call bindtextdomain("gtk20", "/whatever/random/directory"). If there then actually is a message catalog for "gtk20" there in the relevant language/LC_MESSAGES subdirectory, which isn't one for GTK+ (or for the wrong GTK+ version), GTK+ will lose its translations and start using English. This could happen with 3rd-party input modules that misguidedly use the same translation domain as GTK+ ("gtk20") but are installed in a different location. Or if somebody misedits the gtk.immodules file. Btw, why do some of the included input modules use the translation domain "gtk+"? Shouldn't this be changed to "gtk20"? Also, I think if the domain_dirname is empty or NULL, this should mean "look for the translation in GTK+'s message catalog"? Will attach a patch to gtkimmulticontext.c. (I might have overdone it a bit and check for all possible odd combinations...)
Created attachment 52578 [details] [review] Suggested patch
Bug has been confirmed on gtk-list by Andrew E. Makeev.
2006-12-23 Matthias Clasen <mclasen@redhat.com> * gtk/gtkimmulticontext.c: Be careful to not override GTK+ translations with the translations of the input method. (#317080, Tor Lillqvist) * modules/input/imcedilla.c: Use standard macros for translation domain and locale dir.