# File lib/i18n/backend/active_record/missing.rb, line 50 50: def store_default_translation(locale, key, interpolations) 51: translation = ActiveRecord::Translation.new :locale => locale.to_s, :key => key 52: translation.interpolations = interpolations 53: translation.save 54: end
# File lib/i18n/backend/active_record/missing.rb, line 36 36: def store_default_translations(locale, key, options = {}) 37: count, scope, default, separator = options.values_at(:count, *Base::RESERVED_KEYS) 38: separator ||= I18n.default_separator 39: 40: keys = I18n.normalize_keys(locale, key, scope, separator)[1..1] 41: key = keys.join(separator || I18n.default_separator) 42: 43: unless ActiveRecord::Translation.locale(locale).lookup(key).exists? 44: interpolations = options.reject { |name, value| Base::RESERVED_KEYS.include?(name) }.keys 45: keys = count ? I18n.t('i18n.plural.keys', :locale => locale).map { |k| [key, k].join(separator) } : [key] 46: keys.each { |key| store_default_translation(locale, key, interpolations) } 47: end 48: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.