method
interpolate_with_deprecated_syntax
v2.2.1 -
Show latest stable
- Class:
I18n::Backend::Simple
interpolate_with_deprecated_syntax(locale, string, values = {})protected
No documentation available.
# File activerecord/lib/active_record/i18n_interpolation_deprecation.rb, line 12
def interpolate_with_deprecated_syntax(locale, string, values = {})
return string unless string.is_a?(String)
string = string.gsub(/%d|%s/) do |s|
instead = DEPRECATED_INTERPOLATORS[s]
ActiveSupport::Deprecation.warn "using #{s} in messages is deprecated; use #{instead} instead."
instead
end
interpolate_without_deprecated_syntax(locale, string, values)
end