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

Alexander Walters tritium-list at sdamon.com
Thu Aug 13 15:42:56 CEST 2015


On 8/13/2015 08:23, MRAB wrote:
> I think that looking up only the translation string and then inserting
> the values isn't good enough.
>
> For example, what if the string was "Found {0} matches"?
>
> If the number of matches was 1, you'd get "Found 1 matches".
>
> Ideally, you'd want to pass the values too, so that the lookup could 
> pick the correct translation.
>
> [snip]
>

Why would we solve this on new-formatting, but not in old-formatting 
when doing i18n?  You have identified an existing problem 
(pluralization), the solutions to which would also work to solve the 
problem under consideration.


More information about the Python-ideas mailing list