diff --git a/lib/js_locale_helper.rb b/lib/js_locale_helper.rb index 0e090e019..6642a0dfd 100644 --- a/lib/js_locale_helper.rb +++ b/lib/js_locale_helper.rb @@ -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']