[Localization] Fwd: [sugar] Translation advice for Pippy.

Rafael Enrique Ortiz Guerrero dirakx at gmail.com
Sat Dec 8 14:25:42 EST 2007


---------- Forwarded message ----------
From: Chris Ball <cjb at laptop.org>
Date: Dec 8, 2007 2:26 PM
Subject: [sugar] Translation advice for Pippy.
To: sugar at laptop.org


Hi!

I'd like to make code comments in Pippy examples translatable,
especially since so many of our deployments have Spanish as a
first language.  Here's one example of what an on-disk format
could look like:

  # The next comment is localised.
  ##en: Pippy example comment
  ##es: Pippy ejemplo comentario
  a = 5

In the Pippy view, the user would see either "# Pippy example" or
"# Pippy ejemplo comentario" for that line, depending on their locale.

That's the kind of workflow I'd like, however it would be nice to tie in
to our existing Pootle/gettext infrastructure.  Does anyone have an idea
for how to do that?  Here's one way I can think of:

  # The next comment is localised.
  ##cid: example1

and then in Pippy, when reading the Python example from disk, we can
look for "##cid:" and print the localised gettext string that matches
that ("example1") tag.  The disadvantage is that a confusing mapping
of comment tags to comment strings has to be maintained -- unless the
English string itself becomes the tag?  I don't have much intuition
about the best way to hook up gettext.

Do these sound reasonable?  More importantly, with my time spoken for
by power manager work lately, would anyone like to help with getting
the basic infrastructure up?  :)

Thanks!

- Chris.
--
Chris Ball   <cjb at laptop.org>
_______________________________________________
Sugar mailing list
Sugar at lists.laptop.org
http://lists.laptop.org/listinfo/sugar



-- 
Rafael Enrique Ortiz Guerrero
One Laptop Per Child
rafael at laptop.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/localization/attachments/20071208/0db7cc0e/attachment.htm 


More information about the Localization mailing list