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 Mon 10 Dec 2018, 09:14
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Documents
gxlat - Desktop Google Translator redux
Post new topic   Reply to topic View previous topic :: View next topic
Page 4 of 5 [63 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
vovchik


Joined: 23 Oct 2006
Posts: 1470
Location: Ukraine

PostPosted: Fri 06 Jul 2018, 06:53    Post subject:  

Dear all,

After many years I decided to update gxlat. There is a great little script (included in the archive) called trans that can deal with Google's new translate API. gxlat now uses that to fetch translations. Just unpack and copy files to the appropriate places. perhaps somebody can make a pet. Smile

With kind regards,
vovchik
gxlat.tar.gz
Description 
gz

 Download 
Filename  gxlat.tar.gz 
Filesize  44.67 KB 
Downloaded  94 Time(s) 
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1470
Location: Ukraine

PostPosted: Mon 09 Jul 2018, 04:38    Post subject:  

Dear all,

A forum friend has kindly provided a pet of gxlat, which is attached here. Thanks. Let me know how this little app works for you...i use it nearly every day for something or other that comes up and needs translation. Your mileage may vary. Smile

With kind regards,
vovchik
gxlat.pet
Description 
pet

 Download 
Filename  gxlat.pet 
Filesize  44.82 KB 
Downloaded  109 Time(s) 
Back to top
View user's profile Send private message 
musher0

Joined: 04 Jan 2009
Posts: 13146
Location: Gatineau (Qc), Canada

PostPosted: Mon 09 Jul 2018, 16:00    Post subject:  

Hi Vovchik.

Good to see you back! Smile

Google Translation, eh? Why not DeepL? Some say it translates better than Google.

Just a thought.

_________________
musher0
~~~~~~~~~~
Je suis né pour aimer et non pas pour haïr. (Sophocle) /
I was born to love and not to hate. (Sophocles)
Back to top
View user's profile Send private message 
mikeslr


Joined: 16 Jun 2008
Posts: 2833
Location: 500 seconds from Sol

PostPosted: Mon 09 Jul 2018, 16:29    Post subject: Thanks  

Thank you, vovchik, and thank your friend for us.
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1470
Location: Ukraine

PostPosted: Mon 09 Jul 2018, 17:12    Post subject:  

@ musher0 and mikeslr,

Thanks guys. As I haven't done anything with gtkdialog for a long time (doing things in BaCon, c and c++ lately), perhaps one of you can look at that pesky swap button code. It should, in theory, swap bottom and top languages in the combo boxes and the texts in the edit boxes, but it's not doing that properly. And since trans works so nicely, I think we should stick with it. We could also experiment with the various engines it supports (aspell, google, deepl, bing, spell, hunspell, apertium and yandex). I haven't tried deepl, but it's certainly worth experimenting with. Perhaps there could be a combo box with some of those engines, so the user can try and compare translations. And a checkbox for sound might be good, too, since trans can play audio. Smile

In any case, I hope it is working reasonably now.

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


Joined: 23 Oct 2006
Posts: 1470
Location: Ukraine

PostPosted: Tue 10 Jul 2018, 08:11    Post subject:  

Dear all,

I updated gxlat. It now allows you to select the translation engine via a combbox and also can let you hear the translation (if the service provides this option) by enabling the Sound checkbox. Google and Bing are pretty good regarding sound availability. You need to have mplayer, mpv, espeak or mpg123 installed to get sound. You first will hear the translation and then get the translated text in the bottom text box. Enjoy. Smile

With kind regards,
vovchik
fltk139.png
 Description   
 Filesize   69.32 KB
 Viewed   682 Time(s)

fltk139.png

gxlat.pet
Description 
pet

 Download 
Filename  gxlat.pet 
Filesize  45.46 KB 
Downloaded  121 Time(s) 
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8739
Location: Perth, Western Australia

PostPosted: Sat 28 Jul 2018, 10:11    Post subject:  

What a great app!

I have posted about it on my blog:

http://bkhome.org/news/201807/gxlat-language-translator.html

Fixed a couple of things in the PET, and bumped the version to 0.4, uploaded here:

http://distro.ibiblio.org/easyos/noarch/packages/pet/pet_packages-noarch/gxlat-0.4.pet

...let me know if I did anything wrong with the changes that I made.

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4844
Location: Blue Springs, MO

PostPosted: Sat 28 Jul 2018, 19:04    Post subject:  

When L18l was using my alternative to gettext, I wrote up a shell function that used Google translate to automatically generate translated strings. That function could be useful to add to your app for .po files. Let me know if you are interested and I will dig up the thread. One part that I know will need to be changed (besides using po files) is that it generates results for all supported language even if it already exists. Honestly, it probably belongs in the woof build process too, but it needs to be tested and having a nice GUI for translating installed apps could help with our severe lack of localization.
_________________
Check out my github repositories. I may eventually get around to updating my blogspot.
Back to top
View user's profile Send private message Visit poster's website 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1705
Location: Japan

PostPosted: Sat 04 Aug 2018, 09:46    Post subject:  

I can't get any version to work in slacko 5.6 Crying or Very sad
Obviously a problem with trans and not with the gxlat GUI
Code:
trans -e google -brief -sl en -tl fr Example
gxlat.png
 Description   
 Filesize   23.41 KB
 Viewed   370 Time(s)

gxlat.png

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

Joined: 12 Oct 2012
Posts: 1573
Location: The other Mr. 305

PostPosted: Sat 04 Aug 2018, 22:56    Post subject:  

The "Swap" button only moves to: over to the from:field but the to: field stays the same. Would be nice if you started typing the language in the box and it goes to that letter. Overall, minor issues. Well done!

Slavvo67
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 3483
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Wed 08 Aug 2018, 08:15    Post subject:  

Bonjour,
MochiMoppel wrote:
I can't get any version to work in slacko 5.6 Crying or Very sad
Obviously a problem with trans and not with the gxlat GUI

I had the same issue running Puppy 5.7.1/ToOpPy 2.2 and it appears that "trans" had nothing to do with! I compiled/installed latest gawk release from Arrow sources here, then gxlat worked great, though "Google" engine is far from giving the best translations: nothing to do with the results obtained with DeepL which seems not working here!
Code:
#trans -e google -brief -sl en -tl fr "The "Swap" button only moves to: over to the from:field but the to: field stays the same. Would be nice if you started typing the language in the box and it goes to that letter. Overall, minor issues. Well done!"
Le bouton Permuter ne se déplace que vers: sur le champ from: mais le champ to: reste le même. Serait bien si vous avez commencé à taper la langue dans la boîte et il va à cette lettre. Dans l'ensemble, problèmes mineurs. Bien joué!


It might be nice to change the image displayed at the top of the window according to the selected engine.

@vovchik
Thank you for this "great app"!
May I say that it is a pity that such a GUI was not built to allow internationalization? Sad


Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1705
Location: Japan

PostPosted: Tue 14 Aug 2018, 00:46    Post subject:  

Argolance wrote:
I had the same issue running Puppy 5.7.1/ToOpPy 2.2 and it appears that "trans" had nothing to do with! I compiled/installed latest gawk release from Arrow sources here, then gxlat worked great

Bonjour Argolance
well, IMO trans has something to do with it Error detection is one of the jobs of a script, and if gawk spills out errors trans should handle this situation and not go on as if nothing has happened.

Nevertheless that wouldn't help me much as my ultimate goal is to use trans in my own projects. I can't expect users to update to the latest gawk just for using my program.

I have gawk version 3.1.8 , which is 8 years old, but so is gxlat. I wonder why gxlat ever worked before and why it now requires the newest gawk. Maybe there is another reason?
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 8739
Location: Perth, Western Australia

PostPosted: Tue 14 Aug 2018, 08:26    Post subject:  

MochiMoppel wrote:
Argolance wrote:
I had the same issue running Puppy 5.7.1/ToOpPy 2.2 and it appears that "trans" had nothing to do with! I compiled/installed latest gawk release from Arrow sources here, then gxlat worked great

Bonjour Argolance
well, IMO trans has something to do with it Error detection is one of the jobs of a script, and if gawk spills out errors trans should handle this situation and not go on as if nothing has happened.

Nevertheless that wouldn't help me much as my ultimate goal is to use trans in my own projects. I can't expect users to update to the latest gawk just for using my program.

I have gawk version 3.1.8 , which is 8 years old, but so is gxlat. I wonder why gxlat ever worked before and why it now requires the newest gawk. Maybe there is another reason?


argolance,
Were you previously using the busybox gawk applet in ToOpPy?

_________________
http://bkhome.org/news/
Back to top
View user's profile Send private message Visit poster's website 
Keef


Joined: 20 Dec 2007
Posts: 925
Location: Staffordshire

PostPosted: Tue 14 Aug 2018, 14:48    Post subject:  

The trans script is from here:
https://github.com/soimort/translate-shell

Quote:
Dependencies

GNU Awk (gawk) 4.0 or later
This program relies heavily on GNU extensions of the AWK language, which are non-portable for other AWK implementations (e.g. nawk).
How to get gawk:
gawk comes with all GNU/Linux distributions.
On FreeBSD, gawk is available in the ports.
On macOS, gawk is available in MacPorts and Homebrew.
GNU Bash or Zsh
You may use Translate Shell from any Unix shell of your choice (bash, zsh, ksh, tcsh, fish, etc.); however, the wrapper script requires either bash or zsh installed.


I used to use the translate cli script that it used to be, but it stopped working a while back.
Back to top
View user's profile Send private message 
vovchik


Joined: 23 Oct 2006
Posts: 1470
Location: Ukraine

PostPosted: Tue 14 Aug 2018, 16:17    Post subject:  

Dear all,

Thanks for the comments. The trans prog (including URL) is explained in the readme - click that button in Help. Many have given me a lot of good suggestions, so I will try to incorporate those in a subsequent version (favourites, swap fix, logo change depending on xlat engine). I didn't run into any problems with trans or gawk since I am using version 4.0.1. Version 4.0 is a requirement, it seems. Let's hope Google does not change its API. Smile

With kind regards,
vovchik
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 4 of 5 [63 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Documents
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.1262s ][ Queries: 13 (0.0356s) ][ GZIP on ]