1
0
Fork 0
mirror of https://github.com/betaflight/betaflight-configurator.git synced 2025-07-22 15:55:33 +03:00

improved logo validation output, improved localization handling and bugfix

This commit is contained in:
Kiripolszky Károly 2018-03-22 13:53:20 +01:00
parent 9d9a395f6b
commit 59788d8940
3 changed files with 46 additions and 49 deletions

View file

@ -126,3 +126,10 @@ function getValidLocale(userLocale) {
}
return userLocale;
}
i18n.addResources = function(bundle) {
var takeFirst = obj => obj.hasOwnProperty("length") && 0 < obj.length ? obj[0] : obj;
var lang = takeFirst(i18next.options.fallbackLng),
ns = takeFirst(i18next.options.defaultNS);
i18next.addResourceBundle(lang, ns, bundle, true, true);
};