-
Notifications
You must be signed in to change notification settings - Fork 148
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
undefined method `map' for "translation missing: en-US.i18n.plural.keys":String #106
Comments
@JeremiahChurch in order to use this extension you need to add something like this en:
i18n:
plural:
keys: [:zero, :one, :other] see https://github.com/svenfuchs/i18n-active_record/blob/master/lib/i18n/backend/active_record/missing.rb#L16-L28 It doesn't really matter what is the value of |
@timfjord Thank you so much for setting me straight! I received psych errors trying to use the array of keys the example way but reformatting it to the other format has everything working. en:
i18n:
plural:
keys:
- :zero
- :one
- :other Might I suggest a small doc tweak to that file to make it clear that |
Sure, feel free to open a PR with the tweak. |
This is now mentioned in the README |
fairly standard rails 6 app.
stock standard i18n_active_record.rb initializer with the only addition being
Missing
I get the exception on line 45 of active_record/missing.rb
count
is 1a one line change to the failing line of
count && count > 1
fixes my issue. I'm happy to do a PR for that but wanted to see if others are having a similar issue or if I have a config problem somewhere.The text was updated successfully, but these errors were encountered: