migrate user-facing text to i18n (#581)

This commit is contained in:
呵呵です
2026-01-27 05:20:41 +08:00
committed by GitHub
parent 95aa00e2cd
commit 28a02aec0f
20 changed files with 302 additions and 54 deletions

View File

@@ -7,7 +7,7 @@ from nonebot.typing import T_Handler
from nonebot_plugin_alconna import AlcMatches, Alconna, At, CommandMeta, on_alconna
from .. import ns
from ..i18n.model import Lang
from ..i18n import Lang
from ..utils.exception import MessageFormatError, NeedCatchError
command: Alconna = Alconna(
@@ -47,7 +47,7 @@ async def _(matcher: Matcher, matches: AlcMatches):
if (matches.head_matched and matches.options != {}) or matches.main_args == {}:
await matcher.finish(
(f'{matches.error_info!r}\n' if matches.error_info is not None else '')
+ f'输入"{matches.header_result} --help"查看帮助'
+ Lang.help.usage(command=matches.header_result)
)