Re: [Gimp-developer] I18N in Python plugin
I've added i18n/gettext support to my plug-in over the weekend. I don't know if it's completely correct, but it does work. :) You can get it from here http://ragnarb.com/toolbox/gimp-book/ and have a look at the code. The translation code is at the beginning of booy.py, and each string to be translated is simply wrapped like this _("string here"). There is a ReadMe file in the locale folder, plus some helper shell scripts for setting up the different languages, you can look at. Hope that helps. Cheers, Ragnar ___ gimp-developer-list mailing list gimp-developer-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-developer-list
Re: [Gimp-developer] I18N in Python plugin
I found this readme, that might help. http://developer.gimp.org/README.i18n This is of interest for plug-in development " Third-party plug-ins (plug-ins that are not distributed with GIMP) can't have their messages in the gimp-std-plugins textdomain. We have therefore provided a mechanism that allows plug-ins to install their own message catalogs and tell GIMP to bind to that textdomain. This is necessary so that GIMP can correctly translate the menu paths the plug-in registers. Basically the plug-in has to call gimp_plugin_domain_add() or gimp_domain_plugin_add_with_path() before it registers any functions. Have a look at the script-fu plug-in to see how this is done in detail. " Ragnar On Thu, May 30, 2013 at 9:40 PM, Ragnar Brynjúlfsson wrote: > I was just going to ask the same question. I've started implementing this > in my Gimp Book plug-in, following this > http://wiki.maemo.org/Internationalize_a_Python_application guide, but > haven't got it working yet, and have no idea what I'm doing wrong. > > What would be the correct way to go about translating a Python plug-in? > > Where do the .mo files, and how can I make sure my plug-in finds them? > > Cheers, > > Ragnar > > ___ gimp-developer-list mailing list gimp-developer-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-developer-list
Re: [Gimp-developer] I18N in Python plugin
I was just going to ask the same question. I've started implementing this in my Gimp Book plug-in, following this http://wiki.maemo.org/Internationalize_a_Python_application guide, but haven't got it working yet, and have no idea what I'm doing wrong. What would be the correct way to go about translating a Python plug-in? Where do the .mo files, and how can I make sure my plug-in finds them? Cheers, Ragnar ___ gimp-developer-list mailing list gimp-developer-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-developer-list
[Gimp-developer] I18N in Python plugin
What is the right/best/officially blessed way to handle I18N in Python plugins? Or asked differently, what can I do in my code so that someone can make the plugin usable in other languages without having to update the code? ___ gimp-developer-list mailing list gimp-developer-list@gnome.org https://mail.gnome.org/mailman/listinfo/gimp-developer-list