Skip to content

Commit 89451dd

Browse files
committed
Bump langcodec-cli and dependency to v0.6.1
Updated langcodec-cli version to 0.6.1 and synchronized the langcodec dependency to v0.6.1 for consistency and compatibility.
1 parent 2349fc5 commit 89451dd

2 files changed

Lines changed: 10 additions & 4 deletions

File tree

langcodec-cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "langcodec-cli"
3-
version = "0.6.0"
3+
version = "0.6.1"
44
edition = "2024"
55
description = "A universal CLI tool for converting and inspecting localization files (Apple, Android, CSV, etc.)"
66
license = "MIT"
@@ -12,7 +12,7 @@ categories = ["command-line-utilities", "internationalization", "localization"]
1212
documentation = "https://docs.rs/langcodec-cli"
1313

1414
[dependencies]
15-
langcodec = { path = "../langcodec", version = "0.6.0" }
15+
langcodec = { path = "../langcodec", version = "0.6.1" }
1616
clap = { version = "4", features = ["derive"] }
1717
clap_complete = "4"
1818
unicode-width = "0.2.1"

langcodec/src/placeholder.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ pub fn normalize_placeholders(input: &str) -> String {
129129
/// Convert canonical/Android-style string placeholders to iOS-style.
130130
/// - %s -> %@
131131
/// - %1$s -> %1$@
132-
/// Leaves numeric specifiers (e.g., %d, %u, %ld) unchanged.
132+
/// Leaves numeric specifiers (e.g., %d, %u, %ld) unchanged.
133133
pub fn to_ios_placeholders(input: &str) -> String {
134134
let bytes = input.as_bytes();
135135
let mut i = 0usize;
@@ -182,7 +182,13 @@ pub fn to_ios_placeholders(input: &str) -> String {
182182
out.push('%');
183183
if had_positional {
184184
// copy the digits we saw
185-
out.push_str(&input[start_digits..(if start_digits < j { j - 1 } else { start_digits })]);
185+
out.push_str(
186+
&input[start_digits..(if start_digits < j {
187+
j - 1
188+
} else {
189+
start_digits
190+
})],
191+
);
186192
out.push('$');
187193
}
188194
out.push('@');

0 commit comments

Comments
 (0)