i18n
https://github.com/svenfuchs/i18n
Ruby
Internationalization (i18n) library for Ruby
I18n::Backend::Base#pluralize
Picks a translation from a pluralized mnemonic subkey according to English pluralization rules : - It will pick the :one subkey if count is equal to 1. - It will pick the :other subkey otherwise. - It will pick the :zero subkey in the special case where count is equal to 0 and there is a :zero subkey present. This behaviour is not stand with regards to the CLDR pluralization rules. Other backends can implement more flexible or complex pluralization rules.
Edit
git clone [email protected]:svenfuchs/i18n.git
cd i18n
open lib/i18n/backend/base.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-I18n--Backend--Base-pluralize-for-pr
# Commit to gitgit add lib/i18n/backend/base.rbgit commit -m "better docs for I18n::Backend::Base#pluralize"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-I18n--Backend--Base-pluralize-for-pr
hub pull-request
# Celebrate!