[sugar] Translation advice for Pippy.
Chris Ball
cjb
Sat Dec 8 14:26:36 EST 2007
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>
More information about the Sugar-devel
mailing list