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

Plurals don't work without red-datasets gem #93

Open
MichaelHoste opened this issue Feb 1, 2022 · 1 comment
Open

Plurals don't work without red-datasets gem #93

MichaelHoste opened this issue Feb 1, 2022 · 1 comment

Comments

@MichaelHoste
Copy link
Contributor

MichaelHoste commented Feb 1, 2022

It's a bit like #87 but in production too.

Since red-datasets is not included as runtime dependency, plural forms of languages are now always ignored by default: https://github.com/ruby-gettext/gettext/blob/master/lib/gettext/tools/msginit.rb#L382

I'm not sure it was voluntary because that's a big change for a minor version.

Shouldn't we explicitly tell that red-datasets is mandatory for plural management in the "installation" part of the README?

Or maybe find a better way to manage plurals? I don't really like the fact that plural rules could change without any manual update of this gem (plural rules are now parsed live).

Also, there are some parsing issue with specific languages that I'm not sure have been fixed:

A hash containing all plurals, bundled with this gem, would certainly be a better solution.

This hash could be manually updated using red-datasets if the problematic plural forms have been fixed.

@kou
Copy link
Member

kou commented Feb 1, 2022

How about making plurals detection logic in MsgInit pluggable and using red-datasets based plurals detector by default?
If red-datasets gem isn't available, "please install red-datasets gem" error message is raised.

We also bundle do-nothing plurals detector. Fedora package users can use it by specifying an option explicitly such as --plurals-detector=null.

You can implement custom plurals detector based on fixed data. (I don't want to release a new version for each new CLDR release...)

Also, there are some parsing issue with specific languages that I'm not sure have been fixed:

Could you create 2 new issues for them?

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

2 participants