Reputation: 3333
I am trying to localize ActiveRecord error messages (Ukrainian language).
First, I set up application.rb file: config.i18n.default_locale = :uk
Second, I create a file /config/locales/uk.yml
There is such content in uk.yml:
uk:
active_record:
errors:
messages:
empty: "<some Ukrainian text>"
blank: "<some Ukrainian text>"
Also, I know that for translating the error messages, Rails will use the following order of translations:
activerecord.errors.models.user.attributes.name.blank
activerecord.errors.models.user.blank
activerecord.errors.messages.blank
errors.attributes.name.blank
errors.messages.blank
But when I run an certain action I get the message:
Email translation missing: uk.activerecord.errors.models.user.attributes.email.blank
My question is Why Doesn't the l18n search a translation at path activerecord.errors.messages.blank?
Thank you.
Upvotes: 3
Views: 737