Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including yealink-i18n2 with all npm packages installed. Try it out:

var yealinkI18n2 = require("yealink-i18n2")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

yealink-i18n2 v0.0.11

a project for yealink-i18n2.

管理后台添加项目,获取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'
   }
}

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free