Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> it's up to its users to avoid `PluralForm.get`ting phrases which already tell you the quantity.

You mean one should not use `PluralForm.get` to generate snippets of the form "0 pages", "1 page", "2 pages"? Because if that's what you mean, you are directly contradicting all of the examples on the page.



All the concrete examples on the page are English — so they use plural forms when English does.

That said, my wording did needlessly assume one of two approaches. The 'downloads' example shows both.

PluralForm is often called at the whole-phrase level, for all languages, rather than as at an 'atomic' level, at the points where specific languages pluralise things. This contrast is shown in the 'downloads' example.

In this use pattern, the correct approach is to write the same thing twice, if the 'plural form' of the matches the singular one.

This pops up in English too. For instance, chrome://browser/locale/downloads/downloads.properties contains:

shortHours=h;h

shortMinutes=m;m

shortSeconds=s;s

And a multiplayer game might need

ready=Are You Ready?;Are You Ready?

As most languages have a singular 'you'.


> All the concrete examples on the page are English — so they use plural forms when English does.

... which are all cases where Hungarian doesn't use the plural, which is why Hungarian shouldn't be in the same group as English.

> In this use pattern, the correct approach is to write the same thing twice, if the 'plural form' of the matches the singular one.

... except if the plural form always matches the singular one, in which case the correct approach is to write the thing once. Category #0.

Thanks for your efforts, but you have clarified nothing with regards to Hungarian.


> except if the plural form always matches the singular one

Hungarian has plural forms which are distinct from the singular. https://en.wikipedia.org/wiki/Hungarian_noun_phrase

Otherwise, yeah, they'd be in group 0.


> you have clarified nothing with regards to Hungarian.

Well, except the "are you ready" example. That is indeed one case where it might make sense to use different Hungarian forms.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: