GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Currently with the ActionView::Helpers::TextHelper#pluralize method, we can't deal with the specific language rule about the zero value. For instance, in french, we use the singular form with the zero value:
This pull request tries to solve this problem.
Change ActionView::Helpers::TextHelper#pluralize to return the singul…
…ar form of a word if the count is 0 and the last argument to true.
Thanks for your patch. I'm pretty sure this will be rejected, you should rely on I18n instead (see for instance #8620 and this stackoverflow post) but I may be wrong so let's wait some feedback.
I believe this is properly tackled by I18n gem. The issue is that this pull request solves the issue for french (and possibly a couple of other languages), but it doesn't solve the underlying issue of pluralization. For example, languages that pluralize with singular, few, and many still won't be supported.
I had not taken this into account, thank you for your reply. 😄