Update locales, add locales scripts, update locales readme

This commit is contained in:
ArtemBaskal
2020-04-07 16:17:57 +03:00
parent 39447649d6
commit d0d481dd0e
19 changed files with 105 additions and 98 deletions

View File

@@ -2,16 +2,8 @@
### Usage
```
npm install
TWOSKY_URI=<API URI> TWOSKY_CLIENT_ID=<PROJECT ID> node download.js
TWOSKY_URI=<API URI> TWOSKY_CLIENT_ID=<PROJECT ID> node upload.js
```
- `npm install` Install the dependencies in the local node_modules folder
- `npm run locales:download` Download and save all locales
- `npm run locales:upload` Upload base `en` locale
After download you'll find the output locales in the `client/src/__locales/` folder.
Examples:
```
TWOSKY_URI=https://twosky.example/api/v1 TWOSKY_CLIENT_ID=adguardhome node download.js
TWOSKY_URI=https://twosky.example/api/v1 TWOSKY_CLIENT_ID=adguardhome node upload.js
```

View File

@@ -205,9 +205,9 @@
}
},
"lodash": {
"version": "4.17.11",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz",
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg=="
"version": "4.17.15",
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
"integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
},
"mime-db": {
"version": "1.37.0",

View File

@@ -2,6 +2,10 @@
"name": "translations",
"version": "0.1.0",
"private": true,
"scripts": {
"locales:download": "TWOSKY_URI=https://twosky.adtidy.org/api/v1 TWOSKY_PROJECT_ID=home node download.js",
"locales:upload": "TWOSKY_URI=https://twosky.adtidy.org/api/v1 TWOSKY_PROJECT_ID=home node upload.js"
},
"dependencies": {
"request": "^2.88.0",
"request-promise": "^4.2.2"