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
-`convert`: Convert localization files between formats (auto-detect by extension)
76
76
-`edit set`: Add/update/remove entries in-place (or to `--output`)
77
-
-`view`: Pretty-print entries, filter by `--lang`, optional `--check_plurals`
77
+
-`diff`: Compare two localization files and report added/removed/changed keys
78
+
-`sync`: Sync existing entries from a source file into a target file
79
+
-`view`: Pretty-print entries, filter by `--lang`, optional `--check-plurals`
78
80
-`merge`: Merge multiple inputs to one output with conflict strategy
81
+
-`normalize`: Normalize files and optionally fail on drift with `--check`
79
82
-`stats`: Coverage and per-status counts (text or `--json`)
80
83
-`debug`: Read file and emit JSON (to stdout or `--output`)
81
84
-`completions`: Generate shell completion scripts
@@ -123,9 +126,9 @@ Custom inputs (one-way into internal Resources via CLI):
123
126
"$REPO/target/release/langcodec" convert \
124
127
--input "/abs/path/translations.json" \
125
128
--output "/abs/path/Localizable.xcstrings" \
126
-
--input_format json-language-map \
127
-
--output_format xcstrings \
128
-
--source_language en \
129
+
--input-format json-language-map \
130
+
--output-format xcstrings \
131
+
--source-language en \
129
132
--version 1.0
130
133
```
131
134
@@ -157,7 +160,7 @@ Custom inputs (one-way into internal Resources via CLI):
157
160
--lang en \
158
161
--key welcome_message \
159
162
--value "Hello" \
160
-
--dry_run
163
+
--dry-run
161
164
```
162
165
163
166
- View entries (full values) and check plurals:
@@ -167,7 +170,7 @@ Custom inputs (one-way into internal Resources via CLI):
167
170
--input "/abs/path/Localizable.xcstrings" \
168
171
--lang en \
169
172
--full \
170
-
--check_plurals
173
+
--check-plurals
171
174
```
172
175
173
176
- Merge multiple files (quote globs to avoid shell-side expansion):
@@ -178,7 +181,7 @@ Custom inputs (one-way into internal Resources via CLI):
178
181
--output "/abs/path/merged.xcstrings" \
179
182
--strategy last \
180
183
--lang en \
181
-
--source_language en \
184
+
--source-language en \
182
185
--version 1.0
183
186
```
184
187
@@ -204,12 +207,12 @@ Custom inputs (one-way into internal Resources via CLI):
204
207
205
208
-`0`: success
206
209
-`1`: validation or runtime failure (e.g., invalid inputs, unsupported format)
207
-
-`2`: plural validation failed (when `view --check_plurals` is used)
210
+
-`2`: plural validation failed (when `view --check-plurals` is used)
208
211
209
212
## Behavior notes for agents
210
213
211
214
- All commands are non-interactive. Always pass explicit absolute paths.
212
-
- Input/output formats are inferred from file extensions unless `--input_format` / `--output_format` is provided.
215
+
- Input/output formats are inferred from file extensions unless `--input-format` / `--output-format` is provided.
213
216
- For single-language formats, pass `--lang` when required (e.g., ambiguous inputs).
214
217
- Quote glob patterns provided to `merge --inputs` to avoid slow shell-side expansion.
215
218
@@ -230,10 +233,10 @@ Builder pattern and direct `Codec` manipulation are also available; see `langcod
230
233
231
234
## Extension points (for contributors/agents)
232
235
233
-
- Add/modify formats: edit files under `langcodec/src/formats/` and wire into `formats/mod.rs`
236
+
- Add/modify formats: edit files under `langcodec/src/formats/` and wire into `langcodec/src/formats.rs`
234
237
- Implement parsing/writing: implement `Parser` in `langcodec/src/traits.rs`
235
238
- Add CLI subcommands/options: edit `langcodec-cli/src/main.rs` and corresponding modules
236
-
- Support new custom one-way formats: add a transformer under `langcodec-cli/src/transformers/` and register in `transformers/mod.rs` and `formats.rs`
239
+
- Support new custom one-way formats: add a transformer under `langcodec-cli/src/transformers/` and register in `langcodec-cli/src/transformers.rs` and `langcodec-cli/src/formats.rs`
0 commit comments