mirror of
https://github.com/iNavFlight/inav-configurator.git
synced 2025-07-21 15:25:19 +03:00
support per-language fonts (for Japanese etc)
This commit is contained in:
parent
d6b57e35b4
commit
1e2da77277
5 changed files with 24 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html i18n_lang="currentLanguage">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
|
|
|
@ -173,6 +173,11 @@ i18n.localize = function (reTranslate = false) {
|
||||||
const element = $(this);
|
const element = $(this);
|
||||||
element.attr('placeholder', translate(element.attr('i18n_placeholder')));
|
element.attr('placeholder', translate(element.attr('i18n_placeholder')));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$('[i18n_lang]').each(function() {
|
||||||
|
const element = $(this);
|
||||||
|
element.attr('lang', translate(element.attr('i18n_lang')));
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
$('[i18n]:not(.i18n-replaced)').each(function() {
|
$('[i18n]:not(.i18n-replaced)').each(function() {
|
||||||
|
@ -234,6 +239,13 @@ i18n.localize = function (reTranslate = false) {
|
||||||
element.attr('placeholder', translate(element.attr('i18n_placeholder')));
|
element.attr('placeholder', translate(element.attr('i18n_placeholder')));
|
||||||
element.addClass('i18n_placeholder-replaced');
|
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;
|
return localized;
|
||||||
|
|
|
@ -6152,5 +6152,8 @@
|
||||||
},
|
},
|
||||||
"adsbHeartbeatTotalMessages": {
|
"adsbHeartbeatTotalMessages": {
|
||||||
"message": "Heartbeat msgs"
|
"message": "Heartbeat msgs"
|
||||||
|
},
|
||||||
|
"currentLanguage": {
|
||||||
|
"message": "en"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -5926,5 +5926,8 @@
|
||||||
},
|
},
|
||||||
"adsbHeartbeatTotalMessages": {
|
"adsbHeartbeatTotalMessages": {
|
||||||
"message": "Повід. сигналів перевірки"
|
"message": "Повід. сигналів перевірки"
|
||||||
|
},
|
||||||
|
"currentLanguage": {
|
||||||
|
"message": "uk"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2333,3 +2333,7 @@ ol li {
|
||||||
.bold {
|
.bold {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*:lang(ja) {
|
||||||
|
font-family:"ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro",Osaka, "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif;
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue