pub fn msgfmt(m: &Message) -> StringExpand description
An utility function for translation by using the optional text attribute.
ยงExample
let msg = Message {
id: "lorem.ipsum",
text: Some("Lorem {0} dolor {1} amet"),
args: vec!["ipsum".to_string(), "sit".to_string()],
};
let out = msgfmt(&msg);
assert_eq!("Lorem ipsum dolor sit amet", out);
// it's used also for fmt::Display::fmt()
assert_eq!(msg.to_string(), out);