We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
执行指令参数指定有误时返回的错误提示总是使用缺省语言。
i18n.locales
zh
zh-
channel.locale en-US
user.locale en-US
authorize -u @Alice foobar
参数 value 输入无效,应为自然数。
en
en-
Invalid argument value, Expect a non-negative integer.
channel.locale zh-CN
user.locale zh-CN
以当前会话的首选语言显示该提示。
No response
session.text() 被调用时,似乎还在进行 attach-user 的过程中,argv.session.user、argv.session.channel 均为 undefined;大致调用栈:
session.text()
attach-user
argv.session.user
argv.session.channel
undefined
koishi/packages/core/src/command/index.ts
Lines 418 to 419 in d06e1e9
koishi/packages/core/src/command/parser.ts
Line 412 in d06e1e9
Line 317 in d06e1e9
koishi/packages/core/src/session.ts
Line 390 in d06e1e9
Line 394 in d06e1e9
koishi/packages/core/src/middleware.ts
Line 79 in d06e1e9
Line 220 in d06e1e9
The text was updated successfully, but these errors were encountered:
internal.invalid-argument
或许 related to #1414
Sorry, something went wrong.
No branches or pull requests
Describe the bug
执行指令参数指定有误时返回的错误提示总是使用缺省语言。
Steps to reproduce
i18n.locales
的首项为zh
或以zh-
开头channel.locale en-US
,user.locale en-US
authorize -u @Alice foobar
返回:参数 value 输入无效,应为自然数。
i18n.locales
的首项为en
或以en-
开头authorize -u @Alice foobar
返回:Invalid argument value, Expect a non-negative integer.
channel.locale zh-CN
,user.locale zh-CN
authorize -u @Alice foobar
仍然返回:Invalid argument value, Expect a non-negative integer.
Expected behavior
以当前会话的首选语言显示该提示。
Screenshots
No response
Versions
Additional context
session.text()
被调用时,似乎还在进行attach-user
的过程中,argv.session.user
、argv.session.channel
均为undefined
;大致调用栈:koishi/packages/core/src/command/index.ts
Lines 418 to 419 in d06e1e9
koishi/packages/core/src/command/parser.ts
Line 412 in d06e1e9
koishi/packages/core/src/command/index.ts
Line 317 in d06e1e9
koishi/packages/core/src/session.ts
Line 390 in d06e1e9
koishi/packages/core/src/session.ts
Line 394 in d06e1e9
koishi/packages/core/src/middleware.ts
Line 79 in d06e1e9
koishi/packages/core/src/middleware.ts
Line 220 in d06e1e9
The text was updated successfully, but these errors were encountered: