FIX: plugin translations overwrite each other
This commit is contained in:
parent
2d398903c0
commit
ac8203b601
|
@ -8,7 +8,7 @@ module JsLocaleHelper
|
|||
# load plugins translations
|
||||
plugin_translations = {}
|
||||
Dir["#{Rails.root}/plugins/*/config/locales/client.#{locale_str}.yml"].each do |file|
|
||||
plugin_translations.merge! YAML::load(File.open(file))
|
||||
plugin_translations.deep_merge! YAML::load(File.open(file))
|
||||
end
|
||||
# merge translations (plugin translations overwrite default translations)
|
||||
translations[locale_str]['js'].deep_merge!(plugin_translations[locale_str]['js']) if translations[locale_str] && plugin_translations[locale_str] && plugin_translations[locale_str]['js']
|
||||
|
|
Loading…
Reference in New Issue