locize-cli
Advanced tools
Comparing version 1.0.1 to 2.0.0
{ | ||
"name": "locize-cli", | ||
"version": "1.0.1", | ||
"version": "2.0.0", | ||
"description": "locize cli to import locales", | ||
@@ -10,6 +10,7 @@ "main": "migrate.js", | ||
"dependencies": { | ||
"async": "^2.0.0-rc.4", | ||
"async": "2.0.0", | ||
"colors": "1.1.2", | ||
"commander": "2.9.0", | ||
"flat": "2.0.0", | ||
"ini": "1.3.4", | ||
"request": "2.72.0" | ||
@@ -16,0 +17,0 @@ }, |
@@ -5,3 +5,3 @@ [![npm](https://img.shields.io/npm/v/locize-cli.svg)](https://npmjs.org/package/locize-cli) | ||
## Step 1: Install the cli (preferred globally) | ||
## Step 0: Install the cli (preferred globally) | ||
@@ -12,5 +12,5 @@ ```sh | ||
## Migration of existing i18next files | ||
### Step 1: Go near to your translation files | ||
## Step 2: Go near to your translation files | ||
At the moment only i18next translation files (json) are supported | ||
@@ -23,3 +23,3 @@ | ||
## Step 3: Decide if you want to migrate all languages or only one | ||
### Step 2: Decide if you want to migrate all languages or only one | ||
@@ -49,3 +49,3 @@ If you have a directory structure like this: | ||
## Step 4: execute | ||
### Step 3: execute | ||
@@ -55,6 +55,6 @@ Add your api-key and your project-id and let's go... | ||
```sh | ||
locize my-api-key-d9de-4f55-9855-a9ef0ed44672 my-project-id-93e1-442a-ab35-24331fa294ba --path ./en --language en | ||
locize migrate --api-key my-api-key-d9de-4f55-9855-a9ef0ed44672 --project-id my-project-id-93e1-442a-ab35-24331fa294ba --path ./en --language en | ||
``` | ||
## Step 5: verify | ||
### Step 4: verify | ||
@@ -64,22 +64,35 @@ Navigate to your locize project and check the results => [www.locize.io](https://www.locize.io) | ||
## locize --help | ||
## Adding new keys | ||
### Step 1: execute | ||
Add your api-key and your project-id and let's go... | ||
```sh | ||
locize --help | ||
locize add --api-key my-api-key-d9de-4f55-9855-a9ef0ed44672 --project-id my-project-id-93e1-442a-ab35-24331fa294ba --language en namespace1 myNewKey "My new value" | ||
``` | ||
Usage: locize [options] <api-key> <project-id> | ||
## Other information | ||
Options: | ||
You can define a config file in your home directory (or wherever you want (by specifying it in the command)) that contains defaults for your commands. | ||
i.e. | ||
-h, --help output usage information | ||
-V, --version output the version number | ||
-p, --path <path> Specify the path that should be used </Users/adrai/Projects/locize/locize-app> | ||
-a, --add-path <url> Specify the add-path url that should be used <https://api.locize.io/missing/{{projectId}}/{{version}}/{{lng}}/{{ns}}}> | ||
-l, --language <lng> Found namespaces will be matched to this language | ||
-v, --ver <version> Found namespaces will be matched to this version | ||
-pl, --parse-language <true|false> Parse folders as language (default is true) | ||
-f, --format <json> File format of namespaces | ||
```sh | ||
cat /Users/user/.locize | ||
apiKey = my-api-key-d9de-4f55-9855-a9ef0ed44672 | ||
projectId = my-project-id-93e1-442a-ab35-24331fa294ba | ||
language = en | ||
version = latest | ||
``` | ||
locize api-key project-id | ||
like this you can just work like this: | ||
```sh | ||
locize migrate | ||
``` | ||
or | ||
```sh | ||
locize add common title "the title of my cool app" | ||
``` |
Sorry, the diff of this file is not supported yet
14466
8
154
93
6
+ Addedini@1.3.4
+ Addedasync@2.0.0(transitive)
+ Addedini@1.3.4(transitive)
Updatedasync@2.0.0