diff --git a/examples/app-tr/Cargo.toml b/examples/app-tr/Cargo.toml index f991521..0cb30a1 100644 --- a/examples/app-tr/Cargo.toml +++ b/examples/app-tr/Cargo.toml @@ -9,7 +9,6 @@ version = "0.1.0" env_logger = { version = "0.11", optional = true } log = { version = "0.4", optional = true } rust-i18n = { path = "../.." } -# rust-i18n-macro = { path = "../../crates/macro" } [features] log_tr_dyn = ["env_logger", "log", "rust-i18n/log_tr_dyn"] diff --git a/examples/app-tr/src/main.rs b/examples/app-tr/src/main.rs index 4671206..ad8e40d 100644 --- a/examples/app-tr/src/main.rs +++ b/examples/app-tr/src/main.rs @@ -23,8 +23,7 @@ fn main() { println!("String literals with patterns translation:"); for locale in &locales { println!( - "{} => {} ({})", - "Hello, %{name}!", + "Hello, %{{name}}! => {} ({})", tr!("Hello, %{name}!", name = "World", locale = locale), locale ); @@ -61,7 +60,7 @@ fn main() { println!(); println!("Runtime string translation:"); - let src_list = vec!["Apple", "Banana", "Orange"]; + let src_list = ["Apple", "Banana", "Orange"]; for src in src_list.iter() { for locale in &locales { let translated = tr!(*src, locale = locale);