X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=data%2Frbot%2Fplugins%2Fspell.rb;h=7d58b79ca8ad2945f34eebe77c01f3a2364df008;hb=4440a6d38f74c169e5b3e0e83b0fa44bea820a33;hp=199af3c64c1c98313a4ebaec830c7274685cdf10;hpb=a8e5661b860bedb20475933d46a0cf3693faf112;p=user%2Fhenk%2Fcode%2Fruby%2Frbot.git diff --git a/data/rbot/plugins/spell.rb b/data/rbot/plugins/spell.rb index 199af3c6..7d58b79c 100644 --- a/data/rbot/plugins/spell.rb +++ b/data/rbot/plugins/spell.rb @@ -1,10 +1,10 @@ class SpellPlugin < Plugin def help(plugin, topic="") - "spell => check spelling of , suggest alternatives" + _("spell => check spelling of , suggest alternatives") end def privmsg(m) unless(m.params && m.params =~ /^\S+$/) - m.reply "incorrect usage: " + help(m.plugin) + m.reply _("incorrect usage: ") + help(m.plugin) return end p = IO.popen("ispell -a -S", "w+") @@ -13,7 +13,7 @@ class SpellPlugin < Plugin p.close_write p.each_line {|l| if(l =~ /^\*/) - m.reply "#{m.params} may be spelled correctly" + m.reply(_("%{word} may be spelled correctly") % {:word => m.params}) p.close return elsif(l =~ /^\s*&.*: (.*)$/) @@ -21,18 +21,18 @@ class SpellPlugin < Plugin p.close return elsif(l =~ /^\s*\+ (.*)$/) - m.reply "#{m.params} is presumably derived from " + $1.downcase + m.reply((_("%{word} is presumably derived from ") % {:word => m.params}) + $1.downcase) p.close return elsif(l =~ /^\s*#/) - m.reply "#{m.params}: no suggestions" + m.reply(_("%{word}: no suggestions") % {:word => m.params}) p.close return end } p.close else - m.reply "couldn't exec ispell :(" + m.reply _("couldn't exec ispell :(") return end end