WEB 网页汉化

This commit is contained in:
mofeng-git 2024-09-12 17:24:58 +08:00
parent 6ad3fa2056
commit 56a591d51f
6 changed files with 117 additions and 55 deletions

View File

@ -653,26 +653,26 @@
</div> </div>
</div> </div>
</li> </li>
<li class="right" id="macro-dropdown"><a class="menu-button" href="#"><img class="led-gray" id="hid-recorder-led" src="/share/svg/led-gear.svg"><span>Macro</span></a> <li class="right" id="macro-dropdown"><a class="menu-button" href="#"><img class="led-gray" id="hid-recorder-led" src="/share/svg/led-gear.svg"><span i18n="kvm_text32">Macro</span></a>
<div class="menu"> <div class="menu">
<div class="text"><b>Record and play HID/ATX/GPIO actions<br></b><sub>For security reasons, the record will not be saved on the PiKVM</sub></div> <div class="text"><b i18n="kvm_text33">Record and play HID/ATX/GPIO actions<br></b><sub i18n="kvm_text34">For security reasons, the record will not be saved on the PiKVM</sub></div>
<hr> <hr>
<div class="buttons buttons-row"> <div class="buttons buttons-row">
<button class="row25" disabled data-force-hide-menu id="hid-recorder-record">&bull; Rec</button> <button class="row25" disabled data-force-hide-menu id="hid-recorder-record" i18n="kvm_text35">&bull; Rec</button>
<button class="row25" disabled id="hid-recorder-stop">Stop</button> <button class="row25" disabled id="hid-recorder-stop" i18n="kvm_text36">Stop</button>
<button class="row25" disabled id="hid-recorder-play">Play</button> <button class="row25" disabled id="hid-recorder-play" i18n="kvm_text37">Play</button>
<button class="row25" disabled id="hid-recorder-clear">Clear</button> <button class="row25" disabled id="hid-recorder-clear" i18n="kvm_text38">Clear</button>
</div> </div>
<hr> <hr>
<table class="kv"> <table class="kv">
<tr> <tr>
<td>Script time:</td> <td i18n="kvm_text39">Script time:</td>
<td class="value" colspan="2" id="hid-recorder-time">00:00:00.0</td> <td class="value" colspan="2" id="hid-recorder-time">00:00:00.0</td>
</tr> </tr>
<tr> <tr>
<td>Scripted events:</td> <td i18n="kvm_text40">Scripted events:</td>
<td class="value" id="hid-recorder-events-count">0</td> <td class="value" id="hid-recorder-events-count">0</td>
<td><sup><i>include delays</i></sup></td> <td><sup><i i18n="kvm_text41">include delays</i></sup></td>
</tr> </tr>
</table> </table>
<hr> <hr>
@ -690,14 +690,14 @@
<hr> <hr>
<input type="file" id="hid-recorder-new-script-file"> <input type="file" id="hid-recorder-new-script-file">
<div class="buttons buttons-row"> <div class="buttons buttons-row">
<button class="row50" disabled id="hid-recorder-upload">Upload script</button> <button class="row50" disabled id="hid-recorder-upload" i18n="kvm_text42">Upload script</button>
<button class="row50" disabled id="hid-recorder-download">Download script</button> <button class="row50" disabled id="hid-recorder-download" i18n="kvm_text43">Download script</button>
</div> </div>
</div> </div>
</li> </li>
<li class="right" id="text-dropdown"><a class="menu-button" href="#"><img class="feature-disabled" id="stream-ocr-led" src="/share/svg/led-gear.svg"><span>Text</span></a> <li class="right" id="text-dropdown"><a class="menu-button" href="#"><img class="feature-disabled" id="stream-ocr-led" src="/share/svg/led-gear.svg"><span i18n="kvm_text44">Text</span></a>
<div class="menu" id="text-menu"> <div class="menu" id="text-menu">
<div class="text"><b>Paste text as keypress sequence<br></b><sub>Please note that PiKVM cannot switch the keyboard layout</sub></div> <div class="text"><b i18n="kvm_text45">Paste text as keypress sequence<br></b><sub i18n="kvm_text46">Please note that PiKVM cannot switch the keyboard layout</sub></div>
<hr> <hr>
<div class="text" style="margin-right: 20px"> <div class="text" style="margin-right: 20px">
<textarea id="hid-pak-text" data-focus placeholder="Enter your text here"></textarea> <textarea id="hid-pak-text" data-focus placeholder="Enter your text here"></textarea>
@ -705,9 +705,9 @@
<table class="kv"> <table class="kv">
<tr> <tr>
<td> <td>
<button disabled data-force-hide-menu id="hid-pak-button">&bull; Paste</button> <button disabled data-force-hide-menu id="hid-pak-button" i18n="kvm_text47">&bull; Paste</button>
</td> </td>
<td>using host keymap</td> <td i18n="kvm_text48">using host keymap</td>
<td> <td>
<select id="hid-pak-keymap-selector"></select> <select id="hid-pak-keymap-selector"></select>
</td> </td>
@ -736,26 +736,26 @@
<div class="feature-disabled" id="stream-ocr"> <div class="feature-disabled" id="stream-ocr">
<hr><br> <hr><br>
<hr> <hr>
<div class="text"><b>Text recognition <sup><i>&beta;</i></sup><br></b><sub><a target="_blank" href="https://docs.pikvm.org/ocr">OCR</a> works locally on PiKVM</sub></div> <div class="text"><b i18n="kvm_text49">Text recognition <sup><i>&beta;</i></sup><br></b><sub i18n="kvm_text50"><a target="_blank" href="https://docs.pikvm.org/ocr">OCR</a> works locally on PiKVM</sub></div>
<hr> <hr>
<table class="kv"> <table class="kv">
<tr> <tr>
<td> <td>
<button data-force-hide-menu id="stream-ocr-button">&bull; Select area</button> <button data-force-hide-menu id="stream-ocr-button" i18n="kvm_text51">&bull; Select area</button>
</td> </td>
<td>for</td> <td i18n="kvm_text52">for</td>
<td> <td>
<select id="stream-ocr-lang-selector"></select> <select id="stream-ocr-lang-selector"></select>
</td> </td>
<td>text recognition</td> <td i18n="kvm_text53">text recognition</td>
</tr> </tr>
</table> </table>
<table class="kv"> <table class="kv">
<tr> <tr>
<td colspan="4">&bull; Press <b>Enter</b> to recognize and copy text to clipboard</td> <td colspan="4" i18n="kvm_text54">&bull; Press <b>Enter</b> to recognize and copy text to clipboard</td>
</tr> </tr>
<tr> <tr>
<td colspan="4">&bull; Press <b>Esc</b> to cancel selection</td> <td colspan="4" i18n="kvm_text55">&bull; Press <b>Esc</b> to cancel selection</td>
</tr> </tr>
<tr> <tr>
<td></td> <td></td>
@ -764,9 +764,9 @@
</div> </div>
</div> </div>
</li> </li>
<li class="right" id="shortcuts-dropdown"><a class="menu-button" href="#">Shortcuts</a> <li class="right" id="shortcuts-dropdown"><a class="menu-button" href="#" i18n="kvm_text56">Shortcuts</a>
<div class="menu" id="shortcuts-menu"> <div class="menu" id="shortcuts-menu">
<div class="text"><b>Quick keyboard shortcuts<br></b><sub>Also see <i>System &rarr; Show keyboard</i></sub></div> <div class="text"><b i18n="kvm_text57">Quick keyboard shortcuts<br></b><sub i18n="kvm_text58">Also see <i>System &rarr; Show keyboard</i></sub></div>
<hr> <hr>
<div class="buttons"> <div class="buttons">
<div class="buttons-row"> <div class="buttons-row">
@ -808,7 +808,7 @@
<hr> <hr>
<div class="text"> <div class="text">
&darr; &bull; Alt+SysRq+... <sup><i>linux magic &darr; &bull; Alt+SysRq+... <sup><i>linux magic
<a target="_blank" href="https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html">help</a></i></sup> <a target="_blank" href="https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html" i18n="kvm_text59">help</a></i></sup>
</div> </div>
<hr> <hr>
<div class="buttons"> <div class="buttons">

View File

@ -1,30 +1,30 @@
li(id="macro-dropdown" class="right") li(id="macro-dropdown" class="right")
a(class="menu-button" href="#") a(class="menu-button" href="#")
+navbar_led("hid-recorder-led", "led-gear") +navbar_led("hid-recorder-led", "led-gear")
span Macro span(i18n="kvm_text32") Macro
div(class="menu") div(class="menu")
div(class="text") div(class="text")
b Record and play HID/ATX/GPIO actions#[br] b(i18n="kvm_text33") Record and play HID/ATX/GPIO actions#[br]
sub For security reasons, the record will not be saved on the PiKVM sub(i18n="kvm_text34") For security reasons, the record will not be saved on the PiKVM
hr hr
div(class="buttons buttons-row") div(class="buttons buttons-row")
button(disabled data-force-hide-menu id="hid-recorder-record" class="row25") &bull; Rec button(disabled data-force-hide-menu id="hid-recorder-record" class="row25" i18n="kvm_text35") &bull; Rec
button(disabled id="hid-recorder-stop" class="row25") Stop button(disabled id="hid-recorder-stop" class="row25" i18n="kvm_text36") Stop
button(disabled id="hid-recorder-play" class="row25") Play button(disabled id="hid-recorder-play" class="row25" i18n="kvm_text37") Play
button(disabled id="hid-recorder-clear" class="row25") Clear button(disabled id="hid-recorder-clear" class="row25" i18n="kvm_text38") Clear
hr hr
table(class="kv") table(class="kv")
tr tr
td Script time: td(i18n="kvm_text39") Script time:
td(colspan="2" id="hid-recorder-time" class="value") 00:00:00.0 td(colspan="2" id="hid-recorder-time" class="value") 00:00:00.0
tr tr
td Scripted events: td(i18n="kvm_text40") Scripted events:
td(id="hid-recorder-events-count" class="value") 0 td(id="hid-recorder-events-count" class="value") 0
td #[sup #[i include delays]] td #[sup #[i(i18n="kvm_text41") include delays]]
hr hr
+menu_switch("hid-recorder-loop-switch", "Infinite loop playback", false, false) +menu_switch("hid-recorder-loop-switch", "Infinite loop playback", false, false)
hr hr
input(type="file" id="hid-recorder-new-script-file") input(type="file" id="hid-recorder-new-script-file")
div(class="buttons buttons-row") div(class="buttons buttons-row")
button(disabled id="hid-recorder-upload" class="row50") Upload script button(disabled id="hid-recorder-upload" class="row50" i18n="kvm_text42") Upload script
button(disabled id="hid-recorder-download" class="row50") Download script button(disabled id="hid-recorder-download" class="row50" i18n="kvm_text43") Download script

