/krunner-translator

KRunner Translator (Plasma 5)

Primary LanguageC++GNU General Public License v3.0GPL-3.0

Translator for KDE KRunner (Plasma 5)

Screenshot Runner

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

Logo Arch Linux Logo Ubuntu

Manual Installation

  1. Install Translate Shell
  2. Install the dependencies listed below
  3. 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

  1. Register at https://ai.youdao.com/
  2. Get an API key and an API secret from Application Manager
  3. Copy the key to configuration dialog

Baidu

  1. Register at http://api.fanyi.baidu.com/
  2. Get an API key and an API secret from Consoles
  3. 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 socceren-de soccer
en blaude-en blau
fr houseen-fr house

Thanks for your feedback and kudos! If you like the runner, please vote for it here.