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

Call I18n.translate instead of private method lookup #54

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/russian/action_view_ext/helpers/date_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class DateTimeSelector #:nodoc:
# месяцев по необходимости
def translated_month_names
if @options[:use_short_month]
if I18n.backend.send(:lookup, I18n.locale, :'date.common_abbr_month_names')
if I18n.backend.translate(I18n.locale, :'date.common_abbr_month_names')
if (@options[:discard_day] || @options[:use_standalone_month_names])
key = :'date.standalone_abbr_month_names'
else
Expand All @@ -98,7 +98,7 @@ def translated_month_names
key = :'date.abbr_month_names'
end
else
if I18n.backend.send(:lookup, I18n.locale, :'date.common_month_names')
if I18n.backend.translate(I18n.locale, :'date.common_month_names')
if (@options[:discard_day] || @options[:use_standalone_month_names])
key = :'date.standalone_month_names'
else
Expand All @@ -115,4 +115,4 @@ def translated_month_names
end
end
end
end # if defined?
end # if defined?