translate / virtaal

Easy-to-use and powerful offline translation tool
https://virtaal.translatehouse.org
GNU General Public License v2.0
298 stars 58 forks source link

Q: Is it possible to automate tasks in Virtaal, e.g. with scripts? #3310

Open msoutopico opened 4 years ago

msoutopico commented 4 years ago

Hi there!

Often I need to automate some tasks in OmegaT, like transliterating (Latin to Cyrillic or vice versa), or pseudo-translating, or changing Western numerals to Easter-Indic form (in Arabic).

I normally do that with a script written in Groovy, e.g. https://gist.github.com/msoutopico/0336a655ae169e68a17307fa6a44a201

Would it be possible to run Python scripts in the same way in Virtaal?

Thanks. Manuel

friedelwolff commented 4 years ago

That sounds like plugins would be perfect for this. Much of Virtaal's out-of-the-box functionality is implemented as plugins in python (TM, terminology, autocomplete, autocorrect, etc.). Plugins can add shortcuts and menu entries, change the text in the target, etc. so the things you mention sounds like something that could be done with a plugin. Changing numerals and casing could even be a good addition to Virtaal in general. I fear that transliteration is too language specific, but you can still implement an extension for yourself.

If we have a generic concept of a "select text and transform" type plugin, it might be simple to implement all sorts of different plugins similar to the ones you mention. Maybe this is a good discussion to continue on the mailing list?