[Sugar-devel] Poll activty translation with gettext

James Cameron quozl at laptop.org
Tue Aug 29 13:59:46 EDT 2017


http://wiki.laptop.org/go/Internationalization_in_Sugar is deprecated.

Poll activity is translated using translate.sugarlabs.org.

What are you trying to do?

Why not upload translations to translate.sugarlabs.org?

https://github.com/sugarlabs/poll-activity/commits/master shows
updated POT file and new translations 23 days ago.

https://translate.sugarlabs.org/projects/Poll-Builder/ shows new
translations only for Guaraní (Paraguay).

On Tue, Aug 29, 2017 at 11:56:16AM -0400, Jammily Ortigoza wrote:
> Hi everybody,
> 
> I'm trying to translate Poll activity using gettext. I followed this tutorial
> [1].
> 
> I have my POTFILE.in.
> 
> >> cat POTFILES.in 
> encoding: UTF-8
> PollSession.py
> poll.py
> Widgets.py
> 
> With the POTFILE.in I generated the .pot file:
> 
> $pwd
> $HOME/Activities/Poll.activity
> $python setup.py genpot
> $ls $HOME/Activities/Poll.activity/po 
> Poll.pot
> 
> Following, I generated the es.po file:
> 
> $msginit -l es
> $ls $HOME/Activities/Poll.activity/po 
> es.po
> 
> The es.po file is ok, I can see all the messages to be translated. I did the
> translation an after that I did the last step:
> 
> msgfmt es.po --output='../locale/es/LC_MESSAGES/[1]
> org.worldwideworkshop.PollBuilder.mo'
> 
> Almost all translations work except the ones with the "%s" in the msgid.
> For example:
> 
> #: poll.py:367
> #, python-format
> msgid "Do you want delete the poll \"%s\"?"
> msgstr "Desea eliminar la encuesta \"%s\"?" 
> 
> This is still showing in english when I open Poll activity. 
> 
> Does somebody know what am I doing wrong?
> 
> Regards.
> 
> --
> Jammily Ortigoza
> 
> [1] [2]http://wiki.laptop.org/go/Internationalization_in_Sugar
> 
> References:
> 
> [1] http://org.worldwideworkshop.pollbuilder.mo/
> [2] http://wiki.laptop.org/go/Internationalization_in_Sugar

> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel


-- 
James Cameron
http://quozl.netrek.org/


More information about the Sugar-devel mailing list