arco-design-internationalization-check
v2.0.1
Published
a package for checking the internationalization
Downloads
1
Maintainers
Readme
这是一个用户arco-desgin组件库的包,可以帮助你查看你在项目里有哪些国际化翻译漏掉没有写的。
使用( example ): 1. npm install 一下 (npm this package)
创建一个js文件 (create a js file)
/* eslint-disable @typescript-eslint/no-var-requires */ const { findMissKey } = require('arco-design-internationalization-check')
// 这里读取你的国际化文件 (you can use those to read your locales files‘ content )
const zhJson = require('../locales/zh/plugin__console-plugin-eip.json'); const enJson = require('../locales/en/plugin__console-plugin-eip.json');
// 最后会在控制台输出哪些key缺少了对应的翻译 ( finally, it‘ll print in console to tell you which keys are missing the translate )
findMissKey(zhJson,enJson)