EffectCraft: An open-source motion graphics and compositing tool written by scratch in pure Rust
Merge pull request #469 from haranishi/i18n-japanese-panels
Claudee87f8a8d6d40
diff --cc crates/ui-egui/src/i18n/ui.rsindex c186ebbc6,8a83d97c0..680138ad1--- a/crates/ui-egui/src/i18n/ui.rs+++ b/crates/ui-egui/src/i18n/ui.rs@@@ -1195,10 -1469,20 +1626,22 @@@ mod testsassert_eq!(tr_args("Proxy Use: {}", &[&"Best"]), "Proxy Use: Best");}+ /// Japanese reads its own rows: values fill the placeholders in order, and a name that is not a+ /// row (a layer or file name) stays verbatim.+ #[test]+ fn japanese_rows_translate_the_panels() {+ set_current("ja");+ assert_eq!(tr("Composition Name:"), "コンポジション名:");+ assert_eq!(tr("my layer.mp4"), "my layer.mp4");+ assert_eq!(tr_args("Proxy Use: {}", &[&"Best"]), "プロキシの使用:Best");+ assert_eq!(tr_args("Step {} of {}: {}", &[&1, &3, &"Colour"]), "ステップ1/3:Colour");+ set_current("en");+ }+/// Every row is asked for by a converted panel: a leftover row means the panel went back to its- /// English literal.+ /// English literal. A string a helper draws for the panel (a toolbar tooltip, a popup item, a+ /// checkbox label) is looked up inside that helper, so its English source only appears as a+ /// literal there - `helper_labels_are_translated` keeps those helpers honest.#[test]fn every_row_is_used_by_a_converted_panel() {for (en, _) in catalogs() {