Skip to content

RiskoZoSlovenska/krunner-translator-ng

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Translator for KDE KRunner (Plasma 6)

Screenshot Runner

This is a plugin for Plasma 6 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

Building from source

  1. Clone this repo, cd into it, and run ./install.sh
  2. To uninstall, run ./uninstall.sh

OR, if you prefer to build manually,

  1. Install the distro-specific dependencies
  2. Clone this repo, cd into it, and run
cmake -B build
cmake --build build --parallel --config Release
sudo cmake --install build --config Release
systemctl --user restart plasma-krunner  # or killall krunner
  1. To uninstall, run
sudo cmake --build build --target uninstall
systemctl --user restart plasma-krunner  # or killall krunner
Ubuntu Dependencies

Note: Requires Ubuntu 24.10 (Oracular) or newer.

sudo apt install \
	translate-shell \
	build-essential \
	cmake \
	extra-cmake-modules \
	qt6-base-dev \
	libkf6runner-dev \
	libkf6i18n-dev \
	libkf6coreaddons-dev \
	libkf6config-dev \
	libkf6configwidgets-dev \
	libkf6kcmutils-dev
Fedora Dependencies
sudo dnf install \
	translate-shell \
	make \
	cmake \
	extra-cmake-modules \
	qt6-qtbase-devel \
	kf6-krunner-devel \
	kf6-ki18n-devel \
	kf6-kcoreaddons-devel \
	kf6-kconfig-devel \
	kf6-kconfigwidgets-devel \
	kf6-kcmutils-devel

Configuration

To be 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: Spanish (es)

de socceren-de soccer
en holaes-en hola
fr houseen-fr house

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

About

KRunner Translator (Plasma 6)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages

  • C++ 91.8%
  • C 4.2%
  • CMake 2.6%
  • Shell 1.4%