2.2.13 • Published 1 month ago
xlsx-auto-json v2.2.13
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.13
1 month ago
2.2.11
1 month ago
2.2.12
1 month ago
2.2.1
5 months ago
2.2.3
5 months ago
2.2.2
5 months ago
2.2.5
5 months ago
2.2.4
5 months ago
2.2.7
5 months ago
2.2.6
5 months ago
2.2.10
5 months ago
2.2.9
5 months ago
2.2.8
5 months ago
2.1.2
5 months ago
2.1.1
5 months ago
2.1.0
5 months ago
2.0.6
5 months ago
2.0.4
5 months ago
2.0.3
6 months ago
2.0.2
6 months ago
2.0.1
6 months ago
2.0.0
6 months ago
1.2.4
6 months ago
1.2.3
6 months ago
1.2.2
6 months ago
1.2.1
6 months ago
1.2.0
6 months ago
1.1.15
6 months ago
1.1.14
6 months ago
1.1.13
6 months ago
1.1.12
6 months ago
1.1.11
6 months ago
1.1.10
6 months ago
1.1.9
6 months ago
1.1.8
6 months ago
1.1.7
6 months ago
1.1.6
6 months ago
1.1.5
6 months ago
1.1.4
6 months ago
1.1.3
6 months ago
1.1.2
6 months ago
1.1.1
6 months ago
1.1.0
6 months ago
1.0.3
6 months ago
1.0.2
6 months ago
1.0.1
6 months ago
1.0.0
6 months ago