This is a slightly beginner question, but I searched everywhere and it seems I can’t solve it.
I use Rails and ActiveAdmin, and I configured internationalization to use the es.yml locale.
So far so good. The admin interface is well manifested in Spanish, as well as error messages, dates, etc. Even forms take the names of models and attributes (so that formatting gets translations in order). I have only one language - Spanish:
configurations / initializers / i18n.rb
#encoding: utf-8 I18n.default_locale = :es LANGUAGES = [ [ 'Español', 'es' ] ]
I have a problem getting resource names translated into ActiveAdmin interface. For example, at the top of the page is written "Users", "Ratings", etc. Instead of "Usuarios", "Cotizaciones".
I can solve this by registering classes as follows:
ActiveAdmin.register User ,: as => "usuario" do ... end
but then I get admin_usuarios_path , admin_usuarios_url , /admin/usuarios etc. which I find very very ugly. I would rather use English domestically. The ActiveAdmin source for active_admin/resource/naming says that it should select the human_name model, which is correctly read from the localization file:
(in console)
User.model_name.human.titleize => "Usuario"
So why is "Usuario" not showing in the menu bar but "User"? I am a little puzzled here. I have to miss something very simple.
Thanks in advance!
Kyle