russian icon indicating copy to clipboard operation
russian copied to clipboard

При использовании I18n::Backend::Chain ошибка в date_helper

Open danaki opened this issue 11 years ago • 1 comments

Код иннициализации:

translations = {}
I18n.backend = I18n::Backend::Chain.new(I18n::Backend::KeyValue.new(translations), I18n.backend)

if Rails.configuration.appa[:i18n].present? then
  Rails.configuration.appa[:i18n].each do |locale, h|
    I18n.backend.store_translations(locale, h, :escape => false)
  end
end

Вываливается здесь: () Users/yuri/.rvm/gems/ruby-2.1.1/bundler/gems/russian-6da1fe45cbff/lib/russian/action_view_ext/helpers/date_helper.rb

# строка 101
if I18n.backend.send(:lookup, I18n.locale, :'date.common_month_names')

с NotImplementedError в lookup i18n (0.6.9) lib/i18n/backend/base.rb

Приватный метод lookup не оверрайдится в Chain, по-моему в этом месте вместо send(...) уместнее было бы использовать I18n.t(:'date.common_month_names')

danaki avatar May 19 '14 12:05 danaki