Module: I18nNamespace::Storing
Instance Method Summary collapse
Instance Method Details
#store_translations(locale, data, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 |
# File 'lib/i18n_namespace/storing.rb', line 5 def store_translations(locale, data, = {}) # TODO: use delete instead of fetch namespaced = .fetch(:namespaced, false) if namespaced && ::I18n.namespace.present? data = to_a(::I18n.namespace).reverse.inject(data) {|a, n| {n => a}} end super locale, data, end |