Page 1 of 3

Google translator (standalone) updated

Posted: Fri 27 Feb 2009, 13:49
by vovchik
Dear Puppians,

Here is a tiny and useful utility program for those of us who work in various languages. Written my Alex Snet (http://alexsnet.ru/opensource/translato ... omment-683), it accesses Google translate via its own gui, obviating the need to start a browser to access this facility. I compiled it in Puppy 3.01 with qt 4.4, but it runs fine in any qt 4.x (I checked). It should also work without problems in Puppy 4.x. Unpack the archive and place in an executable dir, such as /usr/bin, /usr/local/bin or /root/my-applications/bin.

With kind regards,
vovchik

Google translator

Posted: Fri 27 Feb 2009, 15:45
by elraven
this is an awesome app :D it worked straight away in my puppy 409. it works so easily and its kind of fun too. Thanks again. :D

Posted: Fri 27 Feb 2009, 20:03
by vovchik
Dear Puppians,

Here is an icon I created for translator. Obviously the flags are arbitrary and taken from a KDE source. If one wanted to specify country A and country B, there would be thousands of possibilities...and I am lazy.

With kind regards,
vovchik

Posted: Sat 28 Feb 2009, 11:54
by vovchik
Dear Puppians,

Alex has updated translate. The pulldown language list now contains full language names and not codes. He also intends, in a future version, to provide a progress bar, needed when Google translate or your inet connection is slow. I'll be watching his site and providing updates.

With kind regards,
vovchik

PS. I removed the old binary...

Posted: Sat 28 Feb 2009, 20:18
by vovchik
Dear Puppians,

I can't seem to get the new version to work. Has anybody got it to show a translation? At best I get the same phrase returned in English with some part of speech information. I would recommend taking the old version - at the top of this post - until this problem is sorted out. I am certain it will be. I have also sent the author a collection of flags (pngs) for the languages in the list. So translate might get prettier.

With kind regards,
vovchik

Posted: Sun 01 Mar 2009, 10:06
by vovchik
Dear Puppians,

As promised, Alex has fixed the error and added flags, so the app is not only functional, but pretty and it is now easy to choose languages. Here is the binary. Works in puppy 3.x and 4.x if you have qt4 installed.

With kind regards,
vovchik

Posted: Sun 01 Mar 2009, 11:11
by vovchik
Dear Puppians,

Here is a screenshot of translate on my machine.

With kind regards,
vovchik

Posted: Sun 01 Mar 2009, 13:04
by ttuuxxx
Hi maybe you could contact alex and ask for a gtk GUI, Really a program like this doesn't need qt, It would save a lot of extra weight for users who don't use QT or have older pc's. Well just an idea I guess, nice program, should be useful for a lot of people :) Nice find
ttuuxxx

Posted: Sun 01 Mar 2009, 14:15
by vovchik
Dear ttuuxxx,

I think you're onto something. It should be possible to do roughly the same thing using gtkdialog3 with glade (or without) and to use curl or another such cli utility for the html POST and retrieval business. I once did something like that to retrieve weather data, and am thinking about the possibilities right now. Importantly, Alex has come up with a very nice idea - and his implementation works very nicely. If you have any more thoughts on this subject, please post them.

With kind regards,
vovchik

PS. I think Alex works on the Mac, but does do work on Debian and Windows. His use of QT allows the app to run on three platforms at once. I don't know whether he would be willing to spend a lot of time to do a GTK version, but the source is there for QT4, so the important POSTing routines are available for subsequent GTK "cannibalization".

Posted: Sun 01 Mar 2009, 20:33
by big_bass
vovchik

I live in Mexico now I speak both Spanish and English
*Spanish I learned as a second language living in Mexico
I also translate documents

so translating tools always are put to good use

I took a quick look at the source and the page was in Russian
so I was lost could you please list what you did to compile the source
in some standard tar.gz format

then we can help out too

thank you for posting
big_bass

Posted: Sun 01 Mar 2009, 21:41
by vovchik
Dear big_bass,

I am glad some people are interested in this program. I find it useful and convenient. I have asked the author to provide an option to load in the systray and a button to clean the upper window. He will oblige, and also provide a progress meter for slow connections.

In the mean time, I am attaching the source. Please have a look. Brief compiling instructions are in the INSTALL I wrote in about 10 seconds.

With kind regards,
vovchik

Posted: Sun 01 Mar 2009, 23:26
by trapster
Well this gave me something to do this afternoon.
It was thrown together and needs a lot more.
A lot of characters do not show up correctly.

Does gtkdialog do drop down boxes?
I do not know how to show results in gtkdialog so xmessage is used instead.

Feel free to hack away.

Image

Image

Edit: 3/3/09
Ptranslator-0.2
Added a check for the google referer in /etc/wgetrc
Added comboboxes for the langauges.

Posted: Sun 01 Mar 2009, 23:27
by trapster
oops....double post

Posted: Mon 02 Mar 2009, 00:02
by ttuuxxx
[quote="trapster"]Well this gave me something to do this afternoon.
It was thrown together and needs a lot more.
A lot of characters do not show up correctly.

Does gtkdialog do drop down boxes?
/quote]

