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
Copy file name to clipboardExpand all lines: langcodec-cli/README.md
+91-71Lines changed: 91 additions & 71 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,51 +1,89 @@
1
1
# langcodec-cli
2
2
3
-
`langcodec` is a command-line tool for real localization work.
3
+
`langcodec` is a localization CLI for teams shipping real apps, not demo files.
4
4
5
-
It helps you move between Apple, Android, and tabular translation formats without building one-off scripts for every project.
5
+
It handles the annoying parts of localization work in one place: format conversion, catalog cleanup, AI-assisted translation, translator-facing comment generation, and Tolgee sync for Apple string catalogs.
6
6
7
-
Supported inputs and outputs:
7
+
Supported formats:
8
8
9
9
- Apple `.strings`
10
10
- Apple `.xcstrings`
11
11
- Android `strings.xml`
12
12
- CSV
13
13
- TSV
14
14
15
-
## Why Use It
15
+
## Why It Feels Useful
16
16
17
-
`langcodec` is designed for teams who need to:
17
+
Most localization tooling does one small thing. `langcodec` is designed to cover the loop teams actually run:
18
18
19
-
- convert localization files across platforms
20
-
- inspect missing, stale, or review-needed strings
21
-
- normalize files to reduce noisy diffs
22
-
- edit translations in place
23
-
- merge or sync catalogs safely
24
-
- draft translations with AI providers
25
-
- generate translator-facing xcstrings comments from source usage
19
+
1. Convert strings between iOS, Android, and spreadsheet formats.
20
+
2. Inspect what is missing, stale, or still needs review.
21
+
3. Normalize files so diffs stop being noisy.
22
+
4. Draft translations with AI.
23
+
5. Generate better comments for translators from real source usage.
24
+
6. Pull from and push back to Tolgee without custom glue scripts.
26
25
27
-
Instead of treating localization as a pile of ad hoc file conversions, `langcodec` gives you one CLI that works across common formats and workflows.
26
+
## The Cool Stuff
27
+
28
+
### AI translation with real workflow support
29
+
30
+
```sh
31
+
langcodec translate \
32
+
--source Localizable.xcstrings \
33
+
--source-lang en \
34
+
--target-lang fr,de,ja \
35
+
--provider openai \
36
+
--model gpt-5.4
37
+
```
38
+
39
+
`translate` is built for app catalogs, not just raw text:
40
+
41
+
- updates multi-language files like `.xcstrings` in place
42
+
- supports multiple target languages in one run
43
+
- can prefill from Tolgee before using AI fallback
44
+
- shows live progress with `--ui auto|plain|tui`
45
+
- validates output before model requests
46
+
- prints a clear result summary at the end
47
+
48
+
### AI-generated translator comments
49
+
50
+
```sh
51
+
langcodec annotate \
52
+
--input Localizable.xcstrings \
53
+
--source-root Sources \
54
+
--source-root Modules \
55
+
--provider openai \
56
+
--model gpt-5.4
57
+
```
58
+
59
+
`annotate` looks through your codebase and writes better `.xcstrings` comments for translators while preserving manual comments.
60
+
61
+
### Tolgee sync without a pile of project scripts
62
+
63
+
```sh
64
+
langcodec tolgee pull
65
+
langcodec tolgee push --namespace WebGame
66
+
```
67
+
68
+
Tolgee support in v1 is intentionally focused on Apple `.xcstrings`. `langcodec.toml` can now be the source of truth, and `langcodec` will synthesize the Tolgee CLI JSON config at runtime.
28
69
29
70
## Install
30
71
31
72
```sh
32
73
cargo install langcodec-cli
33
74
```
34
75
35
-
## Start Here
76
+
## Quick Start
36
77
37
-
The CLI should teach the detailed usage directly:
78
+
Use the CLI help for exact flags:
38
79
39
80
```sh
40
81
langcodec --help
41
-
langcodec convert --help
42
82
langcodec translate --help
43
83
langcodec annotate --help
44
-
langcodec view --help
84
+
langcodec tolgee --help
45
85
```
46
86
47
-
This README is intentionally brief. Use it to understand what the tool is good at, then use built-in help for exact flags and behavior.
When exactly one provider section is configured, `translate` and `annotate` use it automatically. If you configure multiple providers, choose one with `--provider` or `translate.provider`. For larger repos, `translate.input.sources = [...]` can fan out parallel runs from config.
174
+
When exactly one provider section is configured, `translate` and `annotate` use it automatically. If you configure multiple providers, choose one with `--provider` or `translate.provider`.
175
+
176
+
For larger repos:
159
177
160
-
For annotate fan-out runs, use `annotate.inputs = [...]` and omit `annotate.output` so each catalog is updated in place.
178
+
- use `translate.input.sources = [...]` to fan out translation runs
179
+
- use `annotate.inputs = [...]` to annotate multiple catalogs in place
161
180
162
181
## Main Commands
163
182
@@ -170,17 +189,18 @@ For annotate fan-out runs, use `annotate.inputs = [...]` and omit `annotate.outp
170
189
-`sync`: update existing target entries from a source file
171
190
-`merge`: combine multiple inputs into one output
172
191
-`translate`: draft translations with AI-backed providers
173
-
-`annotate`: generate translator-facing xcstrings comments with AI-backed source lookup
192
+
-`tolgee`: pull and push mapped `.xcstrings` catalogs with Tolgee
193
+
-`annotate`: generate translator-facing `.xcstrings` comments with AI-backed source lookup
174
194
-`debug`: inspect parsed output as JSON
175
195
176
-
## When It Fits Best
196
+
## Best Fit
177
197
178
-
`langcodec`is especially useful if you are:
198
+
`langcodec`shines when you are:
179
199
180
-
-maintaining both iOS and Android apps
181
-
-passing strings through translators or spreadsheets
182
-
- trying to reduce localization-related CI drift
183
-
- replacing fragile custom scripts with one reusable tool
200
+
-shipping both iOS and Android apps
201
+
-moving strings through translators, spreadsheets, and app catalogs
202
+
- trying to reduce localizationdrift in CI
203
+
- replacing fragile one-off scripts with one repeatable tool
0 commit comments