View File

@ -1,9 +1,9 @@
li(id="shortcuts-dropdown" class="right") li(id="shortcuts-dropdown" class="right")
a(class="menu-button" href="#") Shortcuts a(class="menu-button" href="#" i18n="kvm_text56") Shortcuts
div(id="shortcuts-menu" class="menu") div(id="shortcuts-menu" class="menu")
div(class="text") div(class="text")
b Quick keyboard shortcuts#[br] b(i18n="kvm_text57") Quick keyboard shortcuts#[br]
sub Also see #[i System &rarr; Show keyboard] sub(i18n="kvm_text58") Also see #[i System &rarr; Show keyboard]
hr hr
div(class="buttons") div(class="buttons")
div(class="buttons-row") div(class="buttons-row")
@ -38,7 +38,7 @@ li(id="shortcuts-dropdown" class="right")
hr hr
div(class="text") div(class="text")
| &darr; &bull; Alt+SysRq+... <sup><i>linux magic | &darr; &bull; Alt+SysRq+... <sup><i>linux magic
| #[a(target="_blank" href="https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html") help]</i></sup> | #[a(target="_blank" href="https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html" i18n="kvm_text59") help]</i></sup>
hr hr
div(class="buttons") div(class="buttons")
div(class="buttons-row") div(class="buttons-row")

View File

@ -1,19 +1,19 @@
li(id="text-dropdown" class="right") li(id="text-dropdown" class="right")
a(class="menu-button" href="#") a(class="menu-button" href="#")
+navbar_led("stream-ocr-led", "led-gear", "feature-disabled") +navbar_led("stream-ocr-led", "led-gear", "feature-disabled")
span Text span(i18n="kvm_text44") Text
div(id="text-menu" class="menu") div(id="text-menu" class="menu")
div(class="text") div(class="text")
b Paste text as keypress sequence#[br] b(i18n="kvm_text45") Paste text as keypress sequence#[br]
sub Please note that PiKVM cannot switch the keyboard layout sub(i18n="kvm_text46") Please note that PiKVM cannot switch the keyboard layout
hr hr
div(class="text" style="margin-right: 20px") div(class="text" style="margin-right: 20px")
textarea(id="hid-pak-text" data-focus placeholder="Enter your text here") textarea(id="hid-pak-text" data-focus placeholder="Enter your text here")
table(class="kv") table(class="kv")
tr tr
td td
button(disabled data-force-hide-menu id="hid-pak-button") &bull; Paste button(disabled data-force-hide-menu id="hid-pak-button" i18n="kvm_text47") &bull; Paste
td using host keymap td(i18n="kvm_text48") using host keymap
td td
select(id="hid-pak-keymap-selector") select(id="hid-pak-keymap-selector")
table(class="kv") table(class="kv")
@ -26,21 +26,21 @@ li(id="text-dropdown" class="right")
br br
hr hr
div(class="text") div(class="text")
b Text recognition <sup><i>&beta;</i></sup>#[br] b(i18n="kvm_text49") Text recognition <sup><i>&beta;</i></sup>#[br]
sub #[a(target="_blank" href="https://docs.pikvm.org/ocr") OCR] works locally on PiKVM sub(i18n="kvm_text50") #[a(target="_blank" href="https://docs.pikvm.org/ocr") OCR] works locally on PiKVM
hr hr
table(class="kv") table(class="kv")
tr tr
td td
button(data-force-hide-menu id="stream-ocr-button") &bull; Select area button(data-force-hide-menu id="stream-ocr-button" i18n="kvm_text51") &bull; Select area
td for td(i18n="kvm_text52") for
td td
select(id="stream-ocr-lang-selector") select(id="stream-ocr-lang-selector")
td text recognition td(i18n="kvm_text53") text recognition
table(class="kv") table(class="kv")
tr tr
td(colspan="4") &bull; Press #[b Enter] to recognize and copy text to clipboard td(colspan="4" i18n="kvm_text54") &bull; Press #[b Enter] to recognize and copy text to clipboard
tr tr
td(colspan="4") &bull; Press #[b Esc] to cancel selection td(colspan="4" i18n="kvm_text55") &bull; Press #[b Esc] to cancel selection
tr tr
td td

View File

@ -58,5 +58,36 @@
"kvm_text28":"Reverse scrolling:", "kvm_text28":"Reverse scrolling:",
"kvm_text29":"Scroll rate:", "kvm_text29":"Scroll rate:",
"kvm_text30":"&bull; Show keyboard", "kvm_text30":"&bull; Show keyboard",
"kvm_text31":"Reset HID" "kvm_text31":"Reset HID",
"kvm_text32":"Macro",
"kvm_text33":"Record and play HID/ATX/GPIO actions<br>",
"kvm_text34":"For security reasons, the record will not be saved on the PiKVM",
"kvm_text35":"Rec",
"kvm_text36":"Stop",
"kvm_text37":"Play",
"kvm_text38":"Clear",
"kvm_text39":"Script time:",
"kvm_text40":"Scripted events:",
"kvm_text41":"include delays",
"kvm_text42":"Upload script",
"kvm_text43":"Download script",
"kvm_text44":"Text",
"kvm_text45":"Paste text as keypress sequence<br>",
"kvm_text46":"Please note that One-KVM cannot switch the keyboard layout",
"kvm_text47":"&bull; Paste",
"kvm_text48":"using host keymap",
"kvm_text49":"Text recognition <sup><i>&beta;</i></sup><br>",
"kvm_text50":"OCR works locally on One-KVM",
"kvm_text51":"&bull; Select area",
"kvm_text52":"for",
"kvm_text53":"text recognition",
"kvm_text54":"Press <b>Enter</b> to recognize and copy text to clipboard",
"kvm_text55":"Press <b>Esc</b> to cancel selection",
"kvm_text56":"Shortcuts",
"kvm_text57":"Quick keyboard shortcuts<br>",
"kvm_text58":"Also see <i>System &rarr; Show keyboard<i>",
"kvm_text59":"help"
} }

View File

@ -29,7 +29,7 @@
"ipmi_text3":"<b>不建议</b>为 KVMD 和 IPMI 用户使用相同的密码,或者直接关闭 IPMI。如有需要可以通过 curl 直接使用 KVMD API。下面是一些示例", "ipmi_text3":"<b>不建议</b>为 KVMD 和 IPMI 用户使用相同的密码,或者直接关闭 IPMI。如有需要可以通过 curl 直接使用 KVMD API。下面是一些示例",
"kvm_text1":"关于", "kvm_text1":"关于",
"kvm_text2":"//这些<a href=\"https://github.com/pikvm/pikvm?tab=readme-ov-file#special-thanks\">好心人</a>向 PiKVM 项目捐款并支持其工作,非常感谢他们的帮助。<br>//如果您也想支持 PiKVM 可以在 <a target=\"_blank\" href=\"https://www.patreon.com/pikvm\"> Patreon</a> 或 <a target=\"_blank\" href=\"https://paypal.me/pikvm\"> PayPal 上捐款</a>。<br><br>//这些<a href=\"https://one-kvm.mofeng.run/thanks/#_2\">好心人</a>向 One-KVM 项目捐款并支持其工作,非常感谢他们的帮助。<br>//如果您也想支持 One-KVM 可以在 <a target=\"_blank\" href=\"https://afdian.com/a/silentwind\"> 为爱发电 </a>上捐款</a>。", "kvm_text2":"//<a href=\"https://github.com/pikvm/pikvm?tab=readme-ov-file#special-thanks\">这些人</a>向 PiKVM 项目捐款并支持其工作,非常感谢他们的帮助。<br>//如果您也想支持 PiKVM ,可以在 <a target=\"_blank\" href=\"https://www.patreon.com/pikvm\"> Patreon</a> 或 <a target=\"_blank\" href=\"https://paypal.me/pikvm\"> PayPal 上捐款</a>。<br><br>//<a href=\"https://one-kvm.mofeng.run/thanks/#_2\">这些人</a>向 One-KVM 项目捐款并支持其工作,非常感谢他们的帮助。<br>//如果您也想支持 One-KVM ,可以在 <a target=\"_blank\" href=\"https://afdian.com/a/silentwind\"> 为爱发电 </a>上捐款</a>。",
"kvm_text3":"系统", "kvm_text3":"系统",
"kvm_text4":"运行设置 &amp; 工具", "kvm_text4":"运行设置 &amp; 工具",
"kvm_text5":"终端", "kvm_text5":"终端",
@ -58,5 +58,36 @@
"kvm_text28":"反向滚动:", "kvm_text28":"反向滚动:",
"kvm_text29":"滚动速率:", "kvm_text29":"滚动速率:",
"kvm_text30":"显示虚拟键盘", "kvm_text30":"显示虚拟键盘",
"kvm_text31":"重置 HID" "kvm_text31":"重置 HID",
"kvm_text32":"宏",
"kvm_text33":"录制或重放 HID/ATX/GPIO 操作<br>",
"kvm_text34":"出于安全原因,录制的脚本默认不会保存到 One-KVM 主机上",
"kvm_text35":"录制",
"kvm_text36":"停止",
"kvm_text37":"重放",
"kvm_text38":"清除",
"kvm_text39":"脚本时间:",
"kvm_text40":"脚本事件:",
"kvm_text41":"包括延迟",
"kvm_text42":"上传脚本文件",
"kvm_text43":"下载脚本文件",
"kvm_text44":"文本",
"kvm_text45":"以按键序列方式粘贴文本<br>",
"kvm_text46":"请注意 One-KVM 无法自动切换被控机键盘布局",
"kvm_text47":"&bull; 粘贴",
"kvm_text48":"使用的键盘布局",
"kvm_text49":"文本识别<br>",
"kvm_text50":"文本识别仅在 One-KVM 主机上本地运行",
"kvm_text51":"&bull; 框选识别区域",
"kvm_text52":"进行",
"kvm_text53":"文本识别",
"kvm_text54":"按下 <b>Enter</b> 确认所选区域并将识别结果复制到粘贴板",
"kvm_text55":"按下 <b>Esc</b> 取消框选",
"kvm_text56":"快捷键",
"kvm_text57":"键盘快捷键<br>",
"kvm_text58":"也可以查看 <i>系统 &rarr; 显示键盘<i>",
"kvm_text59":"帮助"
} }