Skip to content

Commit 8e42456

Browse files
committed
Improved usage + example sections
1 parent 82c3587 commit 8e42456

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

translate-messages/README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ translate-msgs
3030

3131
If no options are provided, the CLI will:
3232
1. Prompt for message keys to ignore
33-
2. Auto-discover closest `_locales` dir
33+
2. Auto-discover closest child `_locales` dir
3434
3. Translate `en/messages.json` to target languages
3535

3636
_Note: Any messages.json in the [`chrome.i18n`](https://developer.chrome.com/docs/extensions/how-to/ui/localization-message-formats) format can be used as a source file._
@@ -52,10 +52,18 @@ Options can be set by using command-line arguments:
5252

5353
[supported-locales]: https://github.com/adamlui/python-utils/blob/translate-messages-1.1.0/translate-messages/src/translate_messages/package_data.json#L11-L16
5454

55-
## Example
55+
## Examples
56+
57+
Translate everything except `appName` from `_locales/en/messages.json` to French and Spanish
58+
59+
```bash
60+
translate-msgs --include-langs=fr,es --ignore-keys=appName -W
61+
```
62+
63+
Translate `appDesc` + `err_notFound` keys from `_msgs/en/messages.json`:
5664

5765
```bash
58-
translate-msgs --include-langs=fr,es --ignore-keys=appName,author
66+
translate-msgs -k appDesc,err_notFound -d _msgs -W
5967
```
6068

6169
## Config file

0 commit comments

Comments
 (0)