diff --git a/app/assets/javascripts/locales/i18n.js b/app/assets/javascripts/locales/i18n.js index ddf3fd55f1d..ba56bc3a80c 100644 --- a/app/assets/javascripts/locales/i18n.js +++ b/app/assets/javascripts/locales/i18n.js @@ -48,8 +48,7 @@ function checkExtras(origScope, sep, extras) { I18n.lookup = function(scope, options) { options = options || {}; - var lookupInitialScope = scope, - translations = this.prepareOptions(I18n.translations), + var translations = this.prepareOptions(I18n.translations), locale = options.locale || I18n.currentLocale(), messages = translations[locale] || {}, currentScope; diff --git a/lib/js_locale_helper.rb b/lib/js_locale_helper.rb index 172c4c0ac57..99bd3755e16 100644 --- a/lib/js_locale_helper.rb +++ b/lib/js_locale_helper.rb @@ -52,7 +52,10 @@ module JsLocaleHelper 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'] + if translations[locale_str] && plugin_translations(locale_str) + translations[locale_str]['js'].deep_merge!(plugin_translations(locale_str)['js']) if plugin_translations(locale_str)['js'] + translations[locale_str]['admin_js'].deep_merge!(plugin_translations(locale_str)['admin_js']) if plugin_translations(locale_str)['admin_js'] + end translations end