FIX: admin strings in plugins should fallback to english when untranslated
This commit is contained in:
parent
c2da25dd5c
commit
6f8f2c494d
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue