After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 317080 - Incorrect gtk.immodules might make GTK+ lose its translation
Incorrect gtk.immodules might make GTK+ lose its translation
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
2.8.x
Other All
: Normal normal
: Small fix
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2005-09-23 23:00 UTC by Tor Lillqvist
Modified: 2006-12-23 21:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Suggested patch (4.47 KB, patch)
2005-09-23 23:01 UTC, Tor Lillqvist
none Details | Review

Description Tor Lillqvist 2005-09-23 23:00:28 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...)
Comment 1 Tor Lillqvist 2005-09-23 23:01:09 UTC
Created attachment 52578 [details] [review]
Suggested patch
Comment 2 Tor Lillqvist 2006-04-28 08:25:08 UTC
Bug has been confirmed on gtk-list by Andrew E. Makeev.
Comment 3 Matthias Clasen 2006-12-23 21:25:36 UTC
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.