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
我安装了杂鱼语言包,并且设置回退顺序为
然后测试了命令,结果是没有成功把内容本地化。
如需在 Koishi 实例上重现,只需安装并启用 locale-zh-cn-zako ,设置下图的回退顺序:
locale-zh-cn-zako
运行 help help 即可看到没有成功本地化的命令输出:
help help
代码复现:
import { fallback, LocaleTree } from '@koishijs/i18n-utils' const locales = ['zh-CN-ZAKO', 'en-US', 'zh-CN'] const tree = LocaleTree.from(locales) console.log(fallback(tree, []))
运行上面的代码,输出:
[ '', 'zh', 'zh-CN', 'zh-CN-ZAKO', 'en', 'en-US' ]
手动设置用户语言为相应语言,则可成功本地化:
上面的代码应该输出:
[ '','zh-CN-ZAKO','zh-CN','zh', 'en-US','en']
理论应是细分类优先,并且按照传入 fallback 的 locales 和 LocaleTree.from 的传入顺序排序
fallback
locales
LocaleTree.from
No response
The text was updated successfully, but these errors were encountered:
好像是有一点点设计上的缺陷,我看看如何调整一下这里的语义。
Sorry, something went wrong.
No branches or pull requests
Describe the bug
我安装了杂鱼语言包,并且设置回退顺序为
然后测试了命令,结果是没有成功把内容本地化。
Steps to reproduce
如需在 Koishi 实例上重现,只需安装并启用
locale-zh-cn-zako
,设置下图的回退顺序:运行
help help
即可看到没有成功本地化的命令输出:代码复现:
运行上面的代码,输出:
Expected behavior
手动设置用户语言为相应语言,则可成功本地化:
上面的代码应该输出:
理论应是细分类优先,并且按照传入
fallback
的locales
和LocaleTree.from
的传入顺序排序Screenshots
No response
Versions
Additional context
No response
The text was updated successfully, but these errors were encountered: