<br><br><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Chris Ball</b> <<a href="mailto:cjb@laptop.org">cjb@laptop.org</a>><br>Date: Dec 8, 2007 2:26 PM<br>Subject: [sugar] Translation advice for Pippy.
<br>To: <a href="mailto:sugar@laptop.org">sugar@laptop.org</a><br><br><br>Hi!<br><br>I'd like to make code comments in Pippy examples translatable,<br>especially since so many of our deployments have Spanish as a<br>first language. Here's one example of what an on-disk format
<br>could look like:<br><br> # The next comment is localised.<br> ##en: Pippy example comment<br> ##es: Pippy ejemplo comentario<br> a = 5<br><br>In the Pippy view, the user would see either "# Pippy example" or
<br>"# Pippy ejemplo comentario" for that line, depending on their locale.<br><br>That's the kind of workflow I'd like, however it would be nice to tie in<br>to our existing Pootle/gettext infrastructure. Does anyone have an idea
<br>for how to do that? Here's one way I can think of:<br><br> # The next comment is localised.<br> ##cid: example1<br><br>and then in Pippy, when reading the Python example from disk, we can<br>look for "##cid:" and print the localised gettext string that matches
<br>that ("example1") tag. The disadvantage is that a confusing mapping<br>of comment tags to comment strings has to be maintained -- unless the<br>English string itself becomes the tag? I don't have much intuition
<br>about the best way to hook up gettext.<br><br>Do these sound reasonable? More importantly, with my time spoken for<br>by power manager work lately, would anyone like to help with getting<br>the basic infrastructure up? :)
<br><br>Thanks!<br><br>- Chris.<br><font color="#888888">--<br>Chris Ball <<a href="mailto:cjb@laptop.org">cjb@laptop.org</a>><br>_______________________________________________<br>Sugar mailing list<br><a href="mailto:Sugar@lists.laptop.org">
Sugar@lists.laptop.org</a><br><a href="http://lists.laptop.org/listinfo/sugar" target="_blank">http://lists.laptop.org/listinfo/sugar</a><br></font></div><br><br clear="all"><br>-- <br>Rafael Enrique Ortiz Guerrero <br>One Laptop Per Child
<br><a href="mailto:rafael@laptop.org">rafael@laptop.org</a>