mirror of
https://github.com/mofeng-git/One-KVM.git
synced 2026-01-29 17:11:52 +08:00
进一步的 kvmd 国际化(汉化)支持,添加配置入口
yaml 配置示例:
```
languages:
console: zh
web: zh
```
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user