进一步的 kvmd 国际化(汉化)支持,添加配置入口

yaml 配置示例:
```
languages:
    console: zh
    web: zh
```
This commit is contained in:
mofeng-git
2024-08-14 22:54:12 +08:00
parent 5b25b3661f
commit 35397c5414
47 changed files with 567 additions and 181 deletions

View File

@@ -26,7 +26,7 @@ import dataclasses
import itertools
import argparse
from ...lanuages import Lanuages
from ...languages import Languages
from ...logging import get_logger
@@ -89,7 +89,7 @@ class _Service: # pylint: disable=too-many-instance-attributes
self.__gadget: str = config.otg.gadget
self.__driver: str = config.otg.devices.ethernet.driver
self.gettext=Lanuages().gettext
self.gettext=Languages().gettext
def start(self) -> None:
asyncio.run(self.__run(True))