You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| `-d`, `--locales-dir` | Name of the folder containing locale files (default: `_locales`) | `--locales-dir=_messages`
45
-
| `-t`, `--target-langs` | Comma-separated list of languages to translate to (default: all [`supported_locales`][supported-locales]) | `--target-langs=en,es,fr`
45
+
| `-t`, `--target-langs` | Comma-separated list of languages to translate to (default: all [`stable_locales`][stable-locales]) | `--target-langs=es,fr`
46
46
| `-k`, `--keys` | Comma-separated list of keys to translate (default: all found src keys missing in target files) | `--keys=app_DESC,err_NOT_FOUND`
47
-
| `--exclude-langs` | Comma-separated list of languages to exclude | `--exclude-langs=en,es`
47
+
| `--exclude-langs` | Comma-separated list of languages to exclude | `--exclude-langs=es,zh`
48
48
| `--exclude-keys` | Comma-separated list of keys to ignore | `--exclude-keys=app_NAME,author`
49
+
|`--only-stable`| Only use stable locales (skip auto-discovery) |
49
50
|`init`, `-i`, `--init`| Create `.translate-msgs.config.json5` in project root to store default options |
50
51
|`-f`, `--force`| Force overwrite of existing config file when using `init`|
51
52
|`-n`, `--no-wizard`| Skip interactive prompts during start-up |
52
53
|`-h`, `--help`| Show help screen |
53
54
54
55
## Examples
55
56
56
-
Translate all keys except `app_NAME` from `_locales/en/messages.json` to all [`supported_locales`][supported-locales]:
57
+
Translate all keys except `app_NAME` from `_locales/en/messages.json` to all [`stable_locales`][stable-locales]:
57
58
58
59
```bash
59
-
translate-messages --ignore-keys=app_NAME # prompts for more keys to ignore
60
+
translate-messages --ignore-keys=app_NAME # prompts for more keys to ignore
60
61
```
61
62
62
63
Translate `app_DESC` key from `messges/en/messages.json` to French:
63
64
64
65
```bash
65
-
translate-messages --keys=app_DESC --locales-dir=messages --target-langs=fr -n # no prompts
66
+
translate-messages --keys=app_DESC --locales-dir=messages --target-langs=fr -n # no prompts
66
67
```
67
68
68
69
Translate `app_DESC` + `err_NOT_FOUND` keys from `_msgs/en/messages.json` to Spanish and Hindi:
0 commit comments