I've translated my app to another language. I've created ru.yml file with all translations needed in views in it. All worked fine before I go to admin path. I use Active Admin and I've got following error:
I18n::MissingTranslationData in Admin::Pages#index
translation missing: ru.time.formats.long
insert_tag renderer_for(:index)
How to fix it? I'm interested in both ways: what to do to translate Active Admin too and what to do if I want to keep it in English and just fix the error message.
That was easier than it looked at first. I've just added the following lines to my ru.yml file.
time:
formats:
long: "%Y-%m-%d %H:%M:%S"
Recently, I've been through the same issue and a quick way to get all default Rails translations set is using the rails-i18n
gem.
For that you need to add it into your project's Gemfile
just like this:
# Gemfile
...
gem 'rails-i18n'
Don't forget after this to run:
bundle install
I hope this becomes helpful to some other folks in the future.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With