| View previous topic :: View next topic |
| Author |
Message |
Torrevado Op
Joined: 02 Aug 2006 Posts: 101
|
Posted: Tue Apr 29, 2008 7:11 pm Post subject: translating "idletime" |
|
|
I'd like to translate "$idletime", would it be possible?
| Code: | proc whois:idle { from keyword arguments } {
set channel $::whoischannel
set target $::whoistarget
set idletime [lindex [split $arguments] 2]
set signon [lindex [split $arguments] 3]
whois:putmsg $channel "$target idle: [duration $idletime]. Signed on [ctime $signon]"
unbind RAW - 317 whois:idle
}
|
|
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Tue Apr 29, 2008 7:18 pm Post subject: Re: translating "unixtime" |
|
|
| Code: | whois:putmsg $channel "$target idle: [string map {"years" "tyears"
"weeks" "tweeks" "days" "tdays" "hours" "thours" "minutes" "tminutes" "seconds" "tseconds"} [duration $idletime]]. Sined on [ctime $signon]" |
Pretend the above is all on one line, the string map delineated by spaces. In the string map, change each reference starting with T to your translated word for each. String map can also be used for translating the signed on time. |
|
| Back to top |
|
 |
Torrevado Op
Joined: 02 Aug 2006 Posts: 101
|
Posted: Tue Apr 29, 2008 7:41 pm Post subject: translating "unixtime" |
|
|
Thanks speechles  |
|
| Back to top |
|
 |
|