[sugar] i18n for python with gettext

Marco Pesenti Gritti mpg
Wed Jun 20 17:40:10 EDT 2007

Julius B. Lucks wrote:
> Hi All,
> There has been some recent discussion about i18n and activities.  
> Using the python gettext module, I set up i18n in Kuku, and put up 
> some notes at http://wiki.laptop.org/go/Python_i18n .  It looks like 
> there is a bit of code that needs to be in each activity, such as some 
> logic for determining which language to localize to, and pulling the 
> correct .mo file for it. etc.  Is it appropriate to put this code in 
> some sugar module (sugar.i10n for example?) so that all activity 
> developers have to do is wrap strings in _(), create the .pot/.po/.mo 
> files, and do something like (suggested by mncharity)
> from sugar import i10n
> i10n.install()
> ?
> Is there already something like this?

The default activity wrapper should already setup stuff correctly... 
Also bundlebuilder has support for generating .pot, creating the .mo 
etc. See how that's done in the web-activity and if there is something 
missing please let us know.


More information about the Sugar-devel mailing list