yes heres the default example

#! /bin/bash

export MAIN_DIALOG='
<vbox>
<hbox>
<text>
<label>Combobox:</label>
</text>
<combobox>
<variable>COMBOBOX</variable>
<item>First item</item>
<item>Second item</item>
<item>Third item</item>
</combobox>
</hbox>
<hbox>
<button ok></button>
<button cancel></button>
</hbox>
</vbox>
'

gtkdialog3 --program=MAIN_DIALOG

ttuuxxx

Posted: Mon 02 Mar 2009, 00:08
by trapster
Thanks ttuuxxx.
Can the items be a list of items in a file.
ie. all the different "2 letter" languages?

Posted: Mon 02 Mar 2009, 00:18
by ttuuxxx
trapster wrote:Thanks ttuuxxx.
Can the items be a list of items in a file.
ie. all the different "2 letter" languages?
like this default example

#! /bin/bash

export MAIN_DIALOG='
<vbox>
<hbox>
<text>
<label>value-in-list:</label>
</text>
<combobox case-sensitive="false" value-in-list="true">
<variable>COMBOBOX1</variable>
<item>First</item>
<item>Second</item>
<item>Third</item>
</combobox>
</hbox>
<hbox>
<text>
<label>allow-empty:</label>
</text>
<combobox allow-empty="false" value-in-list="true">
<variable>COMBOBOX2</variable>
<item>First</item>
<item>Second</item>
<item>Third</item>
</combobox>
</hbox>
<hbox>
<button ok></button>
<button cancel></button>
</hbox>
</vbox>
'

gtkdialog3 --program=MAIN_DIALOG


ttuuxxx

Posted: Mon 02 Mar 2009, 01:09
by big_bass
trapster all the default gtk examples are here
http://www.murga-linux.com/puppy/viewtopic.php?t=38608

nice start though
note :gxmessage still looks good in older puppy versions
compared to xmessage
its very blocky looking in puppy 4 +
like 1980 graphics

nice job trapster

big_bass

Posted: Mon 02 Mar 2009, 01:51
by big_bass

Code: Select all

#!/bin/sh
echo '--referer="http://www.google.com"
--user-agent = "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080129 Iceweasel/2.0.0.12 (Debian-2.0.0.12-0etch1)"'>>/etc/wgetrc

I made you a quick setup script
you need to add this in the package
to set up the defaults

thanks its working now
big_bass

Posted: Mon 02 Mar 2009, 09:44
by Alex Snet
Hi 2 all.

I'm Alex Snet and this topic is about Translator.

I will translate my page to english in nearly time.

Thanks to all for comments.

What's about GTK? I think this is real. But it will takes some time for porting and learning this library.

With best regards,
Alex Snet.

Posted: Mon 02 Mar 2009, 09:58
by ttuuxxx
Hi Alex

Welcome to puppy :)
If you ever need anything just ask :) We're here to help :)
ttuuxxx