mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-30 09:31:53 +08:00
进一步的 kvmd 国际化(汉化)支持,添加配置入口
yaml 配置示例:
```
languages:
console: zh
web: zh
```
This commit is contained in:
@@ -41,7 +41,7 @@ from ....validators.basic import valid_float_f01
|
||||
from ....validators.os import valid_abs_path
|
||||
from ....validators.hw import valid_tty_speed
|
||||
|
||||
from ....lanuages import Lanuages
|
||||
from ....languages import Languages
|
||||
|
||||
from .. import BaseHid
|
||||
|
||||
@@ -84,7 +84,7 @@ class Plugin(BaseHid, multiprocessing.Process): # pylint: disable=too-many-inst
|
||||
self.__keyboard = Keyboard()
|
||||
self.__mouse = Mouse()
|
||||
|
||||
self.gettext=Lanuages().gettext
|
||||
self.gettext=Languages().gettext
|
||||
|
||||
@classmethod
|
||||
def get_plugin_options(cls) -> dict:
|
||||
|
||||
@@ -25,7 +25,7 @@ import contextlib
|
||||
|
||||
from typing import Generator
|
||||
|
||||
from ....lanuages import Lanuages
|
||||
from ....languages import Languages
|
||||
|
||||
|
||||
# =====
|
||||
@@ -37,7 +37,7 @@ class ChipResponseError(Exception):
|
||||
class ChipConnection:
|
||||
def __init__(self, tty: serial.Serial) -> None:
|
||||
self.__tty = tty
|
||||
self.gettext=Lanuages().gettext
|
||||
self.gettext=Languages().gettext
|
||||
|
||||
def xfer(self, cmd: bytes) -> int:
|
||||
self.__send(cmd)
|
||||
|
||||
Reference in New Issue
Block a user