├── .gitignore ├── README.md ├── babel.config.js ├── package.json ├── public ├── favicon.ico └── index.html ├── src ├── App.vue ├── assets │ └── logo.png ├── components │ ├── Login.vue │ └── Translator.vue └── main.js ├── vue.config.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw* 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # vue-i18n-translator 2 | 3 | ## Project setup 4 | ``` 5 | yarn install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | yarn run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | yarn run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | yarn run lint 21 | ``` 22 | -------------------------------------------------------------------------------- /babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/app' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vue-i18n-translator", 3 | "version": "0.1.0", 4 | "homepage": "git@github.com:f/vue-i18n-translator", 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint", 9 | "deploy": "yarn run build && push-dir --dir=dist --branch=gh-pages" 10 | }, 11 | "dependencies": { 12 | "flat": "^4.1.0", 13 | "js-yaml": "^3.12.0", 14 | "vue": "^2.5.17", 15 | "vue-codemirror": "^4.0.5" 16 | }, 17 | "devDependencies": { 18 | "@vue/cli-plugin-babel": "^3.0.1", 19 | "@vue/cli-plugin-eslint": "^3.0.1", 20 | "@vue/cli-service": "^3.0.1", 21 | "push-dir": "^0.4.1", 22 | "vue-template-compiler": "^2.5.17" 23 | }, 24 | "eslintConfig": { 25 | "root": true, 26 | "env": { 27 | "node": true 28 | }, 29 | "extends": [ 30 | "plugin:vue/essential", 31 | "eslint:recommended" 32 | ], 33 | "rules": {}, 34 | "parserOptions": { 35 | "parser": "babel-eslint" 36 | } 37 | }, 38 | "postcss": { 39 | "plugins": { 40 | "autoprefixer": {} 41 | } 42 | }, 43 | "browserslist": [ 44 | "> 1%", 45 | "last 2 versions", 46 | "not ie <= 8" 47 | ] 48 | } 49 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/edisdev/vue-i18n-translator/1af88c0577a3c8a65c8345f970340e5ad38550cf/public/favicon.ico -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 |$ cd your/vue/project
$ npx vue-i18n-service export > translations.json
drop the translations.json file here
download the translations.edited.json file
$ npx vue-i18n-service import < translations.edited.json
<i18n lang="yaml">
33 | <i18n>
34 | </i18n>
36 | 46 | 47 | | 48 |49 | 50 | 51 | | 52 |
55 | 56 | You can nest translations keys using dots. Eg. `login.welcome` 57 | | 58 |59 | 60 | 61 | | 62 |