translatoid

Plasma 4 Extensions

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

31
6.8
Description:

translator using google translator!
And it's my first plasmoids!!

svn co svn://anonsvn.kde.org/home/kde/trunk/playground/base/plasma/applets/translatoid
Last changelog:

10 years ago

-clear code
-add Catalan flag
-Add language title
- use Frame for the maintitle.
- Correct some encodage bug
- and more....

===0.4
- use kde svn :
http://websvn.kde.org/trunk/playground/base/plasma/applets/translatoid
- use PopupApplet! Now, Translatoid can be dock inside the main bar!
- Change language selection method! Now, You have to click and a KlistWidget appear !
- Add Copy and Past button
- Add AutoDetection language in languageList
- Add TooTip Message

Now, I need translator for translate, this translator... :)

===0.4.1
add Licence
add GPL2 header
replace setIcon() by nativeWidget()->seticon()

=====0.5
Add ListWidgetFlag inside the plasma and it appear with a Plasma::Animation!
Add Voice TTS support.

TODO : auto select - enter key - flag disabled for fedora!

======0.6
-AutoPaste the copy selection and autotranslate when you active Popup.
-GrabKeyboard when you active Popup
-Add "Clear Button"
-remove Cancel Button from DialogBox
-Add Po language file.
- Change inverse language icon
- Add Fedora Package without flags

====0.6.1
- Add new Icon
- change name : translatoid to plasma-applet-translatoid

======0.7
add New popup icon which can change his flags
use KConfigGroup for save favorite language
add FavoriteLanguage config dialog
some update of the code

=======0.8
IMPORTANT RELEASE :
change the algorithm of source translation. Now it use Post Method. It means that you can translate big text. And if you type 1 word, it get you the dictionnary result ! :) Thanks lexnewton.
=======0.9
-add new flags list ! Use a plasma::treeview with a QAbstractModel
-copy from the clipboard! Now, you just have to select a source text from anywhere, and active the popup, by cliking on the popup, or by a plasma shortcut.
-Change QTextEdit source event. Now, press Enter to translate, and press Shift+Enter to add a new line.

=======1.0
Change icon
Change a lot by aseigo , use KJob, nice animation during translate.
change the structure of translatoid
Will remove voice button, because KTTSD do the same job.
add estonishlanguage
===RC
After some error of myself! This is the good one :
- Set text color with theme color
- save your automaticaly last languages in use.

==1.1beta==== MAJOR CORRECTION
Now Translatoid use extender
Add Reminder extender to remind you some word after clicking on the star
Replace parsing by Json parsing. YOU NEED TO INSTALL libqjson
Clear some code and probably add some new bug.. :)
If you have some probs, contact me!

---1.1
Add new language :
"Afrikaans"
"Albanais"
"Albanais"
"Belarusian"
"Irish""Icelandic"
"Macedonian"
"Malaysia"
"Maltese"
"Persan"
"Swahili"
"Turkish"
"Yiddish"

1.12 ( Minor fix)
Just fix Icon installation...Sorry)
A new release will come out quickly

1.2 ( Minor fix)
Correct Html rending

1.21
Correct text color in "remind" area

1.30
Correct Json parser with new Google Api. Thanks alex789

1.30 bis
dominique fix

eusonig

11 years ago

[ 66%] Building CXX object CMakeFiles/translatoid.dir/ktranslatoid.o
/storage/auxiliar/descargas/translatoid/ktranslatoid.cpp: In member function ‘void KTranslatoid::constructForm()’:
/storage/auxiliar/descargas/translatoid/ktranslatoid.cpp:116: error: ‘class Plasma::ToolButton’ has no member named ‘setIcon’
/storage/auxiliar/descargas/translatoid/ktranslatoid.cpp:117: error: ‘class Plasma::ToolButton’ has no member named ‘setIcon’
make[2]: *** [CMakeFiles/translatoid.dir/ktranslatoid.o] Error 1
make[1]: *** [CMakeFiles/translatoid.dir/all] Error 2
make: *** [all] Error 2

I'm using KDE 4.2 final release.

Report

horchi

11 years ago

Hi,

here the same compile error on KDE 4.2.
It compiles after changing this two lines in ktransloid.cpp:

// pastButton->setMinimumSize(QSize(20,20));
// copyButton->setMinimumSize(QSize(20,20));
pastButton->setImage("edit-paste.png");
copyButton->setImage("edit-copy.png");

But unfortunately it don't appear in the 'add plasmoid' dialog, even after restarting plasma.

Regards
horchi

Report

eusonig

11 years ago

Uncomment and change to

pastButton->nativeWidget()->setIcon(KIcon("edit-paste.png"));
copyButton->nativeWidget()->setIcon(KIcon("edit-copy.png"));

works for me.

Report

C

dridk

11 years ago

Correct it in 0.4.1

Report

eliwap

11 years ago

Oh... I forgot to mention when running cmake run it like this from the build folder.

cmake -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..

Report

horchi

11 years ago

ups, sorry I have made wrong copy&paste, here it compile like this

// pastButton->setIcon(KIcon("edit-paste.png"));
// copyButton->setIcon(KIcon("edit-copy.png"));
pastButton->setImage("edit-paste.png");
copyButton->setImage("edit-copy.png");

Compile and install works fine but i still can't find the plasmoid in the add dialog ... ?

horchi

Report

C

dridk

11 years ago

be sure, you have : translatoid.so
and plasma-applet-translatoid.desktop
in good directory!
KDEDIR/lib/kde4/translatoid.so
KDEDIR/share/kde4/services/plasma-applet-translatoid.desktop

For exemple : locate plasma-applet-trash.desktop and plasma_applet_trash.so
And copy your file in the same directory corresponding.

Report

horchi

11 years ago

Hi,

yes, both in the same directory than the files of the other plugins, the right mask looks also good, even a complete KDE restart doesn't help

20:12:56,wendel@horchi:/data/src/plasmoids/translatoid> dir /usr/lib/kde4/translatoid.so /usr/share/kde4/services/plasma-applet-translatoid.desktop
-rw-r--r-- 1 root root 86948 2009-01-31 11:12 /usr/lib/kde4/translatoid.so
-rw-r--r-- 1 root root 592 2009-01-31 11:12 /usr/share/kde4/services/plasma-applet-translatoid.desktop
20:13:36,wendel@horchi:/data/src/plasmoids/translatoid> file /usr/lib/kde4/translatoid.so /usr/share/kde4/services/plasma-applet-translatoid.desktop
/usr/lib/kde4/translatoid.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped
/usr/share/kde4/services/plasma-applet-translatoid.desktop: ASCII text

Regards
horchi

Report

horchi

11 years ago

I don't now why, but it works after a reboot.

Thanks, nice plugin!

Regards
horchi

Report

eliwap

11 years ago

I received the same error when trying to compile however, I had to comment the other two lines to fix the problem so it would look like this

pastButton->setMinimumSize(QSize(20,20));
copyButton->setMinimumSize(QSize(20,20));
// pastButton->setImage("edit-paste.png");
// copyButton->setImage("edit-copy.png");

Report

kozer

12 years ago

I dont know how easy this is but i see that if i resize it pictures dont resize.Can you fix it?
BTW very useful plasmoid
Thank you

Report

eusonig

12 years ago

Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /usr/lib/kde4/translatoid.so
-- Up-to-date: /usr/share/kde4/services/plasma-applet-translatoid.desktop
CMake Error at cmake_install.cmake:51 (FILE):
file INSTALL cannot find file
"/storage/auxiliar/descargas/translatoid/title.png" to install.

Report

C

dridk

12 years ago

I forgotten to remove this line in CMakeLists.

#install(
# FILES title.png
# DESTINATION ${ICON_INSTALL_DIR}
# )

Report

rbb

12 years ago

Great work, but i got still one problem with the input window.
It flickers between white and the default window theme background.
Using 4.1.96.

Report

C

dridk

12 years ago

For Hotkey, I advice you to read my last news on my blogs :
http://dridk.blogspot.com/2009/01/translation-tool-for-help-developpers.html

hoping that this will be useful like for me

Report

eusonig

12 years ago

Great, japanese works!!!. Good work!!!

Now a few hotkeys suggestions :).

1) A hotkey to translate it would be great. For example Ctrl+Enter.
2) Also a hotkey to swap translation would be useful.
3) Finally a hotkey to send the translation to the clipboard.

Translatoid is great but its use is a little slow.

And a bug:
1) The context menu of controls is hidden by other controls.

Report

C

dridk

12 years ago

For Hotkey, I advice you to read my last news on my blogs :
http://dridk.blogspot.com/2009/01/translation-tool-for-help-developpers.html

hoping that this will be useful like for me

About the bug in context... it's from qt.. need to wait...

Report

eusonig

12 years ago

I can see but I'm using may own scripts with your fantastic gtranslate and xsel ;).

One tip, you only need:

echo $resultat | xsel -b

to put translated text into the clipboard with xsel.

On the other hand, I like more display translated text with kdialog --passivepopup that --msgbox.

Report

eusonig

12 years ago

Forgot the tip, only works in command line :-?, but you can use dbus like me.

qdbus org.kde.klipper /klipper org.kde.klipper.klipper.setClipboardContents "$TRANSLATED_TEXT"

Report

rajputrajat

12 years ago

But, it would be better, if you keep the "Translate" button after the "text to be translated".....

Report

smihael

12 years ago

http://www.kde-look.org/content/show.php?content=97895

Report

C

dridk

12 years ago

I created the Same one, using only command line! Very usefull!

http://www.qt-apps.org/content/show.php/gtranslate?content=97863

Report

eusonig

12 years ago

This is a great plasmoid but the result of translating from english to japanese is garbage:

en: It's great!
ja: ããã¯ãããï¼

but translating from japanese to english works well:

ja: すごいですね!
en: It's great!

On the other side, a button to quick toggle languages must be useful :).

Report

C

dridk

12 years ago

Some probleme with unicode! I will correct it in 0.2 version

Report

eusonig

12 years ago

I can see the problem in your code. The result page include html entities, like 好, for unicode characters and there is't conversion.

I hope you fix this soon, and put a swap button ;), because your plasmoid is great.

Report

10 years ago

-clear code
-add Catalan flag
-Add language title
- use Frame for the maintitle.
- Correct some encodage bug
- and more....

===0.4
- use kde svn :
http://websvn.kde.org/trunk/playground/base/plasma/applets/translatoid
- use PopupApplet! Now, Translatoid can be dock inside the main bar!
- Change language selection method! Now, You have to click and a KlistWidget appear !
- Add Copy and Past button
- Add AutoDetection language in languageList
- Add TooTip Message

Now, I need translator for translate, this translator... :)

===0.4.1
add Licence
add GPL2 header
replace setIcon() by nativeWidget()->seticon()

=====0.5
Add ListWidgetFlag inside the plasma and it appear with a Plasma::Animation!
Add Voice TTS support.

TODO : auto select - enter key - flag disabled for fedora!

======0.6
-AutoPaste the copy selection and autotranslate when you active Popup.
-GrabKeyboard when you active Popup
-Add "Clear Button"
-remove Cancel Button from DialogBox
-Add Po language file.
- Change inverse language icon
- Add Fedora Package without flags

====0.6.1
- Add new Icon
- change name : translatoid to plasma-applet-translatoid

======0.7
add New popup icon which can change his flags
use KConfigGroup for save favorite language
add FavoriteLanguage config dialog
some update of the code

=======0.8
IMPORTANT RELEASE :
change the algorithm of source translation. Now it use Post Method. It means that you can translate big text. And if you type 1 word, it get you the dictionnary result ! :) Thanks lexnewton.
=======0.9
-add new flags list ! Use a plasma::treeview with a QAbstractModel
-copy from the clipboard! Now, you just have to select a source text from anywhere, and active the popup, by cliking on the popup, or by a plasma shortcut.
-Change QTextEdit source event. Now, press Enter to translate, and press Shift+Enter to add a new line.

=======1.0
Change icon
Change a lot by aseigo , use KJob, nice animation during translate.
change the structure of translatoid
Will remove voice button, because KTTSD do the same job.
add estonishlanguage
===RC
After some error of myself! This is the good one :
- Set text color with theme color
- save your automaticaly last languages in use.

==1.1beta==== MAJOR CORRECTION
Now Translatoid use extender
Add Reminder extender to remind you some word after clicking on the star
Replace parsing by Json parsing. YOU NEED TO INSTALL libqjson
Clear some code and probably add some new bug.. :)
If you have some probs, contact me!

---1.1
Add new language :
"Afrikaans"
"Albanais"
"Albanais"
"Belarusian"
"Irish""Icelandic"
"Macedonian"
"Malaysia"
"Maltese"
"Persan"
"Swahili"
"Turkish"
"Yiddish"

1.12 ( Minor fix)
Just fix Icon installation...Sorry)
A new release will come out quickly

1.2 ( Minor fix)
Correct Html rending

1.21
Correct text color in "remind" area

1.30
Correct Json parser with new Google Api. Thanks alex789

1.30 bis
dominique fix

12345678910
15
product-maker janet Aug 22 2015 9 excellent
product-maker Zolnierzu May 26 2012 9 excellent
product-maker fadnix Apr 04 2011 9 excellent
product-maker infectedsoundsystem Jan 19 2011 9 excellent
product-maker chepioq Jan 05 2011 3 bad
product-maker vitoubien Nov 30 2010 9 excellent
Be the first to comment
janet
Aug 22 2015
Zolnierzu
May 26 2012
papylhomme
Apr 18 2011
cruzki
Feb 14 2011
tigerfoot
Dec 12 2010
max99
Dec 05 2010
Senth
Aug 15 2010
Refused
Jun 21 2010
Siminin
Jan 11 2010
fadnix
Dec 06 2009
Leiche
Nov 25 2009
montoya
Nov 21 2009
jajaX
Nov 19 2009
lordlukas
Nov 19 2009
perezmeyer
Sep 30 2009
M3t4linux
Aug 18 2009
EinfachToll
Jul 28 2009
dualpretop
Jul 14 2009
Podstavsky
Jun 10 2009
jzakrzewski
Apr 30 2009
dkarnout
Apr 25 2009
gimox
Apr 21 2009
universe777
Apr 18 2009
okias
Mar 25 2009
brdn25
Mar 16 2009
glad
Mar 09 2009
mbaszczewski
Feb 26 2009
dimitrispan88
Feb 12 2009
its
Feb 12 2009
ingame
Feb 07 2009
torkiano
Jan 31 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
1.30
updated Nov 30 2010
added Jan 14 2009
downloads 24h
0
mediaviews 24h 0
pageviews 24h 0