krunner-translator
krunner-translator copied to clipboard
KRunner Translator (Plasma 5)
Translator for KDE KRunner (Plasma 5)
This is a plugin for Plasma 5 KRunner. It's a translator and it translates text. Currently Google Translate, Bing Translator, youdao, and Baidu Fanyi are supported. By clicking on the corresponding icon, the translation can be copied or read aloud.
Packages
Manual Installation
- Install Translate Shell
- Install the dependencies listed below
- Run
./install.sh
Debian/Ubuntu
sudo apt install cmake extra-cmake-modules build-essential libkf5runner-dev libkf5textwidgets-dev qtdeclarative5-dev gettext
openSUSE
sudo zypper install cmake extra-cmake-modules libQt5Widgets5 libQt5Core5 libqt5-qtlocation-devel ki18n-devel ktextwidgets-devel kservice-devel krunner-devel gettext-tools kconfigwidgets-devel
Fedora
sudo dnf install cmake extra-cmake-modules kf5-ki18n-devel kf5-kservice-devel kf5-krunner-devel kf5-ktextwidgets-devel gettext
Configuration
For being able to use Youdao and Baidu, an api key is required. You have to obtain a key yourself by following these steps:
Youdao
- Register at https://ai.youdao.com/
- Get an API key and an API secret from Application Manager
- Copy the key to configuration dialog
Baidu
- Register at http://api.fanyi.baidu.com/
- Get an API key and an API secret from Consoles
- Copy the key to configuration dialog
Usage
A list of all language codes you can find here.
Specify source and target language
Syntax: <sourcelang>-<targetlang> <searchterm>
en-de house → will translate house into german (de)
Use default source language
Syntax: <targetlang> <searchterm>
Default source language: English (en)
Alternative source language: German (de)
de soccer → en-de soccer
en blau → de-en blau
fr house → en-fr house
Thanks for your feedback and kudos! If you like the runner, please vote for it here.