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 
What I did was just copy-pasting the i18n init code right before the 
gimp_install_procedure() call, and substituting "N_(...)" with "_(...)", like

  /*  Initialize i18n support  */
  bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
 bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
  textdomain (GETTEXT_PACKAGE);

  gimp_install_procedure (PROCEDURE_NAME,
              "Michael Natterer <[EMAIL PROTECTED]>",
              "Michael Natterer <[EMAIL PROTECTED]>",
              _("Plug-In Template..."),
              "RGB*, GRAY*, INDEXED*",
              G_N_ELEMENTS (args),
              args, NULL);

I don't know if the "N_(...)" call was meant to let it work, but in my system 
"gettex_noop()" is not defined, and "N_(...)" becomes "(...)" (don't know the 
reason of this). It seems to work well now, but I don't know if this procedure 
has any drawbacks (e.g. if initializing i18n twice gives any problem) or is 
incorrect for some reason.

Carlo Baldassi

L'email della prossima generazione? Puoi averla con la nuova Yahoo! Mail: 
Gimp-developer mailing list

Reply via email to