google translate runner

Krunner Plugins

Source (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
Score 63.3%
Description:

Simple plasma runner using google translate service
Last changelog:

9 years ago

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

tcat

8 years ago

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

Report

jackyohh

9 years ago

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

Report

C

jgoday

9 years ago

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

Report

mzdsb

10 years ago

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?

Report

C

jgoday

10 years ago

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`

Report

mzdsb

10 years ago

ok, thanks, fixed! :D

had to copy it by myself, but now it's working :)

Report

sandsnake

10 years ago

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

Report

C

jgoday

10 years ago

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 :(

Report

sandsnake

10 years ago

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.

Report

C

jgoday

10 years ago

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
:)

Report

tittiatcoke

10 years ago

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

Report

C

jgoday

10 years ago

Hi, the source is in github too

http://github.com/jgoday/googletranslaterunner/tree/master

Report

Fri13

10 years ago

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?

Report

C

jgoday

10 years ago

Hi, thanks for the idea.

Now the syntaxis is :

[soruce language]= sentente or word to translate [language to traslate]=

And no configuration is needed.

Report

progdan

10 years ago

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

Report

emtorres

10 years ago

Thanks!

Report

C

jgoday

10 years ago

Thanks for trying it!

I have updated the sources adding a GPL License file, Changelog and Version too.

Report

9 years ago

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

12345678910
2
product-maker ZaWertun Jan 28 2012 9 excellent
product-maker Genserowski May 14 2011 9 excellent
product-maker Base: 4 x 5.0 Ratings
Stincjatclava
Apr 25 2013
sandsnake
Jun 08 2009
markwege
May 28 2009
progdan
May 24 2009
Frank
May 24 2009
File (click to download) Version Description Downloads Date Filesize DL OCS-Install MD5SUM
*Needs pling-store or ocs-url to install things
Pling
0 Affiliates
Details
license
version
0.0.3
updated Jul 12 2010
added May 22 2009
downloads 24h
1
pageviews 24h 7
System Tags addon