[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
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/
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] 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