Skip to content

Commit b294c93

Browse files
committed
Enhance merge command with auto format detection
Expanded the documentation for the merge command to clarify automatic format detection, language grouping, conflict resolution strategies, and output format conversion. Updated argument descriptions to reflect support for multiple file formats and improved usability.
1 parent 910bd6a commit b294c93

2 files changed

Lines changed: 16 additions & 5 deletions

File tree

langcodec-cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "langcodec-cli"
3-
version = "0.3.4"
3+
version = "0.3.5"
44
edition = "2024"
55
description = "A universal CLI tool for converting and inspecting localization files (Apple, Android, CSV, etc.)"
66
license = "MIT"

langcodec-cli/src/main.rs

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,26 @@ enum Commands {
6969
full: bool,
7070
},
7171

72-
/// Merge multiple localization files of the same format into one output file.
72+
/// Merge multiple localization files into one output file with automatic format detection and conversion.
73+
///
74+
/// This command intelligently merges multiple localization files, automatically detecting
75+
/// input formats and converting to the output format based on the file extension.
76+
/// Supports merging files with the same language and provides conflict resolution strategies.
77+
///
78+
/// Features:
79+
/// - Automatic format detection from file extensions (.strings, .xml, .csv, .tsv, .xcstrings)
80+
/// - Smart language grouping and merging
81+
/// - Multiple conflict resolution strategies (first, last, skip)
82+
/// - Language override for all input files
83+
/// - Automatic output format conversion
7384
Merge {
74-
/// The input files to merge
85+
/// The input files to merge (supports multiple formats: .strings, .xml, .csv, .tsv, .xcstrings, .json, .yaml)
7586
#[arg(short, long, num_args = 1..)]
7687
inputs: Vec<String>,
77-
/// The output file to write the merged results to
88+
/// The output file path (format automatically determined from extension)
7889
#[arg(short, long)]
7990
output: String,
80-
/// Strategy for handling conflicts
91+
/// Strategy for handling conflicts when merging entries with the same key
8192
#[arg(short, long, default_value = "last")]
8293
strategy: ConflictStrategy,
8394
/// Language code to use for all input files (e.g., "en", "fr")

0 commit comments

Comments
 (0)