vue-i18n 国际化
vue-i18n提取 (vue-i18n-extract)
vue-i18n-extract is built to work with your Vue.js projects using vue-i18n. When run vue-18n-extract analyses your Vue.js source code for any vue-i18n key usages (ex. $t(''), $tc(''), ...) as well as your language files (ex. de_DE.js, en_EN.json, ...), in order to:
vue-i18n-extract用于与使用vue-i18n的Vue.js项目一起使用。 运行vue-18n-extract时,将分析您的Vue.js源代码中是否有任何vue-i18n键用法(例如$ t(''),$ tc(''),...)以及语言文件(例如。de_DE.js,en_EN.json,...),以便:
[x] I18NReport keys that are missing in the language files.
[x]语言文件中缺少的I18NReport键。
[x] I18NReport unused keys in the language files.
[x] I18NReport语言文件中未使用的键。
:rocket:入门 (:rocket: Getting Started)
Install vue-i18n-extract
using Yarn
使用Yarn安装vue-i18n-extract
yarn add --dev vue-i18n-extract
Or NPM
或NPM
npm install --save-dev vue-i18n-extract
Note:
vue-i18n-extract
documentation usesyarn
commands, butnpm
will also work. You can compareyarn
andnpm
commands in theyarn
docs, here.注意:
vue-i