Assuming you’re talking about this, you never called into the gettext API to retrieve the appropriate translation. You just set the raw string "Play Morse Code" as tooltip text.
gettext_ng is documented here:
I.e.:
use std::fs::File;
use gettext::Catalog;
fn main() {
let f = File::open("french.mo").expect("could not open the catalog");
let catalog = Catalog::parse(f).expect("could not parse the catalog");
<SNIP>
play_btn.set_tooltip(catalog.gettext("Play Morse Code"));
}
variable moved due to use in closure...185 | ...lay_btn.set_tooltip(catalog.gettext("Play Morse Code"));| ^^^^^^^ value borrowed here after move
Do I need a catatlog per translation ?I have for example this lines:
let mut wind = Window::new(100, 100, 400, 300, catalog.gettext("Morse Code Trainer"));
...
slider.set_tooltip(catalog.gettext("adjust WPM (Words per minute)"));this works with translation