diff --git a/index.html b/index.html index 6a5cfddce..d7681ca2d 100644 --- a/index.html +++ b/index.html @@ -1,5 +1,5 @@ - +
diff --git a/js/localization.js b/js/localization.js index 2c7e49cd6..6da7a92ad 100644 --- a/js/localization.js +++ b/js/localization.js @@ -173,6 +173,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 +239,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; diff --git a/locale/en/messages.json b/locale/en/messages.json index e0d9c2847..afef64449 100644 --- a/locale/en/messages.json +++ b/locale/en/messages.json @@ -6152,5 +6152,8 @@ }, "adsbHeartbeatTotalMessages": { "message": "Heartbeat msgs" + }, + "currentLanguage": { + "message": "en" } } diff --git a/locale/uk/messages.json b/locale/uk/messages.json index 74b236e97..bb0ab4a84 100644 --- a/locale/uk/messages.json +++ b/locale/uk/messages.json @@ -5926,5 +5926,8 @@ }, "adsbHeartbeatTotalMessages": { "message": "Повід. сигналів перевірки" + }, + "currentLanguage": { + "message": "uk" } } diff --git a/src/css/main.css b/src/css/main.css index 6a011d8eb..9dec4129e 100644 --- a/src/css/main.css +++ b/src/css/main.css @@ -2332,4 +2332,8 @@ ol li { .bold { font-weight: bold; -} \ No newline at end of file +} + +*:lang(ja) { + font-family:"ヒラギノ角ゴ Pro W3", "Hiragino Kaku Gothic Pro",Osaka, "メイリオ", Meiryo, "MS Pゴシック", "MS PGothic", sans-serif; +} diff --git a/src/css/tabs/motors.css b/src/css/tabs/motors.css index 3802d31c1..11048ab49 100644 --- a/src/css/tabs/motors.css +++ b/src/css/tabs/motors.css @@ -463,18 +463,4 @@ .tab-motors .config-section .number input { margin-right: 4px; -} - -.tab-motors .mixerPreview { - position: relative; -} - -.tab-motors .motorNumber { - position: absolute; - font-size: 1.4em; - visibility: hidden; -} - -.tab-motors .mixer-preview-image-numbers { - width: fit-content; -} +} \ No newline at end of file diff --git a/tabs/mixer.js b/tabs/mixer.js index e40fb07c6..be93c3026 100644 --- a/tabs/mixer.js +++ b/tabs/mixer.js @@ -476,7 +476,6 @@ TABS.mixer.initialize = function (callback, scrollPosition) { $("#motorNumber"+index).css("left", left_px + "px"); $("#motorNumber"+index).css("top", top_px + "px"); $("#motorNumber"+index).removeClass("is-hidden"); - $("#motorNumber"+index).css("visibility", "visible"); } } } @@ -545,7 +544,7 @@ TABS.mixer.initialize = function (callback, scrollPosition) { } } - labelMotorNumbers(); + labelMotorNumbers(); i18n.localize();; } @@ -611,6 +610,7 @@ TABS.mixer.initialize = function (callback, scrollPosition) { } } + return (errorCount == 0); } @@ -661,6 +661,7 @@ TABS.mixer.initialize = function (callback, scrollPosition) { const path = './resources/motor_order/' + currentMixerPreset.image + (isReversed ? "_reverse" : "") + '.svg'; $('.mixerPreview img').attr('src', path); + renderServoOutputImage(); }; diff --git a/tabs/outputs.html b/tabs/outputs.html index 64a714762..d57cc76d6 100644 --- a/tabs/outputs.html +++ b/tabs/outputs.html @@ -117,11 +117,7 @@