mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-19 06:15:11 +03:00
Merge branch 'master' into ToshihiroMakuuchi/ja-fix01
This commit is contained in:
commit
5f25766fbc
19 changed files with 6549 additions and 73 deletions
|
@ -10,7 +10,8 @@ const i18nextXHRBackend = require('i18next-xhr-backend');
|
|||
const Store = require('electron-store');
|
||||
const store = new Store();
|
||||
|
||||
const availableLanguages = ['en', 'ja', 'uk'];
|
||||
|
||||
const availableLanguages = ['en', 'ja', 'uk','zh_CN'];
|
||||
|
||||
const i18n = {};
|
||||
|
||||
|
@ -173,6 +174,11 @@ i18n.localize = function (reTranslate = false) {
|
|||
const element = $(this);
|
||||
element.attr('placeholder', translate(element.attr('i18n_placeholder')));
|
||||
});
|
||||
|
||||
$('[i18n_lang]').each(function() {
|
||||
const element = $(this);
|
||||
element.attr('lang', translate(element.attr('i18n_lang')));
|
||||
});
|
||||
} else {
|
||||
|
||||
$('[i18n]:not(.i18n-replaced)').each(function() {
|
||||
|
@ -234,6 +240,13 @@ i18n.localize = function (reTranslate = false) {
|
|||
element.attr('placeholder', translate(element.attr('i18n_placeholder')));
|
||||
element.addClass('i18n_placeholder-replaced');
|
||||
});
|
||||
|
||||
$('[i18n_lang]:not(.i18n_lang-replaced)').each(function() {
|
||||
const element = $(this);
|
||||
element.attr('lang', translate(element.attr('i18n_lang')));
|
||||
element.addClass('i18n_lang-replaced');
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
return localized;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue