[Python-Dev] PEP 215 redux: toward a simplified consensus?

Martin v. Loewis martin@v.loewis.de
26 Feb 2002 00:42:41 +0100


Skip Montanaro <skip@pobox.com> writes:

> Just to play the devil's advocate (and ignoring the bit about $-strings not
> being i18n-friendly), I suspect non-programming translators would have just
> as much trouble with something like
> 
>     $"Please confirm your choice of color ($color)..."
> 
> "$color" will look like a word to be translated.  You would have to tell
> them "don't translate anything immediately following a dollar sign up to,
> but not inluding the next character that can't be part of a Python
> identifier."  Seems either a bit error-prone or confusing to me if I pretend
> I'm not a programmer.

Indeed. Therefore, the only true solution is to have an automatic
check that verifies that the translated string has the same inserts as
the original. Such a check could instruct users to follow any
interpolation scheme; even if translators don't know the programming
language of the application, they still are typically capable of
understanding the error messages from msgfmt.

Regards,
Martin