mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
remove core extensions in favor of I18n#translate and I18n#localize
This commit is contained in:
@@ -512,7 +512,8 @@ module ActionView
|
||||
else
|
||||
month_options = []
|
||||
month_names = options[:use_month_names] || begin
|
||||
(options[:use_short_month] ? :'date.abbr_month_names' : :'date.month_names').t locale
|
||||
key = options[:use_short_month] ? :'date.abbr_month_names' : :'date.month_names'
|
||||
I18n.translate key, locale
|
||||
end
|
||||
month_names.unshift(nil) if month_names.size < 13
|
||||
|
||||
@@ -632,7 +633,7 @@ module ActionView
|
||||
|
||||
position = { :year => 1, :month => 2, :day => 3, :hour => 4, :minute => 5, :second => 6 }
|
||||
|
||||
order = options[:order] ||= :'date.order'.t(locale)
|
||||
order = options[:order] ||= I18n.translate(:'date.order', locale)
|
||||
|
||||
# Discard explicit and implicit by not being included in the :order
|
||||
discard = {}
|
||||
|
||||
@@ -70,7 +70,7 @@ module ActionView
|
||||
# # => 1234567890,50 £
|
||||
def number_to_currency(number, options = {})
|
||||
options = options.symbolize_keys
|
||||
defaults = :'currency.format'.t(options[:locale]) || {}
|
||||
defaults = I18n.translate(:'currency.format', options[:locale]) || {}
|
||||
|
||||
precision = options[:precision] || defaults[:precision]
|
||||
unit = options[:unit] || defaults[:unit]
|
||||
|
||||
Reference in New Issue
Block a user