# Deprecates the use of the former message interpolation syntax in activerecord# as in "must have %d characters". The new syntax uses explicit variable names# as in "{{value}} must have {{count}} characters".require'i18n/backend/simple'moduleI18nmoduleBackendclassSimpleDEPRECATED_INTERPOLATORS={'%d'=>'{{count}}','%s'=>'{{value}}'}protecteddefinterpolate_with_deprecated_syntax(locale,string,values={})returnstringunlessstring.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."insteadendinterpolate_without_deprecated_syntax(locale,string,values)endalias_method_chain:interpolate,:deprecated_syntaxendendend