初步的 kvmd 国际化(汉化)支持

1. 添加汉化文件
2. 添加 Lanuages().gettext 函数处理字符替换
3. 修改相关字符串调用
This commit is contained in:
mofeng-git
2024-08-06 21:45:16 +08:00
parent 6a966af5fb
commit 20927c7226
34 changed files with 999 additions and 113 deletions

View File

@@ -32,6 +32,8 @@ from ...logging import get_logger
from ... import htclient
from ...lanuages import Lanuages
from . import BaseAuthService
@@ -89,7 +91,7 @@ class Plugin(BaseAuthService):
htclient.raise_not_200(response)
return True
except Exception:
get_logger().exception("Failed HTTP auth request for user %r", user)
get_logger().exception(Lanuages().gettext("Failed HTTP auth request for user %r"), user)
return False
async def cleanup(self) -> None: