[Python-ideas] Fix the DRY problem (was Re: PEP 501 - i18n with marked strings)

Barry Warsaw barry at python.org
Thu Aug 13 16:00:42 CEST 2015


On Aug 13, 2015, at 07:58 AM, Eric V. Smith wrote:

>The one downside of this is that the strings that the translator is
>translating from do not appear in the source code. The translator would
>have to know that the string being translated is:
>"My name is {0}, my dog's name is {1}"

I think unfortunately, this is a non-starter for the i18n use case.  The
message catalog must include the source string as it appears in the code
because otherwise, translators will not be able to reliably map the intended
meaning to their native language.  They'll have to keep a mental map between
source string placeholders and numeric placeholders, and I am fairly confident
that this will be a source of broken translations.

Is there a problem with keeping the named placeholders throughout the entire
stack?

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20150813/99effeec/attachment.sig>


More information about the Python-ideas mailing list