KRunner Translator

Web Runners krunner

Source i (link to git-repo or to original if based on someone elses unmodified work):

https://github.com/naraesk/krunner-translator

Original
11
Become a Fan
8.4

Description:
This is a plugin for Plasma 5 KRunner. It's a translator and it translates text. Currently Google Translate, Bing Translator, glosbe, yandex, youdao, and Baidu Fanyi are supported. By clicking on the corresponding icon, the translation can be copied or read aloud.

Development takes place on github. For more details please go to https://github.com/naraesk/krunner-translator

Ratings & Comments

98 Comments

Termy

9 works pretty well on the addon side, but i've got the feeling that the google translate api has some sort of spam protection and only works a few times before the results are empty. Some sort of local dictionary may be a nice alternative. But awesome none the less! :D

trump

10 amazing

kvanton

10 good job

emmanog

I used it in kde4, now after compiling it in kde neon (plasma 5.13.1), when trying to save the configuration the application crash

emmanog

crash report Application: System Settings Module (kcmshell5), signal: Segmentation fault Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [Current thread is 1 (Thread 0x7f58f8d0a940 (LWP 5166))] Thread 4 (Thread 0x7f58caa45700 (LWP 5170)): #0 0x00007f58efde1a94 in g_mutex_unlock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #1 0x00007f58efd9d381 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007f58efd9d712 in g_main_loop_run () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f58cc41d9d6 in ?? () from /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 #4 0x00007f58efdc3bb5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007f58f22316ba in start_thread (arg=0x7f58caa45700) at pthread_create.c:333 #6 0x00007f58f86e641d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 3 (Thread 0x7f58cb246700 (LWP 5169)): #0 0x00007f58f86da74d in poll () at ../sysdeps/unix/syscall-template.S:84 #1 0x00007f58efd9d38c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007f58efd9d49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f58efd9d4d9 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #4 0x00007f58efdc3bb5 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #5 0x00007f58f22316ba in start_thread (arg=0x7f58cb246700) at pthread_create.c:333 #6 0x00007f58f86e641d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 2 (Thread 0x7f58da765700 (LWP 5168)): #0 0x00007f58f86da74d in poll () at ../sysdeps/unix/syscall-template.S:84 #1 0x00007f58efd9d38c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #2 0x00007f58efd9d49c in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0 #3 0x00007f58f58adbeb in QEventDispatcherGlib::processEvents(QFlags) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #4 0x00007f58f58551ca in QEventLoop::exec(QFlags) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #5 0x00007f58f568a5e4 in QThread::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #6 0x00007f58f71d9f35 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5DBus.so.5 #7 0x00007f58f5695727 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #8 0x00007f58f22316ba in start_thread (arg=0x7f58da765700) at pthread_create.c:333 #9 0x00007f58f86e641d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109 Thread 1 (Thread 0x7f58f8d0a940 (LWP 5166)): [KCrash Handler] #6 0x00007f58f57112f7 in QString::toUtf8_helper(QString const&) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #7 0x00007f58f7a6039e in KConfigGroup::writeEntry(char const*, QString const&, QFlags) () from /usr/lib/x86_64-linux-gnu/libKF5ConfigCore.so.5 #8 0x00007f58bb1a67d7 in TranslatorConfig::save() () from /usr/lib/x86_64-linux-gnu/qt5/plugins/kcm_krunner_translator.so #9 0x00007f58f83b6d67 in KCModuleProxy::save() () from /usr/lib/x86_64-linux-gnu/libKF5KCMUtils.so.5 #10 0x00007f58f83bfb5c in ?? () from /usr/lib/x86_64-linux-gnu/libKF5KCMUtils.so.5 #11 0x00007f58f83c01a7 in ?? () from /usr/lib/x86_64-linux-gnu/libKF5KCMUtils.so.5 #12 0x00007f58f5883eb6 in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #13 0x00007f58f6718202 in QAbstractButton::clicked(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #14 0x00007f58f6718434 in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #15 0x00007f58f671a0de in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #16 0x00007f58f671a25d in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #17 0x00007f58f665f518 in QWidget::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #18 0x00007f58f662029c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #19 0x00007f58f662853b in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #20 0x00007f58f5856e38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #21 0x00007f58f6626ebf in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #22 0x00007f58f667985d in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #23 0x00007f58f667c26b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #24 0x00007f58f662029c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #25 0x00007f58f6627917 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #26 0x00007f58f5856e38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #27 0x00007f58f5e1a93f in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #28 0x00007f58f5e1c995 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #29 0x00007f58f5df4dfb in QWindowSystemInterface::sendWindowSystemEvents(QFlags) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #30 0x00007f58e6412c1b in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #31 0x00007f58f58551ca in QEventLoop::exec(QFlags) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #32 0x00007f58f585e2d4 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #33 0x00007f58f89b1974 in kdemain () from /usr/lib/x86_64-linux-gnu/libkdeinit5_kcmshell5.so #34 0x00007f58f85ff830 in __libc_start_main (main=0x4006b0, argc=2, argv=0x7ffd744841e8, init=, fini=, rtld_fini=, stack_end=0x7ffd744841d8) at ../csu/libc-start.c:291 #35 0x00000000004006e9 in _start ()

