summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorRaine Virta <rane@kapsi.fi>2009-03-02 04:04:35 +0200
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>2009-03-03 20:52:11 +0100
commit74c14cc87ed58fd88acd4898372e017ebe1bbaa3 (patch)
tree8564b5aaec2b6ac089d31a53a2c06d10481c52f3 /data
parent52c9564c96dbf95e5c883e41940527f2394ba55a (diff)
hangman: enable gettext on some replies and help
Diffstat (limited to 'data')
-rw-r--r--data/rbot/plugins/games/hangman.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/data/rbot/plugins/games/hangman.rb b/data/rbot/plugins/games/hangman.rb
index dbabb72c..c5d7656f 100644
--- a/data/rbot/plugins/games/hangman.rb
+++ b/data/rbot/plugins/games/hangman.rb
@@ -242,15 +242,15 @@ class HangmanPlugin < Plugin
def help(plugin, topic="")
case topic
when ""
- return "hangman game plugin - topics: play, stop"
+ return _("hangman game plugin - topics: play, stop")
when "play"
- return "hangman play on <channel> with word <word> => use in private chat with the bot to start a game with custom word\n"+
- "hangman play random [with [max|min] length [<|>|== <length>]] => hangman with a random word from #{RandomWord::SITE}\n"+
- "hangman play with wordlist <wordlist> => hangman with random word from <wordlist>"
+ return [_("hangman play on <channel> with word <word> => use in private chat with the bot to start a game with custom word\n"),
+ _("hangman play random [with [max|min] length [<|>|== <length>]] => hangman with a random word from %{site}\n"),
+ _("hangman play with wordlist <wordlist> => hangman with random word from <wordlist>")].join
when "stop"
- return "hangman stop => quits the current game"
+ return _("hangman stop => quits the current game")
when "define"
- return "define => seeks a definition for the previous answer using google"
+ return _("define => seeks a definition for the previous answer using google")
end
end
@@ -261,7 +261,7 @@ class HangmanPlugin < Plugin
begin
wordlist = Wordlist.get(params[:wordlist].join("/"), :spaces => true)
rescue
- raise "no such wordlist"
+ raise _("no such wordlist")
end
wordlist[rand(wordlist.size)]
@@ -282,7 +282,7 @@ class HangmanPlugin < Plugin
unless words.empty?
words.first
else
- m.reply "suitable word not found in the set"
+ m.reply _("suitable word not found in the set")
nil
end
else
@@ -371,7 +371,7 @@ class HangmanPlugin < Plugin
_("you've killed the poor guy :(")
end
- again = _("go #{Bold}again#{Bold}?")
+ again = _("go %{b}again%{b}?") % { :b => Bold }
scores = []
game.scores.each do |user, score|