On Tue, 2007-11-06 at 08:36 +0000, Carlo Baldassi wrote:

> I have developed a GIMP plugin using the plugin template, and I have
> been made aware of a problem in i18n support, which I think I solved:
> the plugin name was not translated correctly in the menu.
> I think this is due to the fact that i18n is initialized in the run()
> function, while the plugin name is given in the query() function
> through a call to gimp_install_procedure()..
> What I did was just copy-pasting the i18n init code right before the
> gimp_install_procedure() call, and substituting "N_(...)" with
> "_(...)", like this:

This is not the correct solution. Instead the plug-in is supposed to use
gimp_plugin_domain_register() to tell the GIMP core about the textdomain
that the plug-in uses for translation. The core will then be able to
translate the menu entry.

The rationale behind this is that the GIMP core needs to know the
untranslated strings to correctly handle stuff like menu branches.

BTW, it would be nice if we could release an updated version of
gimp-plugin-template for GIMP 2.4. Any volunteers to update the template
in SVN?


Gimp-developer mailing list

Reply via email to