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

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


On Aug 13, 2015, at 09:40 AM, Eric V. Smith wrote:

>But I'm not sure how much of this to build in to the f-string machinery.
>gettext.gettext doesn't solve this problem by itself, either.

Our gettext module does have some support for plural forms, but it's probably
not great.

https://docs.python.org/2/library/gettext.html#gettext.GNUTranslations.ngettext

See also for reference:

https://www.gnu.org/software/gettext/manual/html_node/Plural-forms.html

For any built-in machinery such as f-strings we'd want to at least make sure
it's possible to support plural forms.

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/a56e3c39/attachment.sig>


More information about the Python-ideas mailing list