@makat/i18ntool

1.0.9-beta.5 • Public • Published

背景

项目中国际化配置可能分散在不同 js 或 ts 文件中,且不便于产品核对翻译是否准确。 此工具可将项目下命名中含有 i18n 的文件中的翻译对提取到 excel 中。

安装

npm install -g @makat/i18ntool

使用说明

请在进入要翻译的项目,执行一下命令i18ntool,生成的 excel。 会默认输出到./i18n 下

i18ntool
Options:
  -r, --read              读取i18n文件, 生成excel
  -w, --write             读取excel, 回写i18n文件
  -d, --dir  <string>  excel所在目录 (default: ./i18n)
  -h, --help              display help for command

Ps: 如果是 angular 项目,会根据 angular.json 解析子项目,每个子项目会单独生成翻译的 excel。 其他类型则根据当前文件夹名称合并成一个 excel。

会根据 i18n文件名中含有zh或en提取中英文,暂不支持其他语言

Readme

Keywords

none

Package Sidebar

Install

npm i @makat/i18ntool

Weekly Downloads

11

Version

1.0.9-beta.5

License

ISC

Unpacked Size

4.07 MB

Total Files

8

Last publish

Collaborators

  • makat