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) {
|
I18n.lookup = function(scope, options) {
|
||||||
options = options || {};
|
options = options || {};
|
||||||
|
|
||||||
var lookupInitialScope = scope,
|
var translations = this.prepareOptions(I18n.translations),
|
||||||
translations = this.prepareOptions(I18n.translations),
|
|
||||||
locale = options.locale || I18n.currentLocale(),
|
locale = options.locale || I18n.currentLocale(),
|
||||||
messages = translations[locale] || {},
|
messages = translations[locale] || {},
|
||||||
currentScope;
|
currentScope;
|
||||||
|
|
|
@ -52,7 +52,10 @@ module JsLocaleHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
# merge translations (plugin translations overwrite default translations)
|
# 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
|
translations
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue