This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

BabelFishTranslator.tcl (current version: 1.12)

Support & discussion of released scripts, and announcements of new releases.
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

BabelFishTranslator.tcl (current version: 1.12)

Post by MenzAgitat »

 
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.:
<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.
r
raktivist
Voice
Posts: 15
Joined: Tue Nov 22, 2005 9:08 am

Post by raktivist »

'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: Select all

 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" 
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

 
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 :oops:

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
m
mabus
Voice
Posts: 27
Joined: Fri Jun 17, 2005 6:19 pm

Post by mabus »

How difficult would it be to add other languages to this?
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

 
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 ?
m
mabus
Voice
Posts: 27
Joined: Fri Jun 17, 2005 6:19 pm

Post by mabus »

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.
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

 
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: Select all

##### URL construction
      set text [string map { 
....
Should someone find that for me, I could add russian support.
m
mabus
Voice
Posts: 27
Joined: Fri Jun 17, 2005 6:19 pm

Post by mabus »

hmmm, I see the "string map" in the script. What exactly would you need to be found ... specifically?
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

 
I need a conversion table for russian specific characters -> hex values
User avatar
schizosmurf
Voice
Posts: 15
Joined: Fri Oct 12, 2007 10:50 am

Post by schizosmurf »

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?
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

Good idea, I'll also put the whole thing in a namespace to avoid possible conflicts.
Expect a new version very soon.
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

New version available.

changelog:
v1.1
- It is now possible to do a request in private msg with the bot like this :

Code: Select all

/msg botname !translate en-fr This is a test
- Integration in a namespace
User avatar
schizosmurf
Voice
Posts: 15
Joined: Fri Oct 12, 2007 10:50 am

Post by schizosmurf »

works great. good job :)
dropped script into folder, restart bot, and tada!
thx for taking my suggestion and making it reality
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

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 :D
User avatar
MenzAgitat
Op
Posts: 118
Joined: Tue Jul 04, 2006 12:35 pm
Location: France
Contact:

Post by MenzAgitat »

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.
Post Reply