Module: I18n::Backend::InterpolationCompiler

Defined in:
lib/i18n/backend/interpolation_compiler.rb

Defined Under Namespace

Modules: Compiler

Instance Method Summary (collapse)

Instance Method Details

- (Object) interpolate(locale, string, values)



97
98
99
100
101
102
103
104
105
# File 'lib/i18n/backend/interpolation_compiler.rb', line 97

def interpolate(locale, string, values)
  if string.respond_to?(:i18n_interpolate)
    string.i18n_interpolate(values)
  elsif values
    super
  else
    string
  end
end

- (Object) store_translations(locale, data, options = {})



107
108
109
110
# File 'lib/i18n/backend/interpolation_compiler.rb', line 107

def store_translations(locale, data, options = {})
  compile_all_strings_in(data)
  super
end