i18njson

1.0.3 • Public • Published

i18njson NPM version

根据zh-cn.js自动生成翻译excel文档及生成en.js


Feature

  • 根据zh-cn.js自动生成翻译excel文档及生成en.js

Install

$ npm i i18njson -g

Usage

$ i18njson --help
遍历执行目录下的i18n文件夹,整理其目录下的zh-cn.js内容生成i18n.xlsx

格式: i18njson excel filepath

i18njson excel ./
根据翻译文档自动在相应的路径下自动生成「en.js」文件

格式:i18njson json xxx.xlsx 如:

i18njson json i18n.xlsx
大致使用流程
  • 在项目中建立各个i18n文件夹,及其目录下的zh-cn.js,完善里面的key值及中文填写
  • 在项目的根目录下执行i18njson excel ./生成i18n.excel文档
  • i18n.excel将给翻译小组翻译写入相应的英文(excel文档下可能有多个sheets,提醒翻译小组别漏译)
  • 对翻译过的i18n.excel执行命令, i18njson json i18n.excel
i18njson build 废弃

Readme

Keywords

none

Package Sidebar

Install

npm i i18njson

Weekly Downloads

5

Version

1.0.3

License

MIT

Last publish

Collaborators

  • mosikoo