npm

Bring the best of OSS JavaScript development to your projects with npm Orgs - private packages & team management tools.Learn more »

yealink-i18n2

0.0.10 • Public • Published

管理后台添加项目,获取PID(项目TOKEN);

安装依赖: npm install yealink-i18n2

初始化项目,按照提示输入用户名,密码,PID: node node_modules/yealink-i18n2/ {PID}

自动替换源码中的中文为KEY值,并自动上传到系统: npm run i18n:upload

获取翻译完成的最新国际化: npm run i18n:get

发布本地源码至预览环境: npm run i18n:upload

配置文件说明

{
   "projectInitData": {
       "debug": "false",
       "model": "english",
       "customRegular": "(?<=\\$t\\s*\\()\\s*'([\\s\\S]*?)(\\S*?)'|(?<=\\$t\\s*\\(\\s*)\"([\\s\\S]*?)(\\S*?)\"",
       "suffix": ".js,.vue",
       "projectDir": "./src/",
       "entry": ["/src/main.js"],
       "resourceDir": "./src/i18n/lang/",
       "i18nEntry": ["/src/i18n/index.js"],
       "uploadIgnore": ["node_modules", ".idea", ".git"],
   },
   "scripts": {
       "i18n:get": "node node_modules/yealink-i18n/index.js get",
       "i18n:upload": "node node_modules/yealink-i18n/index.js upload",
       "i18n:sync": "node node_modules/yealink-i18n/index.js sync",
       "i18n:publish": "node node_modules/yealink-i18n/index.js publish"
   },
   "baiDu": {
       "appid": '20180802000191283',
       "key": 'YGbZCf7tFHVUDXGJ4WFH'
   }
}

install

npm i yealink-i18n2

Downloadsweekly downloads

50

version

0.0.10

license

ISC

last publish

collaborators

  • avatar
Report a vulnerability