进一步的 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

@@ -28,7 +28,7 @@ from typing import AsyncGenerator
import aiohttp
import aiohttp.multipart
from .lanuages import Lanuages
from .languages import Languages
from . import __version__
@@ -60,7 +60,7 @@ def get_filename(response: aiohttp.ClientResponse) -> str:
try:
return os.path.basename(response.url.path)
except Exception:
raise aiohttp.ClientError(Lanuages().gettext("Can't determine filename"))
raise aiohttp.ClientError(Languages().gettext("Can't determine filename"))
@contextlib.asynccontextmanager