From b640b14d732d457fec50b89738206a911ec9de7a Mon Sep 17 00:00:00 2001 From: Dmitry Kim Date: Fri, 10 Aug 2007 12:52:10 +0000 Subject: * (plugins/translator) fixed a diagnostic message --- data/rbot/plugins/translator.rb | 5 +++-- 1 file 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') -- cgit v1.2.3