7
votes

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.

2

2 Answers

11
votes

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"
0
votes

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.