Naraku

Thanks for reporting! Just released v1.1.1 which should fix this bug.

dimkard

9 After looking for a glosbe translator plugin and having found nothing, I decided to develop a new one. So, I started studying on your work, since “how different can a yandex plugin be from a glosbe one?”… Then, I found out that krunner-translator is actually a glosbe single-word translator! Congratulations, you have created what I was looking for! Just a couple of suggestions: 1. Please mention in README that this is a glosbe plugin. 2. Add a switch so as to select between yandex/glosbe 3. A short list of glosbe examples after translations would make the plugin just perfect!

Naraku

Thanks for your feedback! 1. Sure, will do this. 2. Glosbe can't translate sentences, it only translates perfect machtes. Therefore, currently yandex is used for sentences/phrases and glosbe is always used for translating single words. Can you specify how the switch should work? From my point of view it is convenient that the runner selects the best plugin according to the input. 3. The current examples in the README are already glosbe examples, or what do you mean?

dimkard

2. Looking into your code, I understand that if I just look for a single word, glosbe will always be used. Nevertheless, a set of flags or sth similar in plugin settings, would let the user get translations from the service (yandex/glosbe) she/he prefers 3. I am talking about glosbe example sentences of the word under translation. E.g., you may use this parameter tm - whether to include examples (make translation memories search), values: 'true' or 'false', default: 'false' parse the response and display a short list of examples fetched.

Naraku

Ok, I see. Maybe I'll find some time on the next weekend, then I can add this.

Naraku

Have a look at the new version. :-)

edouardduliege

Hi, I'm on Fedora 23, I've recently updated to 0.6.1. I have issue with the yandex key since 2 words translation doesn't work. So I have a yandex key, which starts with trnsl then a bunch of dots and numbers. I've double clicked on the translator_config.ui file, which opened in Qt4 Designer. Then I copied the whole key (including the trnsl), then saved the file. Is there anything I missed or did improperly? Thanks for the constant improvements ;) Cheers

Naraku

Hi, yes, the yandex key starts with trnsl. However, there is no need to edit the config file. Once you installed the runner there is a config menu available where you can enter the key.

edouardduliege

Hi, Ok I solved the problem, thanks for the hint ;) works like a charm now!

dovidhalevi

No action typing stuff like fr-en maison No notice of this runner on the "search options" dialog. Running up-to-date Debian Sid.

Naraku

Could you paste the output of the cmake and make commands? Did you restart krunner after installation?

sxe

Checked the latest version based on the new API. Works good, thx for that. One suggestion: Would be awesome if you could add the possibility to set a default source language. Example: 1. Set source langage to "de" 2. search like this: en DeWord (en is the target language) 3. Result: DeWord in English This would make the translation shorter again (As it was with googles auto language detection). Regards

Naraku

Thanks for you feedback and have a look at the new version (0.6). You can specify a primary and secondary language in the config dialog. What do you think about it? Further, see README for instructions to reenable translation of sentences.

sxe

Wow works great well done. The only complain i have is that it's hard to understand how the primary and secondary language settings are working. I think it should be self explanatory to a point where a short help text in the GUI is enough to understand it. When you install it via a package manager you have no readme file. Suggestion: Rename "Translator Config" to "Source language settings". Call it "Default" and "Alternative" If qt allows it. Add a hint somewhere that explains what each does. 1. "Default - Defines the default source language so you can translate a string with providing the target language only. (EXAMPLE)" 2. "Alternative - Will be used when the target language is the same as the default language." Not perfect by any means but maybe it helps somehow. Just a quick idea.

Naraku

Yep, currently any hints and explenations are missing. Your suggestions sounds good, will do it on the weekend. It's the same with the api key. Could you follow my instructions?

sxe

Haven't tried yandex yet i am happy with the other API so far.

MartinZ

It used to work nicely

Naraku

Thanks for the note, I can reproduce this. I'll have a look at it after christmas.

Naraku

Had a look into it: Seems like it's not related to Plasma 5.5. Google made some changes to their api, probably they do not want their service to be used like that. Therefore it seems not reasonable to try to bypass this somehow since it will be broken in some weeks again. I guess I have to look at other apis. Hopefully there is a high-quality and open source friendly api available.

pioneer

Please check this https://tech.yandex.com/translate/.

Pling
0 Affiliates
Details
license GPLv3
version 1.5.0
updated
added
downloads 24h 11
mediaviews 24h 0
pageviews 24h 4

Other Web Runners:

product
Bible Runner
mdaa83
last update date: 15 years ago

Score 5.0

product
krunner-googletranslate
tcat
last update date: 14 years ago

Score 7.3

product
google translate runner
jgoday
last update date: 15 years ago

Score 6.1

product
QuickWebShortcuts
alex1701c
last update date: 11 months ago

Score 7.1

product
Dicio7Graus
juscelinojr
last update date: 5 months ago

Score 4.7

product
krunnercrypto
santiacq
last update date: 3 years ago

Score 6.4