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
Introduces --source-language and --version flags to the convert and merge commands, allowing users to override xcstrings metadata. Updates README with documentation for these options and clarifies default behaviors for Android and xcstrings output. Refactors main.rs and merge.rs to ensure metadata is set or overridden as needed for xcstrings output.
- All commands support Apple `.strings`, `.xcstrings`, Android `strings.xml`, and CSV.
162
167
- The convert command also supports JSON files with key-value pairs.
163
168
- The CLI will error if you try to merge files of different formats.
169
+
- Android path inference: `values/strings.xml` (no qualifier) defaults to English (`en`).
170
+
- When converting to `.xcstrings`, if `source_language` or `version` metadata is missing, the CLI defaults them to `en` and `1.0` respectively (overridable via flags).
Copy file name to clipboardExpand all lines: langcodec-cli/src/main.rs
+74-3Lines changed: 74 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,12 @@ enum Commands {
48
48
/// Optional output format hint (e.g., "xcstrings", "strings", "android")
49
49
#[arg(long)]
50
50
output_format:Option<String>,
51
+
/// For xcstrings output: override source language (default: en)
52
+
#[arg(long)]
53
+
source_language:Option<String>,
54
+
/// For xcstrings output: override version (default: 1.0)
55
+
#[arg(long)]
56
+
version:Option<String>,
51
57
/// Language codes to exclude from output (e.g., "en", "fr"). Can be specified multiple times or as comma-separated values (e.g., "--exclude-lang en,fr,zh-hans"). Only affects .langcodec output format.
0 commit comments