Hi,
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:
/* Initialize i18n support */
bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
#ifdef HAVE_BIND_TEXTDOMAIN_CODESET
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#endif
textdomain (GETTEXT_PACKAGE);
gimp_install_procedure (PROCEDURE_NAME,
"Blurb",
"Help",
"Michael Natterer <[EMAIL PROTECTED]>",
"Michael Natterer <[EMAIL PROTECTED]>",
"2000-2004",
_("Plug-In Template..."),
"RGB*, GRAY*, INDEXED*",
GIMP_PLUGIN,
G_N_ELEMENTS (args),
0,
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:
http://it.docs.yahoo.com/nowyoucan.html
_______________________________________________
Gimp-developer mailing list
Gimp-developer@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer