Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 27 Nov 2014, 16:46
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Google translator (standalone) updated
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [44 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Sun 01 Mar 2009, 20:18    Post subject:  

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

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send private message Visit poster's website 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sun 01 Mar 2009, 21:09    Post subject:  

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
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sun 01 Mar 2009, 21:51    Post subject:  

Code:
#!/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
Back to top
View user's profile Send private message 
Alex Snet


Joined: 01 Mar 2009
Posts: 3
Location: Russia, Moscow

PostPosted: Mon 02 Mar 2009, 05:44    Post subject:  

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.
Back to top
View user's profile Send private message Visit poster's website 
ICQ Number 
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Mon 02 Mar 2009, 05:58    Post subject:  

Hi Alex

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

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send private message Visit poster's website 
trapster


Joined: 28 Nov 2005
Posts: 2027
Location: Maine, USA

PostPosted: Mon 02 Mar 2009, 07:48    Post subject:  

big_bass wrote:
Code:
#!/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


Yes, I mentioned this in the /usr/local/Ptranslate/ptranslate.sh (I think). Maybe it is in /usr/local/bin/Ptranslate.

You can add an alias to your profile or add what you have above to /etc/wgetrc manually.

ie.
Code:
--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)"'


I like your "automatic" way better and will add it.

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Mon 02 Mar 2009, 09:04    Post subject:  

Quote:

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

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


Welcome to puppy Alex

GTK is already working Very Happy

thanks for sharing your work
it will be used well and help many people

Thank you
big_bass
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Mon 02 Mar 2009, 11:06    Post subject:
Subject description: translator 090302
 

Dear Puppians,

Here is Alex's latest binary with some minor bugfixes.

With kind regards,
Vovchik
translator090302.tar.gz
Description 
gz

 Download 
Filename  translator090302.tar.gz 
Filesize  126.58 KB 
Downloaded  245 Time(s) 
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Mon 02 Mar 2009, 16:41    Post subject:  

Dear trapster,

I thing you are also onto something. I played with the code a little and came up with this in gtkdialog - I still have not introduced combo boxes since I don't know how to get the language text to display with the corresponding flag in a gtkdialog list. Is it not possible? And I haven't yet done the paste and clear routines. The script should idally loop until the user wishes to exit, since there might be more than one text to be translated at a sitting. This is accomplished in gtkdialog by running the external things with an ampersand at the end. I am also trying to remove all external gtk utilities such as gtkmessage (Xmessage in your version) and gxdialog. gtkdialog can take care of all of that, but better as separately loaded scripts, I think. Incidentally, Cyrillic and Latin charsets with diacriticals appear properly in gtkdialog.

In any case, I am looking at the code and fiddling. Here is a preliminary screenshot.

With kind regards,
vovchik

PS. I basically borrowed Alex's concept - lock stock and barrel. His program is better, of course, but requires the qt4 libs which some users may not have. And Alex is making improvements every day.
ptranslate1.jpg
 Description   
 Filesize   41.01 KB
 Viewed   311 Time(s)

ptranslate1.jpg

Back to top
View user's profile Send private message 
trapster


Joined: 28 Nov 2005
Posts: 2027
Location: Maine, USA

PostPosted: Tue 03 Mar 2009, 07:40    Post subject:  

Very nice!!
Your talents are obviously far ahead of mine.
Don't stop now.

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
ttuuxxx


Joined: 05 May 2007
Posts: 10843
Location: Ontario Canada,Sydney Australia

PostPosted: Tue 03 Mar 2009, 07:46    Post subject:  

vovchik
Thats looking really good Smile two thumbs up Smile
ttuuxxx

_________________
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games Smile
Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Tue 03 Mar 2009, 13:14    Post subject:  

Dear trapster and ttuuxxx,

I couldn't have made any progress without you two and Alex Snet. And I am still plugging along. I have the combo boxes working nicely now but have a number of things on my "todo" list:

1. Make the "clear" button clear the source language box - edit box in gtkdialog.
2. Make the "swap" button change "from" to "to".
3. Make the "settings restore" routine work with combobox choice selection.
4. Change the file locations so that the prog works in any old *nix (not everybody has r/w access to files in /usr).
5. Fix the "waiting for Google routine", so that it is easy to kill within gtkdialog (there is a gtkdialog function to kill a window).
6. Ensure that the program does not exit until the user really wants to say "quit" and end it all.
7. Make a proper pet with these changes.
8. Figure out how to display language flags in a combobox list - I am stumpted at the moment.
9. Fix up the sed routines provided by trapster (perhaps trapster/ttuuxxx can really help, since I am not very competent with sed) so that the prog does not exit unexpectedly when the source contains various OS-sensitive symbols "<"'& etc (i.e filtering).
10. Add error message when user has no inet connectivity or when google translate is down.
11. Provide a check of /etc/wgetrc to ensure that the necessary options are there before the gui is invoked and if not, to fix it.

No additionaly utilities are now required to run Ptranslate (my version - no Xmessage or anything else), apart from gtkdialog and the standard Unix cli utils.

Thanks for the encouragement and I hope you guys can help.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
trapster


Joined: 28 Nov 2005
Posts: 2027
Location: Maine, USA

PostPosted: Tue 03 Mar 2009, 19:39    Post subject:  

I updated (for what it's worth) Ptranslate.
I added a check for the --referer in /etc/wgetrc, combo boxes for the language and to continue when hitting "ok" in xmessage.

This might cover your #6 + #11 issues.

_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Wed 04 Mar 2009, 14:26    Post subject:  

Dear trapster,

Thanks for your update. I will borrow the wgetrc update and checking routine, if you don't mind. I have done most of the things on my todo list, including coding (in C/GTK2) of a little wait screen display routine, since it is very difficult to kill the a process that gtkdialog itself spawns if the child relies on gtkdialog. I spent some hours testing all sorts of kill methods and it was simpler to duplicate the gtkdialog routine in straight C. Your kill pid routine now works with that program perfectly, as it does for Xdialog in your version. Only swap keys, paste and looping left, so there is light at the end of the tunnel.

With kind regards,
vovchik
Back to top
View user's profile Send private message 
trapster


Joined: 28 Nov 2005
Posts: 2027
Location: Maine, USA

PostPosted: Wed 04 Mar 2009, 20:02    Post subject:  

Well stop teasing us and give us a peak. Smile
_________________
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 2 of 3 [44 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0870s ][ Queries: 12 (0.0057s) ][ GZIP on ]