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:
parent
9d9a395f6b
commit
59788d8940
3 changed files with 46 additions and 49 deletions
|
@ -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);
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue