mirror of
https://github.com/betaflight/betaflight-configurator.git
synced 2025-07-24 00:35:26 +03:00
Fix errors about using i18next before its properly initial… (#1782)
Fix errors about using i18next before its properly initial…
This commit is contained in:
commit
b2cc8e0f55
3 changed files with 10 additions and 10 deletions
|
@ -41,7 +41,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"bluebird": "^3.5.5",
|
||||
"i18next": "^17.0.11",
|
||||
"i18next": "^18.0.1",
|
||||
"i18next-xhr-backend": "^3.1.1",
|
||||
"inflection": "1.12.0",
|
||||
"jbox": "1.0.5",
|
||||
|
|
|
@ -31,17 +31,17 @@ i18n.init = function(cb) {
|
|||
console.log('i18n system loaded');
|
||||
var detectedLanguage = i18n.getMessage('language_' + getValidLocale("DEFAULT"));
|
||||
i18n.addResources({"detectedLanguage": detectedLanguage });
|
||||
i18next.on('languageChanged', function (newLang) {
|
||||
i18n.localizePage(true);
|
||||
updateStatusBarVersion();
|
||||
});
|
||||
}
|
||||
if (cb !== undefined) {
|
||||
cb();
|
||||
}
|
||||
});
|
||||
});
|
||||
// This function should do the same things that the i18n.localizePage function below does.
|
||||
i18next.on('languageChanged', function (newLang) {
|
||||
i18n.localizePage(true);
|
||||
updateStatusBarVersion();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
i18n.changeLanguage = function(languageSelected) {
|
||||
|
|
|
@ -2484,10 +2484,10 @@ i18next-xhr-backend@^3.1.1:
|
|||
dependencies:
|
||||
"@babel/runtime" "^7.5.5"
|
||||
|
||||
i18next@^17.0.11:
|
||||
version "17.3.0"
|
||||
resolved "https://registry.yarnpkg.com/i18next/-/i18next-17.3.0.tgz#6223799605303607243ce7c4c9846b205c14cd9c"
|
||||
integrity sha512-4sJ6CHhLu/+xOEo3wresVl7jhC92bXhBkZYigJRzXCljzlgdayNhP/+0K+76GHmFTlL/OHg/hw04Praph9SJsA==
|
||||
i18next@^18.0.1:
|
||||
version "18.0.1"
|
||||
resolved "https://registry.yarnpkg.com/i18next/-/i18next-18.0.1.tgz#10841209f6983df4d8e367204da403d8cbc609cf"
|
||||
integrity sha512-KWd9qMFXw0qjxF7cTAqQselPCYoHfaLvBs8c6JcNzaQKVxbAlE/wv9EZXPy+JlKUcXCT0qgjcmxrJjmbnEp60A==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.3.1"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue