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

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

Open
broekhuis00 opened this issue Jan 13, 2025 · 0 comments
Open

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

broekhuis00 opened this issue Jan 13, 2025 · 0 comments

Comments

@broekhuis00
Copy link

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.

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

No branches or pull requests

1 participant