Use string interpolation instead.

This commit is contained in:
Guo Xiang Tan 2015-12-30 08:50:03 +08:00
parent 007326d3bd
commit 6c9f646e34

View file

@ -72,7 +72,7 @@ module I18n
existing_translations = existing_translations =
if existing_translations.is_a?(Hash) if existing_translations.is_a?(Hash)
Hash[existing_translations.map { |k, v| [k.to_s.prepend("#{key}."), v] }] Hash[existing_translations.map { |k, v| ["#{key}.#{k}", v] }]
elsif existing_translations.is_a?(String) elsif existing_translations.is_a?(String)
Hash[[[key, existing_translations]]] Hash[[[key, existing_translations]]]
end end