Skip to content

Commit

Permalink
Use the name of the crate in set_translator! instead of the full mo…
Browse files Browse the repository at this point in the history
…dule.
  • Loading branch information
rodrigorc authored and ogoffart committed Aug 1, 2024
1 parent c158de6 commit 994da65
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tr/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,11 @@ pub mod internal {
}

pub fn set_translator(module: &'static str, translator: impl Translator + 'static) {
let domain = domain_from_module(module);
TRANSLATORS
.write()
.unwrap()
.insert(module, Box::new(translator));
.insert(domain, Box::new(translator));
}
}

Expand Down

0 comments on commit 994da65

Please sign in to comment.