Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive
 

Problem: Need to quickly translate phrase avoiding opening google translate, copy-pasting etc.

I need often to translate a phrase from one language to another. Currently I often need to translate English to German. KDE Klipper is a perfect tool to do it from keyboard quickly, without opening google translate in browser. There is still some delay while requesting a remote server, but it's much quicker the opening a browser tab and doing a number of other copy-paste-click-task-switch tasks.

Translation from to Klipper demo

What we need is: install packages, create a CLI script and tie the script to a Klipper action.

Install packages

sudo zypper in translate-shell xclip

Create a CLI script to translate from one language to another

Create file ~/bin/translate.sh file with contents:

Make sure the script works. Run in terminal: translate.sh en de Some text to be trasnlated

In a couple of seconds you should get a popup message telling the text is translated. The result will be placed to the clipboard.

Add an action to Klipper

  • Open Klipper settings.
  • Go to "Actions"
  • Press "Add action" and enter your action name. I prefer "Translate". Regular expression field leave empty.
  • Press "Add command"
  • Enter command like translate.sh en de %s and it's description like "EN -> DE".
  • Repeat for all languages you need.

Add action to Klipper

How to use

  • Select a phrase or a word, copy it to clipboard.
  • Press Ctrl+Alt+R to show Klipper action dialog.
  • Select with arrow keys(or mouse) the needed action.
  • Press Enter and wait a couple of seconds.
  • The translation will be placed into clipboard ( A popup message should tell you when ended).
  • So paste the translated phrase.

Please register to post comments.

Found a typo? Please select it and press Ctrl + Enter.
FaLang translation system by Faboba
Електронна бібліотека «Exlibris»: історичні дослідження, мемуаристика, публіцистика, художня література Українська етнографія: книги, курси лекцій, статті й матеріали, мапи, фотоальбоми, веб-ресурси Правителі України: портрети, життєписи, матеріали Твори Адріана Кащенка: романтика козацьких часів Народна війна 1917-1932

See a typo?

Select the text block and press

CTRL+Enter

Comments

  • NotificationAry - get emails on Joomla content is submitted, added or changed

    Gullo Gullo 03.12.2018 18:36
    Hello, I don't resolved my problem.... The Plug don't save the changes. I tried reinstallation but ...

    Read more...

     
  • MVC Override - change joomla extensions behaviour without changing core files

    rogerco rogerco 01.12.2018 23:30
    Sorry for the delay replying, the notification got trapped as spam on the mail server so I have only ...

    Read more...

     
  • NotificationAry - get emails on Joomla content is submitted, added or changed

    gruz gruz 28.11.2018 23:11
    Thanks for reporting. Need to find time to check.

    Read more...

     
  • NotificationAry - get emails on Joomla content is submitted, added or changed

    Gullo Gullo 28.11.2018 22:30
    Hello, the plugin NotificationAry don't save the changes. Joomla 3.9.1 NotificationAry 0.2.6

    Read more...

     
  • NotificationAry - get emails on Joomla content is submitted, added or changed

    gruz gruz 23.11.2018 08:25
    Yes, I'll work at it maybe tonigh, or at the weekend.

    Read more...