collective / i18ndude

i18ndude performs various tasks related to ZPT's, Python Scripts and i18n.
https://pypi.org/project/i18ndude
4 stars 9 forks source link

Support plural forms #112

Open thet opened 11 months ago

thet commented 11 months ago

Since zope.i18n 4.5.0 [1] and zope.i18nmessageid 4.3.0 [2] we have support for plural messageids and default translations. It works like this:

        items = [1, 2, 3]
        title = _(
            "example_title",
            default="This is my example title."
            msgid_plural="example_title__plural",
            default_plural="This are my example titles."
            number=len(items),
        )

i18ndude cannot extract the plural forms yet.

[1] https://github.com/zopefoundation/zope.i18n/issues/5 [2] https://github.com/zopefoundation/zope.i18nmessageid/blob/master/src/zope/i18nmessageid/message.py#L108

mauritsvanrees commented 11 months ago

That would indeed be nice. I currently have no plans to work on this myself, but happy to review a PR.