mirror of
https://github.com/discourse/discourse.git
synced 2025-02-07 23:47:47 +08:00
Use string interpolation instead.
This commit is contained in:
parent
007326d3bd
commit
6c9f646e34
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user