Only require 'other' plural subkey for locales where pluralization rules are undefined#707
Only require 'other' plural subkey for locales where pluralization rules are undefined#707JasonBarnabe wants to merge 1 commit intoruby-i18n:masterfrom
Conversation
…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
| # :one subkey present. | ||
| # - 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 |
There was a problem hiding this comment.
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.
|
Can someone take a look at this? I'm waiting on a decision here to do a release of https://github.com/devise-i18n/devise-i18n. |
|
I'm facing following error on my app with devise-i18n v1.13.0. I believe the error will be occurred in languages that doesn't have singular form like Japanese, Korean and etc. The above error could be solved to pull this pull-request changes, and this changes look makes sense to me. |
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