Permalink
Browse files

Revert "Fix i18n/backend/key_value to add data in a array" causing va…

…rious issues.

This reverts commit e2b0fe4.
  • Loading branch information...
1 parent cb5a9d5 commit e264b765bc94b40cf220e9fef698b908c84a3ec5 @knapo knapo committed Dec 31, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/i18n/backend/key_value.rb
@@ -73,7 +73,7 @@ def store_translations(locale, data, options = {})
raise "Key-value stores cannot handle procs"
end
- @store[key] = ActiveSupport::JSON.encode([value]) unless value.is_a?(Symbol)
+ @store[key] = ActiveSupport::JSON.encode(value) unless value.is_a?(Symbol)
end
end
@@ -90,7 +90,7 @@ def available_locales
def lookup(locale, key, scope = [], options = {})
key = normalize_flat_keys(locale, key, scope, options[:separator])
value = @store["#{locale}.#{key}"]
- value = ActiveSupport::JSON.decode(value)[0] if value
+ value = ActiveSupport::JSON.decode(value) if value
value.is_a?(Hash) ? value.deep_symbolize_keys : value
end
end

0 comments on commit e264b76

Please sign in to comment.