[Sugar-devel] Poll activty translation with gettext

James Cameron quozl at laptop.org
Tue Aug 29 18:54:47 EDT 2017


On Tue, Aug 29, 2017 at 03:47:10PM -0400, Jammily Ortigoza wrote:
> 
> On Tue, Aug 29, 2017 at 1:59 PM, James Cameron <[1]quozl at laptop.org> wrote:
> 
>     [2]http://wiki.laptop.org/go/Internationalization_in_Sugar is deprecated.
> 
>     Poll activity is translated using [3]translate.sugarlabs.org.
> 
>     What are you trying to do?
> 
>     Why not upload translations to [4]translate.sugarlabs.org?
> 
>     [5]https://github.com/sugarlabs/poll-activity/commits/master shows
>     updated POT file and new translations 23 days ago.
> 
> I want to translate the missing messages.
> 
> I can see the updated POT file, but the es.po file is still not updated with
> all the strings (msgid) inside the POT file.
> 
> As you can see, Poll is fully translated for "es" in [6]translate.sugarlabs.org
> but it has missing strings due to staled es.po file. What is the procedure to
> update es.po file with latest changes based in POT file into [7]
> translate.sugarlabs.org? 

Chris Leonard should be able to help.  He will upload the new POT file.

> 
>     [8]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]
>     > [9]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][10]http://wiki.laptop.org/go/Internationalization_in_Sugar
>     >
>     > References:
>     >
>     > [1] [11]http://org.worldwideworkshop.pollbuilder.mo/
>     > [2] [12]http://wiki.laptop.org/go/Internationalization_in_Sugar
> 
>     > _______________________________________________
>     > Sugar-devel mailing list
>     > [13]Sugar-devel at lists.sugarlabs.org
>     > [14]http://lists.sugarlabs.org/listinfo/sugar-devel
>    
> 
>     --
>     James Cameron
>     [15]http://quozl.netrek.org/
> 
> Regards.
> 
> --
> Jammily Ortigoza
> 
> References:
> 
> [1] mailto:quozl at laptop.org
> [2] http://wiki.laptop.org/go/Internationalization_in_Sugar
> [3] http://translate.sugarlabs.org/
> [4] http://translate.sugarlabs.org/
> [5] https://github.com/sugarlabs/poll-activity/commits/master
> [6] http://translate.sugarlabs.org/
> [7] http://translate.sugarlabs.org/
> [8] https://translate.sugarlabs.org/projects/Poll-Builder/
> [9] http://org.worldwideworkshop.pollbuilder.mo/
> [10] http://wiki.laptop.org/go/Internationalization_in_Sugar
> [11] http://org.worldwideworkshop.pollbuilder.mo/
> [12] http://wiki.laptop.org/go/Internationalization_in_Sugar
> [13] mailto:Sugar-devel at lists.sugarlabs.org
> [14] http://lists.sugarlabs.org/listinfo/sugar-devel
> [15] http://quozl.netrek.org/

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


More information about the Sugar-devel mailing list