egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

BabelFishTranslator.tcl (current version: 1.12)
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases
View previous topic :: View next topic  
Author Message
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Thu Mar 08, 2007 9:15 pm    Post subject: BabelFishTranslator.tcl (current version: 1.12) Reply with quote

 
Uses BabelFish to translate words or sentences from/to english.
(french version does the same from/to french)

Allowed languages can be easily modified according to BabelFish available languages.

eg.:
Quote:
<nick> !translate en-fr this is a test
<bot> Translation: ceci est un test



You can download the latest version here until it has been added to the Tcl archive :
BabelFishTranslator.tcl v1.12 (english version)
BabelFishTranslator.tcl v1.12 (french version)

please leave comments / bug reports here


Last edited by MenzAgitat on Tue Jul 08, 2008 7:08 am; edited 8 times in total
Back to top
View user's profile Send private message Visit poster's website
raktivist
Voice


Joined: 22 Nov 2005
Posts: 15

PostPosted: Fri Mar 09, 2007 11:14 pm    Post subject: Reply with quote

'i edited mine to this.. to reflect correct 'help' notice.
pardon me but i don't know anything about scripting but i figured i edit that line as it was incorrect info! other than that! very neat script u got here!

Code:
 putserv "NOTICE $nick :\037Available languages:\037"
      putserv "NOTICE $nick :\002fr-en\002 —— French/English"
      putserv "NOTICE $nick :\002de-en\002 —— German/English"
      putserv "NOTICE $nick :\002nl-en\002 —— Dutch/English"
      putserv "NOTICE $nick :\002it-en\002 —— Italian/English"
      putserv "NOTICE $nick :\002pt-en\002 —— Portuguese/English"
      putserv "NOTICE $nick :\002es-en\002 —— Spanish/English"
      putserv "NOTICE $nick :\002en-fr\002 —— English/French"
      putserv "NOTICE $nick :\002en-de\002 —— English/German"
      putserv "NOTICE $nick :\002en-nl\002 —— English/Dutch"
      putserv "NOTICE $nick :\002en-it\002 —— English/Italian"
      putserv "NOTICE $nick :\002en-pt\002 —— English/Portuguese"
      putserv "NOTICE $nick :\002en-es\002 —— English/Spanish"
Back to top
View user's profile Send private message
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Sat Mar 10, 2007 8:34 am    Post subject: Reply with quote

 
Oops, you are right.
I am a french guy and the script was originally written for that language.
When I translated it for english-speaking users, I apparently forgot some details in the online help Embarassed

Thank you for having noticed that, here is the fixed version : BabelFishTranslator

Note: The french version does not have this issue, so the latest french version is still v1.0
Back to top
View user's profile Send private message Visit poster's website
mabus
Voice


Joined: 17 Jun 2005
Posts: 27

PostPosted: Sun Aug 12, 2007 12:01 pm    Post subject: Reply with quote

How difficult would it be to add other languages to this?
Back to top
View user's profile Send private message
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Mon Aug 13, 2007 9:06 am    Post subject: Reply with quote

 
It is very simple, as long as it is supported by babelfish.altavista.com.

Go take a look here and click on Sélectionnez les langues source et cible to see if it can be done.

Which languages do you want to add support for ?
Back to top
View user's profile Send private message Visit poster's website
mabus
Voice


Joined: 17 Jun 2005
Posts: 27

PostPosted: Mon Aug 13, 2007 10:12 am    Post subject: Reply with quote

A couple of my channel members speak russian and have been asking me try to find something to help them out. Though of course, the more languages it could incorporate the better.
Back to top
View user's profile Send private message
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Tue Aug 14, 2007 7:44 am    Post subject: Reply with quote

 
Languages using specific charsets are a little bit problematic, I need a complete conversion table including russian characters for the Url construction procedure.

Look for this in BabelFishTranslator.tcl :
Code:
##### URL construction
      set text [string map {
....


Should someone find that for me, I could add russian support.
Back to top
View user's profile Send private message Visit poster's website
mabus
Voice


Joined: 17 Jun 2005
Posts: 27

PostPosted: Tue Aug 14, 2007 5:55 pm    Post subject: Reply with quote

hmmm, I see the "string map" in the script. What exactly would you need to be found ... specifically?
Back to top
View user's profile Send private message
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Thu Aug 16, 2007 6:50 am    Post subject: Reply with quote

 
I need a conversion table for russian specific characters -> hex values
Back to top
View user's profile Send private message Visit poster's website
schizosmurf
Voice


Joined: 12 Oct 2007
Posts: 15

PostPosted: Fri Oct 12, 2007 10:59 am    Post subject: Reply with quote

installed this script yesterday and it works perfectly. good job.

is there a way to make it work in private message also, and not just from public message
ex. /msg eggbot !translate en-es How are you today?
Back to top
View user's profile Send private message
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Sat Oct 13, 2007 1:13 pm    Post subject: Reply with quote

Good idea, I'll also put the whole thing in a namespace to avoid possible conflicts.
Expect a new version very soon.
Back to top
View user's profile Send private message Visit poster's website
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Sat Oct 13, 2007 3:53 pm    Post subject: Reply with quote

New version available.

changelog:
v1.1
- It is now possible to do a request in private msg with the bot like this :
Code:
/msg botname !translate en-fr This is a test

- Integration in a namespace
Back to top
View user's profile Send private message Visit poster's website
schizosmurf
Voice


Joined: 12 Oct 2007
Posts: 15

PostPosted: Sat Oct 13, 2007 4:17 pm    Post subject: Reply with quote

works great. good job Smile
dropped script into folder, restart bot, and tada!
thx for taking my suggestion and making it reality
Back to top
View user's profile Send private message
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Fri Oct 26, 2007 2:03 pm    Post subject: Reply with quote

At the moment, there are only two versions of the script : english and french.
If some altruist guys would translate the whole script (including comments) into some other languages, I could add them in a multilingual package Very Happy
Back to top
View user's profile Send private message Visit poster's website
MenzAgitat
Op


Joined: 04 Jul 2006
Posts: 118
Location: France

PostPosted: Thu Dec 06, 2007 8:17 am    Post subject: Reply with quote

New version available : v1.11
- bug fix in the english version
- the help displays faster

You can find a working link to download it in the first post of this thread.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Support & Releases All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber