[Sugar-devel] Poll activty translation with gettext

Sebastian Silva sebastian at fuentelibre.org
Tue Sep 5 00:01:23 EDT 2017


Hi Jammily,

I'm glad you managed to complete the full circle.

Perhaps this manual could be of help in the future for further native
language translations that you may want to try:

http://pe.sugarlabs.org/ir/Manual%20de%20Traducci%C3%B3n%20de%20Sugar

Additions to this document are welcome, for instance, the process you
just went thru!

Sugar prides itself in being respectful of local culture as only libre
software could, supporting variety of minority languages often for the
first time.

Contributions of languages are treasured, and a good learning
opportunity for cultural exchange and understanding software freedom by
doing.

So, please remember to submit your updated translations!

Estaremos agradecidos.

Saludos fraternos,

Sebastian


On 04/09/17 12:46, Jammily Ortigoza wrote:
> Hurray! :) I can see the messages translated now!! Thank you!!
>
>
> On Mon, Sep 4, 2017 at 1:15 PM, Walter Bender <walter.bender at gmail.com
> <mailto:walter.bender at gmail.com>> wrote:
>
>     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 <mailto:jortigozaf at gmail.com>> wrote:
>
>
>
>         On Thu, Aug 31, 2017 at 4:20 PM, James Cameron
>         <quozl at laptop.org <mailto: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
>             <http://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/
>             <https://translate.sugarlabs.org/es/>
>             > Poll-Builder/
>             > I'm using the updated Poll.pot
>             from [2]https://github.com/sugarlabs/
>             <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/
>             <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 <mailto: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
>             <mailto: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
>             <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
>             <http://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
>             <http://translate.sugarlabs.org>? 
>             >         >
>             >         > References:
>             >         >
>             >         > [1] [9]http://translate.sugarlabs.org/
>             <http://translate.sugarlabs.org/>
>             >         > [2] [10]http://translate.sugarlabs.org/
>             <http://translate.sugarlabs.org/>
>             >
>             >         > _______________________________________________
>             >         > Sugar-devel mailing list
>             >         > [11]Sugar-devel at lists.sugarlabs.org
>             <mailto:Sugar-devel at lists.sugarlabs.org>
>             >         >
>             [12]http://lists.sugarlabs.org/listinfo/sugar-devel
>             <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
>             <mailto:Sugar-devel at lists.sugarlabs.org>
>             >       
>              [15]http://lists.sugarlabs.org/listinfo/sugar-devel
>             <http://lists.sugarlabs.org/listinfo/sugar-devel>
>             >
>             > --
>             > Jammily Ortigoza
>             >
>             > References:
>             >
>             > [1] https://translate.sugarlabs.org/es/Poll-Builder/
>             <https://translate.sugarlabs.org/es/Poll-Builder/>
>             > [2]
>             https://github.com/sugarlabs/poll-activity/commits/master
>             <https://github.com/sugarlabs/poll-activity/commits/master>
>             > [3] http://translate.sugarlabs.org/
>             <http://translate.sugarlabs.org/>
>             > [4] mailto:walter.bender at gmail.com
>             <mailto:walter.bender at gmail.com>
>             > [5] mailto:quozl at laptop.org <mailto:quozl at laptop.org>
>             > [6]
>             https://github.com/godiard/poll-activity/commit/2a15a50489707063edbabe73da4c13aab438890d
>             <https://github.com/godiard/poll-activity/commit/2a15a50489707063edbabe73da4c13aab438890d>
>             > [7] http://translate.sugarlabs.org/
>             <http://translate.sugarlabs.org/>
>             > [8] http://translate.sugarlabs.org/
>             <http://translate.sugarlabs.org/>
>             > [9] http://translate.sugarlabs.org/
>             <http://translate.sugarlabs.org/>
>             > [10] http://translate.sugarlabs.org/
>             <http://translate.sugarlabs.org/>
>             > [11] mailto:Sugar-devel at lists.sugarlabs.org
>             <mailto:Sugar-devel at lists.sugarlabs.org>
>             > [12] http://lists.sugarlabs.org/listinfo/sugar-devel
>             <http://lists.sugarlabs.org/listinfo/sugar-devel>
>             > [13] http://quozl.netrek.org/
>             > [14] mailto:Sugar-devel at lists.sugarlabs.org
>             <mailto:Sugar-devel at lists.sugarlabs.org>
>             > [15] http://lists.sugarlabs.org/listinfo/sugar-devel
>             <http://lists.sugarlabs.org/listinfo/sugar-devel>
>
>             > _______________________________________________
>             > Sugar-devel mailing list
>             > Sugar-devel at lists.sugarlabs.org
>             <mailto:Sugar-devel at lists.sugarlabs.org>
>             > http://lists.sugarlabs.org/listinfo/sugar-devel
>             <http://lists.sugarlabs.org/listinfo/sugar-devel>
>
>
>             --
>             James Cameron
>             http://quozl.netrek.org/
>
>
>
>
>         -- 
>         Jammily Ortigoza
>
>
>
>
>     -- 
>     Walter Bender
>     Sugar Labs
>     http://www.sugarlabs.org
>
>
>
>
> -- 
> Jammily Ortigoza
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20170904/054ea3ba/attachment-0001.html>


More information about the Sugar-devel mailing list