I18n error! #1803

Closed
constan4in opened this Issue Dec 6, 2012 · 2 comments

Comments

Projects
None yet
2 participants

Hi guys!

AA ignores new changes in config/locales/ru.yml and reacts only to changes in lib/active_admin/locales/ru.yml.

Problem started after upgrading rails to 3.2.8. Also I switched from unicorn to puma but I don't think that this is the reason of the problem.

I've moved AA translations from locales/ru.yml to locales/active_admin.ru.yml - but that didn't help.

tried these solutions :

config/environments/development.rb:

 config.i18n.available_locales= :ru

config/initializers/active_admin.rb:

config.before_filter :set_admin_locale
  def set_admin_locale
    I18n.locale = :ru  
  end

config/initializers/i18n.rb:

  I18n.locale = :ru 
  I18n.load_path += Dir[Rails.root.join('config', 'locales', '*.{rb,yml}').to_s]
  I18n.reload!

application.rb:

  config.i18n.default_locale = :ru
  config.before_configuration do
       I18n.locale = :ru
       I18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}')]
       I18n.reload!
    end 

console output

1.9.3p194 :007 > I18n.load_path.map {|loc| puts loc if loc.include?('ru.y')}
/Users/dev/Sites/myapp/config/locales/active_admin.ru.yml
/Users/dev/Sites/myapp/config/locales/ru.yml
/Users/dev/.rvm/gems/ruby-1.9.3-p194@myapp/gems/activeadmin-0.5.0/lib/active_admin/locales/ru.yml
Contributor

pcreux commented Dec 6, 2012

This is fixed in 0.5.1 thanks to #1775.

pcreux closed this Dec 6, 2012

Thanx - upgrade AA to 0.5.1 helped!
Also solution for AA 0.5.0 can found here gregbell#1730

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment