🔧 build: 使用 yaml i18n
This commit is contained in:
parent
6700d611b9
commit
91deda2a72
8 changed files with 108 additions and 25 deletions
|
@ -62,9 +62,12 @@
|
|||
* 插件自身的元信息,比如插件描述和自述文件
|
||||
* plugin.json 中的 `description` 和 `readme` 字段,以及对应的 README*.md 文件
|
||||
* 插件中使用的文本,比如按钮文字和提示信息
|
||||
* src/i18n/*.json 语言配置文件
|
||||
* public/i18n/*.json 语言配置文件
|
||||
* 代码中使用 `this.i18.key` 获取文本
|
||||
* 最后在 plugin.json 中的 `i18n` 字段中声明该插件支持的语言
|
||||
* yaml 支持
|
||||
* 本模板特别支持基于 Yaml 语法的 I18n,见 `public/i18n/zh_CN.yaml`
|
||||
* 编译时,会自动把定义的 yaml 文件翻译成 json 文件放到 dist 或 dev 目录下
|
||||
|
||||
建议插件至少支持英文和简体中文,这样可以方便更多人使用。
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue