[Sugar-devel] Poll activty translation with gettext

Jammily Ortigoza jortigozaf at gmail.com
Tue Aug 29 11:56:16 EDT 2017

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

With the POTFILE.in I generated the .pot file:

$python setup.py genpot
$ls $HOME/Activities/Poll.activity/po

Following, I generated the es.po file:

$msginit -l es
$ls $HOME/Activities/Poll.activity/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/

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?


Jammily Ortigoza

[1] http://wiki.laptop.org/go/Internationalization_in_Sugar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20170829/42af51f2/attachment.html>

More information about the Sugar-devel mailing list