This is a translator for your bot that will detect when someone is not speaking your target language and attempt to translate what they said automatically.
Using this is pretty simple. Just load it and turn it on from Right Click Channel window. As soon as someone types something that isn't english the bot will react Quickly.
Example:
21:39:41 <@Administrator Compromesso al Senato: gestione privata proprietà pubblica La rete idrica è allo sfascio e ora si rischia di penalizzare i comuni virtuosi Repubblica.it: il quotidiano online con tutte le notizie in tempo reale.
21:39:42 <MyMulez> Administrator may not be speaking English!! Translation it-en Compromise to the Senate: privately owned proprietpubblica The water network in shambles and now threatens to penalize municipalities virtuous Repubblica.it: Newspapers online with all the news in real time.
Ok Pretty big update for this script.
It's no longer just for English. You can now select a target language.
I also changed it for multi-channel/multi-network configuration.
After loading, just right click the channel window and select autotrans - autotrans setup.
Echo will echo back to the channel the text originated.
.Msg will message the channel. (for bot use)
.Notice will notice the client the script is loaded to.
If you have any problems with missing characters in your translations, please review your utf8 settings before posting your problem.
Under mIRC Options - Irc - Messages. It should look like this.
If you right click the channel on the treebar and click font, the utf8 should say display and encode. It is necessary to check this for each channel you are using the translator in.
Update
Added:
The Exclusion Manager
It's a simple dialog so you can add WORDS(not phrases) to be somewhat excluded from translation.
The words are not excluded from translation, but they are excluded from the algorithm that is used to determine if a translation will be returned or not.
To add WORDS, right click the channel and select Exclusions Manager from the menu.
I'll add a Trigger system to this later.
The \L2 Trigger
This is very simple to use, just type \L2 where L2 is the language code for the language you want your text translated into. Your text will be translated to the window you are typing into.
Example: \fr some words to translate here.
Note This is not a bot trigger. This is a On input routine and must be typed from the
client with the script loaded.
The Hotlink
This works Right clicking on this part -->> [L1]-[L2] <<-- of a language translation.
You will be prompted to decide.
And then prompted for some text.
Note Your text will be translated to the reverse of what you clicked.
clicking [de]-[en] , will translate your text from english to german.
Also This script must be loaded in the client that you are typing in for this to work.
;Auto Translator by Ford_Lawnmower irc.GeekShed.net #Script-Help
menu Channel {
.$iif($gettok($hget(autotrans,$+($network,$chan)),3,32) == On && $group(#AutoTrans) == On,$style(1)) AutoTrans
..$iif($group(#AutoTrans) == On,$style(1)) Auto Trans Master On/Off: $iif($group(#AutoTrans) == On,.disable,.enable) #AutoTrans
..Auto Trans Setup:dialog $iif($dialog(auto_translator),-v,-m) auto_translator auto_translator
..Manage Exclusions:dialog $iif($dialog(auto_translator_exclude),-v,-m) auto_translator_exclude auto_translator_exclude
}
#AutoTrans On
On *:Text:*:#: {
if (!$timer($+(AutoTrans,$network,$nick))) {
.timer $+ $+(AutoTrans,$network,$nick) 1 .5 noop
if ($gettok($hget(autotrans,$+($network,$chan)),3,32) == On) && (!$regex($1,/^[!.@.#.+./.:.-.+]/S) && (!$notrans($urlencode($1-)))) {
var %text $urlencode($utfdecode($utfencode($exclude($1-))))
tokenize 32 $hget(autotrans,$+($network,$chan))
AutoTrans $2 $iif($2 == .Msg,$chan,$iif($2 == Echo,$chan,$me)) $iif($4,$+(09[04,$nick,09]),0) $+(|,$langpair($1)) %text 0
}
}
}
On *:Action:*:#: {
if (!$timer($+(AutoTrans,$network,$nick))) {
.timer $+ $+(AutoTrans,$network,$nick) 1 1 noop
if (($gettok($hget(autotrans,$+($network,$chan)),3,32) == On) && (!$notrans($urlencode($1-)))) {
var %text $urlencode($exclude($1-))
tokenize 32 $hget(autotrans,$+($network,$chan))
AutoTrans $2 $iif($2 == .Msg,$chan,$iif($2 == Echo,$chan,$me)) $iif($4,$+(09[04,$nick,09]),0) $langpair($1),1,32)) %text 0
}
}
}
#AutoTrans End
On *:input:*: {
if ($left($strip($1),2) == \\) && (!$ctrlenter) {
haltdef
var %text $inputencode($2-)
AutoTrans msgNoLang $iif($chan,$chan,$active) $me $remove($1,\\) %text 1
}
}
on ^$*:Hotlink:/\[([a-zA-Z]{2})\]-\[([a-zA-Z]{2})\]/:#,?:{
if ($mouse.key == 16) && ($input(Respond through translator $+($regml(2),-,$regml(1)),yn)) {
if ($?="Please Input your text to be translated") {
AutoTrans msgNoLang $iif($chan,$chan,$nick) $me $+($regml(2),|,$regml(1)) $urlencode($!) 1
}
}
halt
}
alias EchoAutoTrans { AutoTrans echo -a $1- }
alias -l AutoTranslate {
var %sockname $+(AutoTrans,$network,$3,$ticks,$r(1,$ticks))
sockopen %sockname translate.google.com 80
sockmark %sockname $1-2 $+(/?langpair=,$4,&ie=UTF-8&oe=UTF-8&text=,$5) $3 $6 $4 $5
}
On *:sockopen:AutoTrans*: {
if (!$sockerr) {
sockwrite -nt $sockname GET $gettok($sock($sockname).mark,3,32) HTTP/1.1
sockwrite -n $sockname Host: translate.google.com
sockwrite -n $sockname Referer: $+(http://,$ip)
sockwrite -n $sockname $crlf
}
else { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
}
On *:sockread:AutoTrans*: {
if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
else {
var %AutoTrans | sockread %AutoTrans
if ($regex(text,%AutoTrans,/backgroundColor='#fff'">(.*?)<\/span>/gi)) {
var %counter 1, %text
while (%counter <= $regml(text,0)) {
%text = $+(%text,$chr(32),$replace($fixhtml($regml(text,%counter)),quot;,"))
inc %counter
}
var %country $+([,$replace($gettok($sock($sockname).mark,6,32),|,]-[),],)
if ($gettok($sock($sockname).mark,5,32)) { $gettok($sock($sockname).mark,1-2,32) %text | sockclose $sockname | return }
elseif ($matches(%text,$recode($mid($gettok($gettok($sock($sockname).mark,3,32),-2,38),3-)))) {
if ($nopunct(%text) != $nopunct($recode($gettok($sock($sockname).mark,7,32)))) {
$gettok($sock($sockname).mark,1-2,32) 06Translation07 %country $&
$iif($gettok($sock($sockname).mark,4,32),$gettok($sock($sockname).mark,4,32)) %text
}
sockclose $sockname
return
}
}
}
}
alias -l nopunct { return $regsubex($1-,/[\x2c!"#$%&'()*+\-./:;<=>?@[\\\]^_`{|}~]/g,$null) }
alias -l inputencode { return $regsubex($strip($1-),/([^a-z0-9])/ig,% $+ $base($asc(\t),10,16,2)) }
alias -l exclude { return $regsubex($strip($1-),/(http:\/\/[\S]{1,}|www\.[\S]{1,})/g,$null) }
alias -l urlencode { return $regsubex(urlencode,$1-,/([^a-z0-9])/ig,$urlpairs($asc(\t))) }
alias -l recode { return $regsubex($1-,/%([A-Fa-f0-9]{2})/g,$chr($base(\t,16,10))) }
alias -l fixhtml { return $replace($remove($regsubex($remove($regsubex($1-,/#([\d][\d][\d]?);/g,$chr(\t)),&,gt;,lt;),/\\u([A-Fa-f0-9]{4})/g,$chr($base(\t,16,10))),&,&),",") }
alias -l notrans { return $iif($hfind(notrans,$1),1,0) }
alias transexclude hadd -m notrans $urlencode($1-) 1
alias -l matches {
var %w $numtok($1,32),%x 1,%y 0,%z $numtok($2,32)
while (%x <= %z) {
if ($istok($1,$gettok($2,%x,32),32)) || ($notrans($gettok($2,%x,32))) { inc %y }
inc %x
}
return $iif($calc(%y / %w * 100) >= 80,0,1)
}
alias -l UrlPairs {
if ($1 < 255) { return $+(%,$base($1,10,16)) }
if ($1 >= 256) && ($1 < 2048) { return $+(%,$base($calc(192 + $div($1,64)),10,16),%,$base($calc(128 + $mod($1,64)),10,16)) }
if ($1 >= 2048) && ($1 < 65536) { return $+(%,$base($calc(224 + $div($1,4096)),10,16),%,$base($calc(128 + $mod($div($1,64),64)),10,16),%,$base($calc(128 + $mod($1,64)),10,16)) }
}
alias -l div { return $int($calc($1 / $2)) }
alias -l mod {
var %int $int($calc($1 / $2))
return $calc($1 - (%int * $2))
}
dialog Auto_Translator {
title "Auto Translator Setup"
size -1 -1 118 126
option dbu
text "Target Language:", 1, 4 9 45 8, right
text "Network:", 2, 4 25 45 8, right
text "Channel:", 3, 4 42 45 8, right
text "Output Type:", 4, 4 59 45 8, right
combo 5, 51 8 62 11, drop
combo 6, 51 24 62 11, drop
combo 7, 51 41 62 11, drop
combo 8, 51 58 62 11, drop
combo 9, 51 77 62 11, drop
text "Status:", 10, 4 78 45 8, right
button "Accept", 11, 78 110 34 12
button "Cancel", 12, 39 110 34 12, cancel
check "Show Nickname", 13, 63 97 50 10
}
dialog Auto_Translator_Exclude {
title "Auto Translator Exclusion Manager"
size -1 -1 144 144
option dbu
text "Exclusion:", 1, 4 7 27 8, right
text "Exclusions", 2, 1 21 142 8, center
edit "", 3, 33 6 72 10, autohs
list 4, 6 33 131 94, vsbar
button "Add", 5, 107 5 29 12
button "Delete", 6, 50 130 37 12
button "Close", 7, 97 130 37 12, cancel
}
On *:dialog:Auto_Translator_Exclude:Sclick:5,6: {
if ($did == 5) && ($did($dname,3).text) { hadd -m notrans $urlencode($v1) 1 | did -r $dname 3 }
if ($did == 6) && ($did($dname,4).seltext) { hdel notrans $urlencode($v1) }
did -r $dname 4
didtok $dname 4 32 $regsubex($str(.,$hget(notrans,0).item),/./g,$recode($hget(notrans,\n).item) $+ $chr(32))
}
On *:dialog:Auto_Translator_Exclude:init:*: {
didtok $dname 4 32 $regsubex($str(.,$hget(notrans,0).item),/./g,$recode($hget(notrans,\n).item) $+ $chr(32))
}
on *:dialog:Auto_Translator:Sclick:6,7,11: {
if ($did == 11) {
tokenize 32 $did($dname,6).seltext $did($dname,7).seltext $did($dname,5).seltext $did($dname,8).seltext $did($dname,9).seltext
hadd -m autotrans $+($1,$chr(35),$2) $3- $did($dname,13).state
dialog -x $dname
}
if ($did == 6) {
did -r $dname 7
didtok $dname 7 35 $chans($did($dname,6).seltext)
did -fc $dname 7 1
}
if ($hget(autotrans,$+($did($dname,6).seltext,$chr(35),$did($dname,7).seltext))) {
var %match $v1
did -c $dname 5 $didwm($dname,5,$gettok(%match,1,32))
did -c $dname 8 $didwm($dname,8,$gettok(%match,2,32))
did -c $dname 9 $didwm($dname,9,$gettok(%match,3,32))
did $iif($gettok(%match,4,32),-c,-u) $dname 13
}
}
on *:dialog:Auto_Translator:init:*: {
didtok $dname 5 44 AFRIKAANS,ALBANIAN,AMHARIC,ARABIC,ARMENIAN,AZERBAIJANI,BASQUE,BELARUSIAN,BENGALI,BIHARI,BULGARIAN,BURMESE,CATALAN,CHEROKEE
didtok $dname 5 44 CHINESE,CHINESE_SIMPLIFIED,CHINESE_TRADITIONAL,CROATIAN,CZECH,DANISH,DHIVEHI,DUTCH,ENGLISH,ESPERANTO,ESTONIAN,FILIPINO
didtok $dname 5 44 FINNISH,FRENCH,GALICIAN,GEORGIAN,GERMAN,GREEK,GUARANI,GUJARATI,HEBREW,HINDI,HUNGARIAN,ICELANDIC,INDONESIAN,INUKTITUT
didtok $dname 5 44 IRISH,ITALIAN,JAPANESE,KANNADA,KAZAKH,KHMER,KOREAN,KURDISH,KYRGYZ,LAOTHIAN,LATVIAN,LITHUANIAN,MACEDONIAN,MALAY,MALAYALAM
didtok $dname 5 44 MALTESE,MARATHI,MONGOLIAN,NEPALI,NORWEGIAN,ORIYA,PASHTO,PERSIAN,POLISH,PORTUGUESE,PUNJABI,ROMANIAN,RUSSIAN,SANSKRIT,SERBIAN
didtok $dname 5 44 SINDHI,SINHALESE,SLOVAK,SLOVENIAN,SPANISH,SWAHILI,SWEDISH,TAJIK,TAMIL,TAGALOG,TELUGU,THAI,TIBETAN,TURKISH,UKRAINIAN
didtok $dname 5 44 URDU,UZBEK,UIGHUR,VIETNAMESE,WELSH,YIDDISH
did -c $dname 5 $didwm($dname,5,ENGLISH)
var %nets $scon(0)
while (%nets) { scon %nets did -a $dname 6 $!network | dec %nets }
did -c $dname 6 $didwm($dname,6,$network)
didtok $dname 7 35 $chans($network)
did -c $dname 7 $didwm($dname,7,$mid($active,2-))
didtok $dname 8 44 Echo,.Msg,.Notice
did -c $dname 8 1
didtok $dname 9 44 On,Off
did -c $dname 9 2
if ($hget(autotrans,$+($network,$active))) {
var %match $v1
did -c $dname 5 $didwm($dname,5,$gettok(%match,1,32))
did -c $dname 8 $didwm($dname,8,$gettok(%match,2,32))
did -c $dname 9 $didwm($dname,9,$gettok(%match,3,32))
did $iif($gettok(%match,4,32),-c,-u) $dname 13
}
}
alias -l LangPair {
var %return $replace($1-,AFRIKAANS,af,ALBANIAN,sq,AMHARIC,am,ARABIC,ar,ARMENIAN,hy,AZERBAIJANI,az,BASQUE,eu,BELARUSIAN,be,BENGALI,bn,$&
BIHARI,bh,BULGARIAN,bg,BURMESE,my,CATALAN,ca,CHEROKEE,chr,CHINESE,zh,SIMPLIFIED,CHS,TRADITIONAL,CHT,_,-,$&
CROATIAN,hr,CZECH,cs,DANISH,da,DHIVEHI,dv,DUTCH,nl,ENGLISH,en,ESPERANTO,eo,ESTONIAN,et,FILIPINO,tl,FINNISH,fi,FRENCH,fr,$&
GALICIAN,gl,GEORGIAN,ka,GERMAN,de,GREEK,el,GUARANI,gn,GUJARATI,gu,HEBREW,iw,HINDI,hi,HUNGARIAN,hu,ICELANDIC,is,$&
INDONESIAN,id,INUKTITUT,iu,IRISH,ga,ITALIAN,it,JAPANESE,ja,KANNADA,kn,KAZAKH,kk,KHMER,km,KOREAN,ko,KURDISH,ku,KYRGYZ,ky)
return $replace(%return,LAOTHIAN,lo,LATVIAN,lv,LITHUANIAN,lt,MACEDONIAN,mk,MALAY,ms,MALAYALAM,ml,MALTESE,mt,MARATHI,mr,MONGOLIAN,mn,NEPALI,ne,$&
NORWEGIAN,no,ORIYA,or,PASHTO,ps,PERSIAN,fa,POLISH,pl,PORTUGUESE,pt,PUNJABI,pa,ROMANIAN,ro,RUSSIAN,ru,SANSKRIT,sa,$&
SERBIAN,sr,SINDHI,sd,SINHALESE,si,SLOVAK,sk,SLOVENIAN,sl,SPANISH,es,SWAHILI,sw,SWEDISH,sv,TAJIK,tg,TAMIL,ta,TAGALOG,tl,$&
TELUGU,te,THAI,th,TIBETAN,bo,TURKISH,tr,UKRAINIAN,uk,URDU,ur,UZBEK,uz,UIGHUR,ug,VIETNAMESE,vi,WELSH,cy,YIDDISH,yi)
}
alias -l chans { scon $netid($1) return $!regsubex($str(.,$chan(0)),/./g,$chan(\n)) }
alias -l netid {
var %netcount $scon(0)
while %netcount {
if ($scon(%netcount).network == $1) { return %netcount }
dec %netcount
}
}
On *:Start:{
hmake AutoTrans 5
hmake NoTrans 5
if ($exists(AutoTrans.hsh)) { hload AutoTrans AutoTrans.hsh }
if ($exists(NoTrans.hsh)) { hload NoTrans NoTrans.hsh }
}
On *:Disconnect:{
if ($hget(AutoTrans)) { hsave AutoTrans AutoTrans.hsh }
if ($hget(NoTrans)) { hsave NoTrans NoTrans.hsh }
}
On *:Exit:{
if ($hget(AutoTrans)) {
hsave AutoTrans AutoTrans.hsh
hfree AutoTrans
}
if ($hget(NoTrans)) {
hsave NoTrans NoTrans.hsh
hfree NoTrans
}
}
On *:Unload:{ hfree AutoTrans | hfree NoTrans }
;;;;;;;Start edit;;;;;;;;;
alias -l Autotrans {
var %sockname $+(bingtrans,$network,$2,$ticks)
sockopen %sockname api.microsofttranslator.com 80
var %apikey $hget(bingtrans,apikey)
if (%apikey) {
var %sourcelang $iif($gettok($4,2,124),$gettok($4,1,124),$null)
var %destlang $iif($gettok($4,2,124),$gettok($4,2,124),$gettok($4,1,124))
var %text $5
svar %sockname method $1-2
svar %sockname url $+(/v2/ajax.svc/TranslateArray2?appId=",%apikey,"&texts=[",%text,"]&from=",%sourcelang,"&to=",%destlang,")
svar %sockname text %text
svar %sockname destlang %destlang
svar %sockname nick $3
}
else GetBingGetApiKey $1-
}
On *:sockopen:bingtrans*: {
if (!$sockerr) {
sockwrite -nt $sockname GET $svar($sockname,url) HTTP/1.0
sockwrite -n $sockname Host: $sock($sockname).addr
sockwrite -n $sockname User-Agent: Opera 9.6
sockwrite -n $sockname Connection: close
sockwrite -n $sockname $crlf
}
else { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
}
On *:sockread:bingtrans*: {
if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
else {
sockread -fn &bingtrans
var %bingtrans $bvar(&bingtrans,1-).text
if ($regex(%bingtrans,/The\stoken\shas\sexpired/i)) {
echo -gat Translator Expired Token :: Fetching New Token...
GetBingGetapiKey $svar($sockname,method) $svar($sockname,destlang) $svar($sockname,text)
}
elseif ($regex(%BingTrans,/"From":"(.*?)"\x2c.*\x2c"TranslatedText":"(.*?)"\x2c"/i)) {
if ($regml(1) == $svar($sockname,destlang)) {
sockclose $sockname
return
}
else {
if ($urlencode($regml(1)) != $svar($sockname,text)) {
$svar($sockname,method) $+([,$lower($regml(1)),],-,[,$svar($sockname,destlang),]) $svar($sockname,nick) $fixhtml($regml(2))
}
}
}
}
}
alias BingGetapiKey { GetBingGetapiKey echo -a $1- }
alias GetBingGetapiKey {
var %sockname $+(BingGetapiKey,$network,$2,$ticks)
sockopen %sockname www.bing.com 80
svar %sockname method $1-2
svar %sockname sourcelang $iif($gettok($4,2,124),$gettok($4,1,124),$null)
svar %sockname destlang $iif($gettok($4,2,124),$gettok($4,2,124),$gettok($4,1,124))
svar %sockname text $5
svar %sockname nick $3
svar %sockname url /translator/dynamic/210541/js/LandingPage.js?loc=en&phenabled=&rttenabled=&v=210541
}
On *:sockopen:BingGetapiKey*: {
if (!$sockerr) {
sockwrite -nt $sockname GET $svar($sockname,url) HTTP/1.0
sockwrite -n $sockname Host: $sock($sockname).addr
sockwrite -n $sockname User-Agent: Opera 9.6
sockwrite -n $sockname $crlf
}
else { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
}
On *:sockread:BingGetapiKey*: {
if ($sockerr) { echo -st Socket Error $nopath($script) | sockclose $sockname | return }
else {
sockread -fn &BingGetapiKey
var %BingGetapiKey $bvar(&BingGetapiKey,1-).text
if ($regex(%BingGetapiKey,/appId:"([^"]*)"/i)) {
hadd -m bingtrans apikey $regml(1)
if ($regml(1)) {
AutoTrans $svar($sockname,method) $iif($svar($sockname,nick),$v1,0) $+($svar($sockname,sourcelang),|,$svar($sockname,destlang)) $svar($sockname,text)
}
sockclose $sockname
return
}
}
}
alias -l Svar {
var %sockname $1, %item $+($2,$1)
if ($isid) {
if ($regex(svar,$sock(%sockname).mark,/ $+ %item $+ \x01([^\x01]*)/i)) return $regml(svar,1)
}
elseif ($3) {
var %value $3-
if (!$regex(svar,$sock(%sockname).mark,/ $+ %item $+ \x01/i)) { sockmark %sockname $+($sock(%sockname).mark,$chr(1),%item,$chr(1),%value) }
else { sockmark %sockname $regsubex(svar,$sock(%sockname).mark,/( $+ %item $+ \x01[^\x01]*)/i,$+(%item,$chr(1),%value)) }
}
}
alias -l msgNoLang {
msg $1 $4-
}
it is happening again @FordLawnmower it was working fine, then about 30 mins ago this...
[16:03:40] Translator Expired Token :: Fetching New Token...
[16:03:42] Translator Expired Token :: Fetching New Token...
[16:03:43] Translator Expired Token :: Fetching New Token...
[16:04:05] Translator Expired Token :: Fetching New Token...
[16:05:25] Translator Expired Token :: Fetching New Token...
[16:14:03] Translator Expired Token :: Fetching New Token...
[16:14:06] Translator Expired Token :: Fetching New Token...
[16:16:06] Translator Expired Token :: Fetching New Token...
[16:24:05] Translator Expired Token :: Fetching New Token...
[16:27:03] Translator Expired Token :: Fetching New Token...
@FordLawnmower i am not sure what is going on with this script, it is/was working fine last night, then i wake up today and it is constantly getting a new code/token from the page
[12:25:43] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[12:25:47] Translator Expired Token :: Fetching New Token...
[12:25:47] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[12:27:14] Translator Expired Token :: Fetching New Token...
[12:27:14] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[12:28:01] Translator Expired Token :: Fetching New Token...
[12:28:01] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[12:37:35] Translator Expired Token :: Fetching New Token...
[12:37:35] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[12:37:35] Translator Expired Token :: Fetching New Token...
[12:37:35] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[12:38:01] Translator Expired Token :: Fetching New Token...
[12:38:01] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[12:38:49] Translator Expired Token :: Fetching New Token...
[12:38:49] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[12:39:33] Translator Expired Token :: Fetching New Token...
other than a reboot, is there any way to fix this?
yup, working great so far, it went from ....
[11:15:36] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[11:15:52] Translator Expired Token :: Fetching New Token...
[11:15:52] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[11:15:59] Translator Expired Token :: Fetching New Token...
[11:15:59] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[11:16:04] Translator Expired Token :: Fetching New Token...
[11:16:04] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[11:16:07] Translator Expired Token :: Fetching New Token...
[11:16:08] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
to this ....
[11:17:30] uniflash couldnt see which chip it but it said it was locked
[11:17:30] Translator Expired Token :: Fetching New Token...
[11:18:08] you would be capable of removing the chip and flash it with the true mobo bios
it didn't show the url, but that is a minor issue, it was like that anyway at some points
this probably means more to you than me @FordLawnmower it posted this link in my status tab http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled= which had this output on it http://pastebin.com/aVJ77NR6
ok lol i guess this script uses cookies/tokens, got that link again today, but this time it had a message before it
[10:33:38] Translator Expired Token :: Fetching New Token...
[10:33:38] http://www.bing.com/translator/dynamic/js/LandingPage.js?loc=en&phenabled=&rttenabled=
[11:52pm] <~Stewie> Bonjour
[11:52pm] <&ThunderBolt> [ru]-[en] Bonĵour
[11:52pm] <&ThunderBolt> [fr]-[en] Hello
[11:52pm] <~Stewie> Hol
[11:52pm] <&ThunderBolt> [hu]-[en] Where
[11:52pm] <~Stewie> Hola
[11:52pm] <&ThunderBolt> [es]-[en] Hello
[11:52pm] <~Stewie> Goed
[11:52pm] <&ThunderBolt> [nl]-[en] Good
[11:52pm] <~Stewie> Niet
[11:52pm] <&ThunderBolt> [nl]-[en] Not
[11:53pm] <~Stewie> Aparteid
[11:53pm] <&ThunderBolt> [ms]-[en] Apartheid In South Africa It mostly works, but I can't get it to work for Macedonian for some reason.
Thanks for the response @toclafane1 :)
This translator now uses bing , because google has made it so hard to use their services.
Bing's translator and language detection is fairly new, so hopefully it will get better.
I am open to writing a second engine, if there is a site with tolerance for lots of queries and language detection.
I just noticed this: http://msdn.microsoft.com/en-us/library/hh456380.aspx
Bing doesn't have support for Macedonian yet ;/
I havn't updated this script in a while and for some reason at first it wasn't showing the translations, checked the status tab etc, nothing, then i checked the settings and it was turned off on every chan, turned it back on and all was good, the only bad thing about it was all the translations that it didn't need to do lol but will fix all that in the morning, here is a lil snippet of the good/bad stuff :-
[00:10:38] [00:59:09] : &[MindForge] ¦ was du nicht sagst
[de]-[en] [Moot] [00:59:09 pm]: & [MindForge] ¦ what you don't say
[00:29:14] :o
[00:29:17] o:
[pt]-[en] [Marko50] the:
[00:29:19] <C[]> ö
[sv]-[en] [C[]] Island
[00:30:06] o_0
[pt]-[en] [Marko50] o0
[00:30:09] <C[]> 0o
[pt]-[en] [C[]] 0_o
@Bri1977 I've updated the code to fix most of these issues.
Issues such as this one:
[00:29:17] o:
[pt]-[en] [Marko50] the:
Can be fixed by adding an exclusion for o:
I loaded the script and edited the settings to return as echos, it works fine but I keep receiving those messages in my main window:
(Sep-Sun-1|9:39:33|pm) Socket Error Auto translator for me.ini
(Sep-Sun-1|9:43:36|pm) Socket Error Auto translator for me.ini
(Sep-Sun-1|9:44:06|pm) Socket Error Auto translator for me.ini
(Sep-Sun-1|9:44:20|pm) Socket Error Auto translator for me.ini
(Sep-Sun-1|9:44:26|pm) Socket Error Auto translator for me.ini
ok, i replaced the detectlanguage version with the test edit version and neither seem to be working fully, every now and again i will get a translation come up, but a lot of the time i get absolutely nothing, i really hope you can sort something out, my guess would be some change on googles end, i will have to give the debug version a test run and see what happens
@FordLawnmower im having issues with the detectlanguage version of the script, the other edit version you did works fine tho, i was using 7 different keys with the detectlanguage, which seemed to be just enough to keep the script ticking over, ive only noticed it not working today, but according to the usage stats, its not been getting hits for 2 days, i tried resetting my keys, but its still not working, so i might have to switch to the other edit, but i prefer the detectlanguage version, it gives better results
Working ok for me, couple of issues with it going off when it shouldn't. I'm an admin for some pickup game channels for Unreal Tournament, it is triggered by the pickup bot listing the player names, and so far "haha" goes off every time.
I'm no coder or scripter, but to me it seems like the easiest way to fix a lot of these is to not return the text when it doesn't actually translate at least 2-3 words out of the whole line. It's just returning the exact text it "translated" so it should detect that the words were unchanged and not send it as a translation.
A way to ignore certain nicknames would help too so I could ignore the pickup bots.
07:11:23 <@L> [» CTF-ProMod «][» [4/10] «][» 1) Kappa 2) z0rf 3) Slayer 4) mintek «]
Translation []-[] [»CTF ProMod«] [»[4/10]«] [»1) Coat 2) z0rf 3) Slayer 4) MINTEK«]
07:20:08 <+NecroNinja> no nhl
Translation []-[] no nhl
07:11:59 <+mintek> haha
Translation []-[] haha
I've installed the latest version of script (http://pastebin.com/JDpYVQQN) But it's still not working for me. It just don't translate any text... I'm using mIRC 7.22
Is it a script issue, or I do something wrong?
Most of that looks like the responses are identical to the original.
This edit will suppress them: http://pastebin.com/JDpYVQQN
the latest version seems too sensitive...
[11:03:35] <Mac|away> hi Bri
[11:03:37] Translation [pl]-[en] [Mac|away] Hi Bri
[11:03:44] hi
[11:03:46] Translation [pl]-[en] [Bri_Away] hi
[10:36:05] ISP: Paul Bunyan Telephone.
[10:36:06] Translation [id]-[en] [Phosphorus] ISP: Paul Bunyan Telephone.
[10:36:06] Domain: paulbunyan.net
[10:36:08] ZIP Code: 56601
[10:36:09] Translation [it]-[en] [Phosphorus] ZIP Code: 56601
[10:18:10] lol
[10:18:11] Translation [nl]-[en] [Macros] lol
[10:17:02] hi mac
[10:17:03] Translation [pl]-[en] [keops] hi mac
[10:17:19] ok hun ?
[10:17:20] Translation [pl]-[en] [Macros] ok hun?
Yea, the 6.21 is a problem because it has a very small variable limit. I would use at least 6.35 for testing any current scripts.
Anyway, I edited it to use a smaller variable size: http://pastebin.com/JDpYVQQN
Hmm, that's pretty odd, but I did just edit the pastebin. Try it now http://pastebin.com/JDpYVQQN
I tried 2 translations and got this in status...
[02:52:07am] Ping? Pong!
-#-#-
Same here