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

Feature request: support for inflections #825

Open
iainbeeston opened this issue Jan 28, 2019 · 1 comment
Open

Feature request: support for inflections #825

iainbeeston opened this issue Jan 28, 2019 · 1 comment

Comments

@iainbeeston
Copy link

By default Rails comes with inflections for the 'en' local:

https://github.com/rails/rails/blob/master/activesupport/lib/active_support/inflections.rb

If you try to use the pluralize or singularize view helpers in any other locale they do nothing, unless you have defined your own pluralizations (the rails new app generator provides a file for this in config/initializers/inflections.rb).

It feels like this is something that could go into rails-18n so that as well as default translations, pluralizations would work "out of the box".

Is this something that would be acceptable to the maintainers? I can probably make a pull request if it is (any hints on where the code aught to go or how it should be maintained would be welcome).

@iainbeeston
Copy link
Author

There is already the inflections gem (by @davidcelis) but I think multilingual inflections support aught to come "out-of-the-box" with rails-18n, and including inflections here might encourage people to contribute inflections for languages other than english

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