diff --git a/lib/js_locale_helper.rb b/lib/js_locale_helper.rb index b44c07b7add..708bdc90642 100644 --- a/lib/js_locale_helper.rb +++ b/lib/js_locale_helper.rb @@ -7,7 +7,9 @@ module JsLocaleHelper translations = {} Dir["#{Rails.root}/plugins/*/config/locales/client.#{locale_str}.yml"].each do |file| - translations.deep_merge! YAML::load(File.open(file))[locale_str] + if plugin_translations = YAML::load(File.open(file))[locale_str] + translations.deep_merge!(plugin_translations) + end end translations