mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Fix: Remove the language-specific display logic.
This commit is contained in:
@@ -173,7 +173,6 @@ var LANG = {
|
|||||||
update_instruction: 'Choose a firmware update file to upload:',
|
update_instruction: 'Choose a firmware update file to upload:',
|
||||||
update_upload: 'Upload File',
|
update_upload: 'Upload File',
|
||||||
|
|
||||||
lang_switch: 'Language:',
|
|
||||||
common_port: 'Port ',
|
common_port: 'Port ',
|
||||||
common_pkts: ' pkts',
|
common_pkts: ' pkts',
|
||||||
},
|
},
|
||||||
@@ -352,7 +351,6 @@ var LANG = {
|
|||||||
update_instruction: 'アップロードするファームウェアファイルを選択:',
|
update_instruction: 'アップロードするファームウェアファイルを選択:',
|
||||||
update_upload: 'ファイルをアップロード',
|
update_upload: 'ファイルをアップロード',
|
||||||
|
|
||||||
lang_switch: '言語:',
|
|
||||||
common_port: 'ポート ',
|
common_port: 'ポート ',
|
||||||
common_pkts: ' pkts',
|
common_pkts: ' pkts',
|
||||||
}
|
}
|
||||||
@@ -376,8 +374,6 @@ function setLang(lang) {
|
|||||||
document.querySelectorAll('[data-i18n]').forEach(function(el) {
|
document.querySelectorAll('[data-i18n]').forEach(function(el) {
|
||||||
applyTranslation(el);
|
applyTranslation(el);
|
||||||
});
|
});
|
||||||
var sel = document.getElementById('rtl-lang-select');
|
|
||||||
if (sel) sel.value = lang;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-6
@@ -9,14 +9,9 @@ document.getElementById('sidebar').innerHTML =
|
|||||||
+ "<li><a href='eee.html' data-i18n='nav_eee'>EEE</a></li>"
|
+ "<li><a href='eee.html' data-i18n='nav_eee'>EEE</a></li>"
|
||||||
+ "<li><a href='bandwidth.html' data-i18n='nav_bandwidth'>Bandwidth Limits</a></li>"
|
+ "<li><a href='bandwidth.html' data-i18n='nav_bandwidth'>Bandwidth Limits</a></li>"
|
||||||
+ "<li><a href='system.html' data-i18n='nav_system'>System Settings</a></li>"
|
+ "<li><a href='system.html' data-i18n='nav_system'>System Settings</a></li>"
|
||||||
+ "<li><a href='update.html' data-i18n='nav_fw_update'>Firmware Update</a></li></ul>"
|
+ "<li><a href='update.html' data-i18n='nav_fw_update'>Firmware Update</a></li></ul>";
|
||||||
+ "<hr/><div style='padding:8px'><label for='rtl-lang-select' data-i18n='lang_switch'>Language:</label><br/>"
|
|
||||||
+ "<select id='rtl-lang-select' onchange='setLang(this.value)' style='width:100%;margin-top:4px'>"
|
|
||||||
+ "<option value='en'>English</option><option value='ja'>日本語</option></select></div>";
|
|
||||||
|
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
var sel = document.getElementById('rtl-lang-select');
|
|
||||||
if (sel) sel.value = rtlLang;
|
|
||||||
var links = document.querySelectorAll('#sidebar a[data-i18n]');
|
var links = document.querySelectorAll('#sidebar a[data-i18n]');
|
||||||
links.forEach(function(el) {
|
links.forEach(function(el) {
|
||||||
var key = el.getAttribute('data-i18n');
|
var key = el.getAttribute('data-i18n');
|
||||||
|
|||||||
Reference in New Issue
Block a user