woboq / tr

Translation tools for rust
57 stars 9 forks source link

Use the name of the crate in `set_translator!` instead of the full module #24

Closed rodrigorc closed 2 months ago

rodrigorc commented 2 months ago

The macro set_translator! was missing the conversion from module_path to domain.

Most people probably call set_translator! from the main module, so they are the same and nobody noticed. But I'm calling it from a submodule (actually a generated file by build.rs) so the stored translator would never be used.

ogoffart commented 2 months ago

indeed, well spotted.