2.2.14 • Published 12 months ago
xlsx-auto-json v2.2.14
xlsx-auto-json
安装
npm i xlsx-auto-json
使用
在您的项目根目录下创建 translate.config.(js|ts)
进行配置
const config = {
noFoundTest: '***noFoundTest***',
initKey: 'Language.Demo.',
contrastLangIndex: 1,
defaultValueIndex: 1,
fromXlsxPath: '(path).xlsx',
translate: [
{
targetLang: 'zh',
targetIndex: 1,
outPath: `(path)/(...).json`,
},
{
targetLang: 'tw',
targetIndex: 2,
outPath: `(path)/(...).json`,
},
{
targetLang: 'en',
targetIndex: 3,
outPath: `(path)/(...).json`,
},
{
targetLang: 'ja',
targetIndex: 4,
outPath: `(path)/(...).json`,
},
{
targetLang: 'br',
targetIndex: 5,
outPath: `(path)/(...).json`,
},
{
targetLang: 'tr',
targetIndex: 6,
outPath: `(path)/(...).json`,
},
{
targetLang: 'ru',
targetIndex: 7,
outPath: `(path)/(...).json`,
},
{
targetLang: 'vn',
targetIndex: 8,
outPath: `(path)/(...).json`,
},
{
targetLang: 'id',
targetIndex: 8,
outPath: `(path)/(...).json`,
},
],
}
export default config
在 package.json
中加入 scripts 命令
"scripts": {
"translate": "translate"
}
在终端执行命令启动翻译
npm run translate
不出意外的话就成功了
2.2.14
12 months ago
2.2.13
1 year ago
2.2.11
1 year ago
2.2.12
1 year ago
2.2.1
2 years ago
2.2.3
2 years ago
2.2.2
2 years ago
2.2.5
2 years ago
2.2.4
2 years ago
2.2.7
2 years ago
2.2.6
2 years ago
2.2.10
2 years ago
2.2.9
2 years ago
2.2.8
2 years ago
2.1.2
2 years ago
2.1.1
2 years ago
2.1.0
2 years ago
2.0.6
2 years ago
2.0.4
2 years ago
2.0.3
2 years ago
2.0.2
2 years ago
2.0.1
2 years ago
2.0.0
2 years ago
1.2.4
2 years ago
1.2.3
2 years ago
1.2.2
2 years ago
1.2.1
2 years ago
1.2.0
2 years ago
1.1.15
2 years ago
1.1.14
2 years ago
1.1.13
2 years ago
1.1.12
2 years ago
1.1.11
2 years ago
1.1.10
2 years ago
1.1.9
2 years ago
1.1.8
2 years ago
1.1.7
2 years ago
1.1.6
2 years ago
1.1.5
2 years ago
1.1.4
2 years ago
1.1.3
2 years ago
1.1.2
2 years ago
1.1.1
2 years ago
1.1.0
2 years ago
1.0.3
2 years ago
1.0.2
2 years ago
1.0.1
2 years ago
1.0.0
2 years ago