google translate runner

Web Runners

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

Add the source-code for this project on opencode.net

5
Become a Fan
6.1

Description:
Simple plasma runner using google translate service
Last changelog:

Mon July 12
-- Fix regular expression and use qjson lib to parse google translate result

Sun May 24
-- Change the runner syntax (en=word or sentence to translate de=). Config is unnecessary now
Sat May 23
-- Copy the match text to clipboard
-- Check for a QHttp error and show it


Ratings & Comments

17 Comments

tcat

Hi, I fixed this wonderful project: http://kde-apps.org/content/show.php/krunner-googletranslate?content=144348

jackyohh

would be nice if krunner recognizes current kde language to make "[language to traslate]=" only necessary i you want translate something into another language.

jgoday

Hi, nice idea, i updated the source code on github, now can work with the next syntax [search term] = [to language]

mzdsb

compiled without errors on kde4.3beta2 (sudo cmake CMakeList.txt, sudo make install), but can't find the krunner plugin on the available plugins list :( any tip?

jgoday

Do you have 'plasma-runner-googletranslate.desktop' file in your KDE share/kde4/services/ folder ? (kde4-config --prefix) you should configure that way cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix`

mzdsb

ok, thanks, fixed! :D had to copy it by myself, but now it's working :)

sandsnake

May be you can help me? [vlad@vixen googletranslate]$ cmake CMakeLists.txt -- The C compiler identification is GNU -- The CXX compiler identification is GNU -- Check for working C compiler: /usr/bin/gcc -- Check for working C compiler: /usr/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Looking for Q_WS_X11 -- Looking for Q_WS_X11 - found -- Looking for Q_WS_WIN -- Looking for Q_WS_WIN - not found. -- Looking for Q_WS_QWS -- Looking for Q_WS_QWS - not found. -- Looking for Q_WS_MAC -- Looking for Q_WS_MAC - not found. -- Found Qt-Version 4.5.1 (using /usr/bin/qmake) -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so;/usr/lib/libXft.so;/usr/lib/libXau.so;/usr/lib/libXdmcp.so;/usr/lib/libXpm.so -- Looking for XOpenDisplay in /usr/lib/libX11.so;/usr/lib/libXext.so;/usr/lib/libXft.so;/usr/lib/libXau.so;/usr/lib/libXdmcp.so;/usr/lib/libXpm.so - found -- Looking for gethostbyname -- Looking for gethostbyname - found -- Looking for connect -- Looking for connect - found -- Looking for remove -- Looking for remove - found -- Looking for shmat -- Looking for shmat - found -- Looking for IceConnectionNumber in ICE -- Looking for IceConnectionNumber in ICE - found -- Found X11: /usr/lib/libX11.so -- Looking for include files CMAKE_HAVE_PTHREAD_H -- Looking for include files CMAKE_HAVE_PTHREAD_H - found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found Automoc4: /usr/bin/automoc4 -- Found Perl: /usr/bin/perl -- Performing Test _OFFT_IS_64BIT -- Performing Test _OFFT_IS_64BIT - Failed -- Performing Test HAVE_FPIE_SUPPORT -- Performing Test HAVE_FPIE_SUPPORT - Success -- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL -- Performing Test __KDE_HAVE_W_OVERLOADED_VIRTUAL - Success -- Performing Test __KDE_HAVE_GCC_VISIBILITY -- Performing Test __KDE_HAVE_GCC_VISIBILITY - Success -- Phonon Version: 4.3.0 -- Found Phonon: /usr/lib/libphonon.so -- Found Phonon Includes: /usr/include/KDE;/usr/include -- Found KDE 4.2 include dir: /usr/include -- Found KDE 4.2 library dir: /usr/lib -- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler -- Found automoc4: /usr/bin/automoc4 -- Found KDE4Workspace: /usr/lib/cmake/KDE4Workspace-4.2.4/KDE4WorkspaceConfig.cmake -- Found KdepimLibs: /usr/lib/cmake/KdepimLibs-4.2.4/KdepimLibsConfig.cmake -- Configuring done -- Generating done -- Build files have been written to: /home/vlad/googletranslate [vlad@vixen googletranslate]$ make [ 0%] Built target krunner_googletranslate_automoc [ 25%] Building CXX object CMakeFiles/krunner_googletranslate.dir/googletranslate.o /home/vlad/googletranslate/googletranslate.cpp: In constructor 'GoogleTranslateRunner::GoogleTranslateRunner(QObject*, const QVariantList&)': /home/vlad/googletranslate/googletranslate.cpp:43: error: 'RunnerSyntax' is not a member of 'Plasma' /home/vlad/googletranslate/googletranslate.cpp:43: error: 'addSyntax' was not declared in this scope make[2]: *** [CMakeFiles/krunner_googletranslate.dir/googletranslate.o] Error 1 make[1]: *** [CMakeFiles/krunner_googletranslate.dir/all] Error 2 make: *** [all] Error 2

jgoday

Hi, method addSyntax was introduced in KDE 4.3 http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/classPlasma_1_1AbstractRunner.html#bf1a8db588c72cfad804e246264b81d7 if you are using 4.2 you can try to remove it, anyway i only tested it with 4.3 :(

sandsnake

I simply commented this line. Compilation and installation finished without errors. But I can't find this applet in plasma widgets listing. Don't know why :( Ok, I think better I wait update to kde 4.3. But now I want say - thank you!! This applet is very interested for me.

jgoday

hi, there is a google translator plasma applet (http://www.kde-look.org/content/show.php/translatoid?content=97511) by dridk This one is a KRunner plugin (Alt+F2 -> Settings -> available plugins) i hope be helpful :)

tittiatcoke

Hi, I have created an openSUSE rpm out of your package and it is available from the KDE4-Community repo's on openSUSE. However, I would like to ask you to use versioning of the source with all your changes, so that the life of people that are creating packages out of your source is a little easier :-) Based on the change of the 24th, I have adjusted the version now to 0.2.1 Regards Raymond

jgoday

Hi, the source is in github too http://github.com/jgoday/googletranslaterunner/tree/master

Fri13

Would it be possible to configure more like other KRunner functions. en=<word> de=<translation> ? Now the qt=en,de[<word>] is bretty difficult. There is other ways like the conversation just by giving wanted sum to get other 500m as feet That is very simple to do. So Mayby en= de= would be enough?

jgoday

Hi, thanks for the idea. Now the syntaxis is : [soruce language]= sentente or word to translate [language to traslate]= And no configuration is needed.

progdan

Cool runner! Thank you, it's really usefull. I made a PKGBUILD in AUR (ArchLinux), so you could add it to the sources: http://aur.archlinux.org/packages.php?ID=26685 I'd also like to ask you if you could add some version numbering, it will be easier to maintain updates (for both of us :-) ) Thanks once more

jgoday

Thanks for trying it! I have updated the sources adding a GPL License file, Changelog and Version too.

emtorres

Thanks!

Pling
0 Affiliates
Details
license
version 0.0.3
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 2

Other Web Runners:

Bible Runner
mdaa83
last update date: 15 years ago

Score 5.0

krunner-googletranslate
tcat
last update date: 14 years ago

Score 7.3

KRunner Translator
Naraku
last update date: 5 years ago

Score 8.4

QuickWebShortcuts
alex1701c
last update date: 11 months ago

Score 7.1

Dicio7Graus
juscelinojr
last update date: 5 months ago

Score 4.7

krunnercrypto
santiacq
last update date: 3 years ago

Score 6.4