Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
danaki opened this issue May 19, 2014 · 1 comment · May be fixed by #54
Open

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

danaki opened this issue May 19, 2014 · 1 comment · May be fixed by #54

Comments

@danaki
Copy link

danaki commented May 19, 2014

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

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 danaki linked a pull request May 19, 2014 that will close this issue
rap1ds added a commit to sharetribe/sharetribe that referenced this issue Apr 13, 2015
- I see no reason why our Russian translations should not work without this gem
- russian gem uses I18n.backend internal methods, thus it doesn't work with Chained I18n backend, see more: yaroslav/russian#53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants
@danaki and others