woboq / tr

Translation tools for rust
58 stars 10 forks source link

Support multiple input files with xtr #2

Closed Cogitri closed 5 years ago

Cogitri commented 5 years ago

Hello,

right now xtr just expects me to supply the main .rs file of my crate to it as input and then automatically generates the .pot. However, I want to extract strings from more files, like so: https://gitlab.gnome.org/World/Tau/blob/master/po/POTFILES.in

ogoffart commented 5 years ago

xtr currently only handle rust code and I don't really intent adding support for other languages.

And for rust code, xtr goes recursively into each modules from the root crate. Is that not sufficient?

I guess I could easily make it possible to take more files as input.

Cogitri commented 5 years ago

xtr currently only handle rust code and I don't really intent adding support for other languages.

Ah yes, that's understandable. I guess I'll have to hack something together with xtr&gettext then (and see how I can use that with Weblate :/)

And for rust code, xtr goes recursively into each modules from the root crate. Is that not sufficient?

Ah, my project has a virtual workspace with 4 crates and it was my impression that xtr didn't support that

I guess I could easily make it possible to take more files as input.

Thanks

ogoffart commented 5 years ago

From commit d94a4bd, it should be possible to pass several input files to xtr

Cogitri commented 5 years ago

Thanks, seems to work for me!