Skip to content

AckslD/Qute-Translate

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Qute-Translate

userscript for qutebrowser for translation of pages or selected text using Google translate.

Installation

Run install.sh or simply create a symbolic link or copy the file translate to the qutebrowser's userscripts directory (usually ~/.local/share/qutebrowser/userscripts) and make it executable.

Usage

Translate page

To translate the current page simply to

spawn --userscript translate

By default the source language will be automatically detected and the target language will be English. To specify other languages use the arguments -s/--source and -t/--target. For example to translate from German to Swedish do

spawn --userscript translate -s de -t sv

Default languages can also be set using the environment variables QUTE_TRANS_SOURCE and QUTE_TRANS_TARGET in bash.

Translate selected text

To translate selected text add the --text argument as for example

spawn --userscript translate --text

In hint mode

The userscript can also be used in hint mode by doing

hint links userscript translate

Key-bindings

You can set your own key-bindings for examples as

config.bind(';t', 'hint userscript link translate')
config.bind(';T', 'hint userscript all translate --text')
config.bind('<Ctrl+T>', 'spawn --userscript translate')
config.bind('<Ctrl+Shift+T>', 'spawn --userscript translate --text')

Contributions

Feel free to contribute or suggest improvements. Examples of things that could be extended:

  • Other translation services other than Google.
  • ...

About

Userscript for qutebrowser for language translation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages