summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorDmitry Kim <dmitry point kim at gmail point com>2007-08-10 12:52:10 +0000
committerDmitry Kim <dmitry point kim at gmail point com>2007-08-10 12:52:10 +0000
commitb640b14d732d457fec50b89738206a911ec9de7a (patch)
tree5bf03fd3a71df5447d11f168a6914d14e86ae697 /data
parentdfcf0ea694815cecd518133c38562d09ae9472c5 (diff)
* (plugins/translator) fixed a diagnostic message
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/translator.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/data/rbot/plugins/translator.rb b/data/rbot/plugins/translator.rb
index 958a2d23..76392ccc 100644
--- a/data/rbot/plugins/translator.rb
+++ b/data/rbot/plugins/translator.rb
@@ -254,7 +254,8 @@ class TranslatorPlugin < Plugin
def cmd_translate(m, params)
# get the first word of the command
- translator = @translators[m.message[/\A(\w+)\s/, 1]]
+ tname = m.message[/\A(\w+)\s/, 1]
+ translator = @translators[tname]
from, to, phrase = params[:from], params[:to], params[:phrase].to_s
if translator
begin
@@ -269,7 +270,7 @@ class TranslatorPlugin < Plugin
end
else
m.reply _("%{translator} doesn't support translating from %{source} to %{target}") %
- {:source => from, :target => to}
+ {:translator => tname, :source => from, :target => to}
end
rescue Timeout::Error
m.reply _('The translator timed out')