diff --git a/tr/src/lib.rs b/tr/src/lib.rs index b44540a..d2c3eb6 100644 --- a/tr/src/lib.rs +++ b/tr/src/lib.rs @@ -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)); } }