Skip to content

Bug - plural_forms? does not see '0' and '1' as plural keys. #610

Closed
@broekhuis00

Description

@broekhuis00

Problem

I18n has special cases for '0' and '1'. However, it causes the parent not be seen as a plural node. And thus CLDR category keys are incorrectly marked as missing in languages that do not need them:

https://github.com/glebm/i18n-tasks/blob/36af58c8884a8dbdaee0e02551280baaa7191c76/lib/i18n/tasks/plural_keys.rb#L55C1-L55C75

Solution

When using these special keys, they themselves should still be marked as missing if a locale does not have them. This means adding them to CLDR_CATEGORY_KEYS would not be the correct solution. The issue lies in that should still cause the parent to be seen as plural node. Therefor the best option should be to add a check to plural_suffix? for these two special cases.

If there is a better solution, feel free to comment it.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions