Merge pull request #257 from cvium/fix_fallback_culture

Load fallback culture before login
This commit is contained in:
Joshua M. Boniface 2019-04-20 14:56:15 -04:00 committed by GitHub
commit 9c85bcd2d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,12 +127,17 @@ define(['connectionManager', 'userSettings', 'events'], function (connectionMana
function loadStrings(options) { function loadStrings(options) {
var locale = getCurrentLocale(); var locale = getCurrentLocale();
var promises = [];
var optionsName;
if (typeof options === 'string') { if (typeof options === 'string') {
return ensureTranslation(allTranslations[options], locale); optionsName = options;
} else { } else {
optionsName = options.name;
register(options); register(options);
return ensureTranslation(allTranslations[options.name], locale);
} }
promises.push(ensureTranslation(allTranslations[optionsName], locale));
promises.push(ensureTranslation(allTranslations[optionsName], fallbackCulture));
return Promise.all(promises);
} }
var cacheParam = new Date().getTime(); var cacheParam = new Date().getTime();