GNOME Bugzilla – Bug 307756
fix internationalization of gimppropwidgets
Last modified: 2005-06-26 18:09:51 UTC
Distribution/Version: Debian Sid Select the preference dialog Select an entry where there is a checkbox (i.e. pictures window == "Fenêtre d'images" in French) Move the mouse over an iter (i.e. Resize the window after a zoom == "Redimensionner la fenêtre après un zoom") The tootip: "When enabled, the image window..." is displayed in ENglish language even if it is translated in the fr.po file Regards Jean-Luc
Yes, this still needs to be fixed after the move of gimppropwidgets.c to libgimpwidgets. In libgimpwidgets gettext() is redefined to dgettext. So we are looking up the strings in the wrong translation domain.
The easiest way to change this is to change N_() to _() in app/config/gimprc-blurbs.h and to remove the calls to gettext() from gimppropwidgets.c. The problem with this approach is that we want the autogenerated gimprc manpage and the automatically documented systemwide gimprc file to be in english, no matter what locale was used when compiling gimp. It should be trivial to ensure that, we just need to fiddle with the locale when creating these files. Any better suggestions, anyone?
A general solution for the propwidgets would be to attach the translation domain to the object the properties belong to, we could even use the existing gimp_type_set_translation_domain() API from libgimpbase.
Created attachment 47856 [details] [review] patch to implement the simple solution
Adding gimp_type_set_translation_domain (type, GETTEXT_PACKAGE); for each and every type that registers a paramspec with translatable blurb seems rather error-prone since it is easy to forget. Could this be automated somehow? Perhaps by changing the GIMP_CONFIG_INSTALL_PROP macros?
Actually, it isn't all that complicated. Mitch and me had the idea on how to fix this last night over a few beers... 2005-06-26 Sven Neumann <sven@gimp.org> * libgimpwidgets/gimppropwidgets.c: use dgettext() instead of gettext() and try to obtain the translation domain from the type. Fixes i18n of tooltips on property widgets (bug #307756). * libgimpconfig/gimpcolorconfig.c: set a translation domain.