Skip to content

Commit

Permalink
examples/app-tr: Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
varphone committed Jan 20, 2024
1 parent c927971 commit 54d057b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 0 additions & 1 deletion examples/app-tr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
5 changes: 2 additions & 3 deletions examples/app-tr/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 54d057b

Please sign in to comment.