Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only require 'other' plural subkey for locales where pluralization rules are undefined #707

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JasonBarnabe
Copy link

Previously, the 'one' and 'other' subkeys were both required, with the 'zero' subkey being optionally used. This failed for some languages that do not have a 'one' form. All languages have an 'other' form, so make that the only subkey that's required, and turn 'one' into an optional subkey just like 'zero'.

Fixes #706

…les are undefined

Previously, the 'one' and 'other' subkeys were both required, with the 'zero' subkey being optionally used. This failed for some languages that do not have a 'one' form. All languages have an 'other' form, so make that the only subkey that's required, and turn 'one' into an optional subkey just like 'zero'.

Fixes ruby-i18n#706
# - 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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure whether this "not standard" comment means the behaviour is not standard in relation to the CLDR English pluralization rules (because there is a zero subkey) or if there is some sort "generic/unknown locale" rule in CLDR that it's deviating from in some way. If I could get an answer on that I could update the comment to be clearer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Pluralization rules for unknown locales require 'one' and 'other' keys
1 participant