translate anywhere with Dialect (solved)
- Inicie sesión ou rexístrese para enviar comentarios
So I found a way to use Dialect from the repository in any application and I wanted to share how I did it. All that's needed is to install either xsel for x11 or wl-clipboard if Wayland is being used, then you can create a keyboard shortcut for either of the following commands:
sh -c "dialect -t \"$(xsel -o)\""
or
sh -c "dialect -t \"$(wl-paste -p)\""
After that all you got to do is to select the text you want to translate and use the short cut and a new window will be open with the translation.
Hope this helps someone out there. I found this useful for mastodon a mastodon instance that I use that doesn't have translation on the server side. I used tuba from the repo.
Thank you for mentioning Dialect. I did not know this exists. I set it up with the Libretranslate instance I rely on.
Also, for others, if you are in doubt like me, the shortcut to trigger the Dialect window to open once you have selected text you'd like to translate is the copy-to-clipboard shortcut (shift + control + delete, for me; or alternatively: select text to translate > click right > 'Copy' or press 'C'.)

