[Sugar-devel] Poll activty translation with gettext

Walter Bender walter.bender at gmail.com
Mon Sep 4 13:15:34 EDT 2017


In looking at the code, there is at least one of the strings that appears
to be malformed.

        alert.props.msg = _('Do you want delete the poll "%s"?' % title)

This should probably be:

        alert.props.msg = _('Do you want delete the poll "%s"?') % title

I didn't notice any other issues, but didn't look too closely.

-walter


On Mon, Sep 4, 2017 at 10:12 AM, Jammily Ortigoza <jortigozaf at gmail.com>
wrote:

>
>
> On Thu, Aug 31, 2017 at 4:20 PM, James Cameron <quozl at laptop.org> wrote:
>
>> What if you read the messages after installing the .xo file; do the
>> new translations appear?
>
>
>> cd ~/Activities/Poll.activity
>> msgunfmt locale/es/LC_MESSAGES/org.worldwideworkshop.PollBuilder.mo
>
>
> Yes, they appear.
>
>
>>
>>
>> For me, testing with Fedora 18, the new translations are missing, even
>> after repeating "python setup.py build".
>>
>
> Yes, I'm using Fedora 18.
>
>
>>
>> On Thu, Aug 31, 2017 at 11:42:33AM -0400, Jammily Ortigoza wrote:
>> > Yes, in that specific line that I mentioned, they are the same.
>> >
>> > However, I downloaded the es.po from [1]https://translate.sugarlabs
>> .org/es/
>> > Poll-Builder/
>> > I'm using the updated Poll.pot from [2]https://github.com/sugarlabs/
>> > poll-activity/commits/master) and I did what Sebastian's said:
>> >
>> >   msgmerge -U es.po Poll.pot
>> >
>> > I translated the missing messages and generate the .xo file.
>> >
>> > But still the same, the messages with % are not been translated.
>> >
>> > I did the same with Finance activity, I just didn't add any translation
>> because
>> > the es.po from [3]https://translate.sugarlabs.org/es/Finance/ is
>> complete. I
>> > generated the .xo file, installed it and the translation worked
>> (messages with
>> > % also).
>> >
>> > On Thu, Aug 31, 2017 at 9:08 AM, Walter Bender <[4]
>> walter.bender at gmail.com>
>> > wrote:
>> >
>> >     Back to the original question, is the msgid after running genpot
>>  the same
>> >     as what you tried to add  by hand?
>> >
>> >     On Aug 30, 2017 1:11 AM, "James Cameron" <[5]quozl at laptop.org>
>> wrote:
>> >
>> >         Thanks.  I didn't know how to do that!
>> >
>> >         POT file is already up to date, it is the es.po file that is
>> not.
>> >
>> >         Committed as
>> >         [6]https://github.com/godiard/poll-activity/commit/2a15a5048970
>> >         7063edbabe73da4c13aab438890d
>> >
>> >         On Tue, Aug 29, 2017 at 10:50:35PM -0500, Sebastian Silva wrote:
>> >         > Hi!
>> >         >
>> >         > We should strive to let contributors help without bottlenecks.
>> >         >
>> >         > For what is worth, you can obtain a new pot file with the
>> command
>> >         `python
>> >         > setup.py genpot` when you run it in the activity directory.
>> >         >
>> >         > Then, you will need to merge the untranslated `.pot` strings
>> into the
>> >         already
>> >         > translated `es.po`.
>> >         >
>> >         > This can be done with `msgmerge -U es.po Poll.pot` (assuming
>> >         Poll.pot) is the
>> >         > file generated in the previous step.
>> >         >
>> >         > Then you could make a pull request with the updated pot and
>> po files.
>> >         >
>> >         > Hope this helps!
>> >         >
>> >         > Sebastian
>> >         >
>> >         > On 29/08/17 14:47, Jammily Ortigoza wrote:
>> >         >
>> >         >     As you can see, Poll is fully translated for "es" in [1]
>> >         >     [7]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 [2][8]translate.sugarlabs.org?
>> >         >
>> >         > References:
>> >         >
>> >         > [1] [9]http://translate.sugarlabs.org/
>> >         > [2] [10]http://translate.sugarlabs.org/
>> >
>> >         > _______________________________________________
>> >         > Sugar-devel mailing list
>> >         > [11]Sugar-devel at lists.sugarlabs.org
>> >         > [12]http://lists.sugarlabs.org/listinfo/sugar-devel
>> >
>> >         --
>> >         James Cameron
>> >         [13]http://quozl.netrek.org/
>> >         _______________________________________________
>> >         Sugar-devel mailing list
>> >         [14]Sugar-devel at lists.sugarlabs.org
>> >         [15]http://lists.sugarlabs.org/listinfo/sugar-devel
>> >
>> > --
>> > Jammily Ortigoza
>> >
>> > References:
>> >
>> > [1] https://translate.sugarlabs.org/es/Poll-Builder/
>> > [2] https://github.com/sugarlabs/poll-activity/commits/master
>> > [3] http://translate.sugarlabs.org/
>> > [4] mailto:walter.bender at gmail.com
>> > [5] mailto:quozl at laptop.org
>> > [6] https://github.com/godiard/poll-activity/commit/2a15a5048970
>> 7063edbabe73da4c13aab438890d
>> > [7] http://translate.sugarlabs.org/
>> > [8] http://translate.sugarlabs.org/
>> > [9] http://translate.sugarlabs.org/
>> > [10] http://translate.sugarlabs.org/
>> > [11] mailto:Sugar-devel at lists.sugarlabs.org
>> > [12] http://lists.sugarlabs.org/listinfo/sugar-devel
>> > [13] http://quozl.netrek.org/
>> > [14] mailto:Sugar-devel at lists.sugarlabs.org
>> > [15] http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>> > _______________________________________________
>> > Sugar-devel mailing list
>> > Sugar-devel at lists.sugarlabs.org
>> > http://lists.sugarlabs.org/listinfo/sugar-devel
>>
>>
>> --
>> James Cameron
>> http://quozl.netrek.org/
>>
>
>
>
> --
> Jammily Ortigoza
>



-- 
Walter Bender
Sugar Labs
http://www.sugarlabs.org
<http://www.sugarlabs.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20170904/fa5a9c8c/attachment.html>


More information about the Sugar-devel mailing list