Module: I18n::Backend::Metadata

Defined in:
lib/active_support/vendor/i18n-0.3.7/i18n/backend/metadata.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



23
24
25
26
27
28
29
30
31
32
33
# File 'lib/active_support/vendor/i18n-0.3.7/i18n/backend/metadata.rb', line 23

def included(base)
  Object.class_eval do
    def 
      @translation_metadata ||= {}
    end

    def translation_metadata=()
      @translation_metadata = 
    end
  end
end

Instance Method Details

#interpolate(locale, string, values = {}) ⇒ Object



48
49
50
51
52
# File 'lib/active_support/vendor/i18n-0.3.7/i18n/backend/metadata.rb', line 48

def interpolate(locale, string, values = {})
  (:original => string) do
    (string) { super }
  end if string
end

#pluralize(locale, entry, count) ⇒ Object



54
55
56
# File 'lib/active_support/vendor/i18n-0.3.7/i18n/backend/metadata.rb', line 54

def pluralize(locale, entry, count)
  (:count => count) { super }
end

#translate(locale, key, options = {}) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/active_support/vendor/i18n-0.3.7/i18n/backend/metadata.rb', line 36

def translate(locale, key, options = {})
   = {
    :locale    => locale,
    :key       => key,
    :scope     => options[:scope],
    :default   => options[:default],
    :separator => options[:separator],
    :values    => options.reject { |name, value| Base::RESERVED_KEYS.include?(name) }
  }
  () { super }
end