[Sugar-devel] [Fwd: [PATCH] use the spanish verb "quitar" for unmounting devices]
Bernie Innocenti
bernie at codewiz.org
Wed May 19 20:07:59 EDT 2010
El Tue, 18-05-2010 a las 12:30 +0200, Tomeu Vizoso escribió:
> On Mon, May 17, 2010 at 23:07, Bernie Innocenti <bernie at codewiz.org> wrote:
> > In both cases, we need to make the strings distinct in the code.
> > In C, I'd specify the context in which the string is used, like so:
> >
> > pgettext("Device Icon", "Remove")
> >
> > However, Python's gettext module does not yet support pgettext():
> >
> > http://bugs.python.org/issue2504
> >
> > How is this handled in Sugar?
>
> You can add some context to a string with a TRANS: comment.
It's not just a problem of providing context to the human translators:
the english string "Remove" will be merged with other identical strings
throughout the UI which have different semantic meaning.
For example, "Remove" on the activity icon really means "Borrar", not
"Quitar" or "Extraer". To solve this ambiguity, gettext provides a
function with an additional hidden string used only to discriminate the
context.
I followed up the Python bug asking for possible work-arounds.
--
// Bernie Innocenti - http://codewiz.org/
\X/ Sugar Labs - http://sugarlabs.org/
More information about the Sugar-devel
mailing list