From 19d1c52ac4893a7173b1012c657c5b2cbdf48bc4 Mon Sep 17 00:00:00 2001 From: mofeng-git Date: Thu, 21 Aug 2025 13:23:33 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=20Web=20=E7=95=8C?= =?UTF-8?q?=E9=9D=A2=E5=9B=BD=E9=99=85=E5=8C=96=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将包含数字的无意义 i18n 键名替换为语义化名称 (如 kvm_text1 → about_title) - 为缺失多语言支持的界面文本添加中英文翻译 - 修复不准确的翻译内容和 HTML 标签格式错误 - 更新所有 Pug 模板文件以使用新的 i18n 键名 - 新增登录页面"记住我"、USB 连接确认等功能的多语言支持 - 统一翻译键命名规范,提升代码可维护性 --- web/index.html | 8 +- web/index.pug | 10 +- web/ipmi/index.html | 6 +- web/ipmi/index.pug | 6 +- web/kvm/index.html | 202 ++++++++++++++++---------------- web/kvm/index.pug | 4 +- web/kvm/navbar-macro.pug | 24 ++-- web/kvm/navbar-msd.pug | 50 ++++---- web/kvm/navbar-shortcuts.pug | 8 +- web/kvm/navbar-system.pug | 73 ++++++------ web/kvm/navbar-text.pug | 24 ++-- web/kvm/navbar.pug | 10 +- web/kvm/window-about.pug | 12 +- web/kvm/window-keyboard.pug | 2 +- web/kvm/window-webterm.pug | 2 +- web/login/index.html | 12 +- web/login/index.pug | 6 +- web/share/i18n/i18n_en.json | 216 ++++++++++++++++++----------------- web/share/i18n/i18n_zh.json | 216 ++++++++++++++++++----------------- web/vnc/index.html | 6 +- web/vnc/index.pug | 6 +- 21 files changed, 459 insertions(+), 444 deletions(-) diff --git a/web/index.html b/web/index.html index 6c739a02..c36ed6cd 100644 --- a/web/index.html +++ b/web/index.html @@ -81,17 +81,17 @@

-

+

Please note that when you are working with a KVM session or another application that captures the keyboard, you can't use some keyboard shortcuts such as Ctrl+Alt+Del (which will be caught by your OS) or Ctrl+W (caught by your browser).

-

To override this limitation you can use Google Chrome +

To override this limitation you can use Google Chrome or Chromium in application mode.

-
+

-

One-KVM Project  |  One-KVM Documentation

+

One-KVM Project  |  One-KVM Documentation

diff --git a/web/index.pug b/web/index.pug index 2e85eae0..4ea905f1 100644 --- a/web/index.pug +++ b/web/index.pug @@ -30,16 +30,16 @@ block start #app-keyboard-warning hr - p.text(i18n="index_text_1") + p.text(i18n="keyboard_limitation_note") | Please note that when you are working with a KVM session or another application that captures the keyboard, | you can't use some keyboard shortcuts such as Ctrl+Alt+Del (which will be caught by your OS) or Ctrl+W (caught by your browser). - p.text(i18n="index_text_2") + p.text(i18n="browser_solution_note") | To override this limitation you can use #[a(target="_blank" href="https://google.com/chrome") Google Chrome] | or #[a(target="_blank" href="https://chromium.org/Home") Chromium] in application mode. - .code#app-text + .code#app-text.hidden hr p.text.credits - a(target="_blank" href="https://github.com/mofeng-git/One-KVM" i18n="index_text_12") One-KVM Project + a(target="_blank" href="https://github.com/mofeng-git/One-KVM" i18n="onekvm_project_link") One-KVM Project |   |   - a(target="_blank" href="https://one-kvm.mofeng.run" i18n="index_text_13") One-KVM Documentation \ No newline at end of file + a(target="_blank" href="https://one-kvm.mofeng.run" i18n="onekvm_documentation_link") One-KVM Documentation \ No newline at end of file diff --git a/web/ipmi/index.html b/web/ipmi/index.html index 79edbb08..1846bdb6 100644 --- a/web/ipmi/index.html +++ b/web/ipmi/index.html @@ -51,15 +51,15 @@
  ←   [ One-KVM Index ]
-

This PiKVM device has running kvmd-ipmi daemon and provides IPMI 2.0 interface for some basic +

This PiKVM device has running kvmd-ipmi daemon and provides IPMI 2.0 interface for some basic BMC operations like on/off/reset the server.

-

WARNING! We strongly don't recommend you to use IPMI in untrusted networks because +

WARNING! We strongly don't recommend you to use IPMI in untrusted networks because this protocol is completely unsafe by design. In short, the authentication process for IPMI mandates that the server send a salted SHA1 or MD5 hash of the requested user's password to the client, prior to the client authenticating.

-

NEVER use the same passwords for KVMD and IPMI users. And even better not to use IPMI. +

NEVER use the same passwords for KVMD and IPMI users. And even better not to use IPMI. Instead, you can directly use KVMD API via curl. Here some examples:

diff --git a/web/ipmi/index.pug b/web/ipmi/index.pug index 491c7414..918e0f4e 100644 --- a/web/ipmi/index.pug +++ b/web/ipmi/index.pug @@ -9,15 +9,15 @@ append vars index_link = true block start - p.text(i18n="ipmi_text1") + p.text(i18n="ipmi_daemon_running") | This PiKVM device has running #[b kvmd-ipmi] daemon and provides IPMI 2.0 interface for some basic | BMC operations like on/off/reset the server. - p.text(i18n="ipmi_text2") + p.text(i18n="ipmi_security_warning") | #[b WARNING!] We strongly don't recommend you to use IPMI in untrusted networks because | this protocol is completely unsafe by design. In short, the authentication process for IPMI mandates | that the server send a salted SHA1 or MD5 hash of the requested user's password to the client, | prior to the client authenticating. - p.tetx(i18n="ipmi_text3") + p.text(i18n="ipmi_password_recommendation") | #[b NEVER] use the same passwords for KVMD and IPMI users. And even better not to use IPMI. | Instead, you can directly use KVMD API via curl. Here some examples: .code#ipmi-text(style="max-height:200px") diff --git a/web/kvm/index.html b/web/kvm/index.html index ff158bc5..533e1cec 100644 --- a/web/kvm/index.html +++ b/web/kvm/index.html @@ -144,22 +144,22 @@
-
  • System +
  • System - + - - - - - -
    Resolution:Resolution:
    JPEG quality: + JPEG quality: @@ -213,7 +213,7 @@
    JPEG max fps: + JPEG max fps: @@ -221,7 +221,7 @@
    H.264 kbps: + H.264 kbps: @@ -229,7 +229,7 @@
    H.264 gop: + H.264 gop: @@ -237,7 +237,7 @@
    Video mode: + Video mode:
    @@ -267,7 +267,7 @@
    Audio volume: + Audio volume: @@ -287,37 +287,37 @@

    - - - + + +

    -
    Video Record
    Record video using the browser API, and will be downloaded automatically
    +
    Video Record
    Record video using the browser API, and will be downloaded automatically
    - - + +

    - + - +
    Keyboard mode:Keyboard mode:
    Mouse mode:Mouse mode:
    - Keyboard & mouse (HID) settings + Keyboard & mouse (HID) settings
    -
    Swap Left Ctrl and Caps keys: + Swap Left Ctrl and Caps keys:
    @@ -330,7 +330,7 @@
    - - - - +
    Mouse polling: + Mouse polling: @@ -338,7 +338,7 @@
    Relative sensitivity: + Relative sensitivity: @@ -346,21 +346,21 @@
    Squash relative moves: + Squash relative moves:
    - +
    Reverse scrolling:Reverse scrolling: - - - - -
    Y: + Y:
    @@ -369,7 +369,7 @@
      X: + X:
    @@ -382,7 +382,7 @@
    Cumulative scrolling: + Cumulative scrolling:
    @@ -392,7 +392,7 @@
    Scroll rate: + Scroll rate: @@ -400,7 +400,7 @@
    Show the blue dot: + Show the blue dot:
    @@ -413,11 +413,11 @@
    - Web UI settings + Web UI settings
    - - -
    Ask page close confirmation: + Ask page close confirmation:
    @@ -427,7 +427,7 @@
    Expand for the entire tab by default: + Expand for the entire tab by default:
    @@ -437,7 +437,7 @@
    Suspend stream when tab is not active: + Suspend stream when tab is not active:
    @@ -451,7 +451,7 @@ - - - - - -
    Bad link mode (release keys immediately): + Bad link mode (release keys immediately):
    @@ -461,7 +461,7 @@
    Connect HID to Server: + Connect HID to Server:
    @@ -471,7 +471,7 @@
    Mouse jiggler: + Mouse jiggler:
    @@ -481,7 +481,7 @@
    Mute all input HID events: + Mute all input HID events:
    @@ -491,7 +491,7 @@
    Connect main USB to Server: + Connect main USB to Server:
    @@ -501,7 +501,7 @@
    Enable locator LED: + Enable locator LED:
    @@ -513,8 +513,8 @@

    - - + +
    @@ -543,9 +543,9 @@ -
  • Drive +
  • Drive
  • -
  • Macro +
  • Macro
  • -
  • Text +
  • Text