]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
gettextize some more strings
authorGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 26 Aug 2007 01:03:59 +0000 (01:03 +0000)
committerGiuseppe Bilotta <giuseppe.bilotta@gmail.com>
Sun, 26 Aug 2007 01:03:59 +0000 (01:03 +0000)
lib/rbot/ircbot.rb

index c8b0d46f0ee4aa7ea4ac15317e66d54171f428d9..72068a8e8a66850acbc01dd63644a7e1eb110047 100644 (file)
@@ -1146,12 +1146,12 @@ class Bot
     topic = nil if topic == ""
     case topic
     when nil
-      helpstr = "help topics: "
+      helpstr = _("help topics: ")
       helpstr += @plugins.helptopics
-      helpstr += " (help <topic> for more info)"
+      helpstr += _(" (help <topic> for more info)")
     else
       unless(helpstr = @plugins.help(topic))
-        helpstr = "no help for topic #{topic}"
+        helpstr = _("no help for topic %{topic}") % { :topic => topic }
       end
     end
     return helpstr
@@ -1162,7 +1162,11 @@ class Bot
     secs_up = Time.new - @startup_time
     uptime = Utils.secs_to_string secs_up
     # return "Uptime #{uptime}, #{@plugins.length} plugins active, #{@registry.length} items stored in registry, #{@socket.lines_sent} lines sent, #{@socket.lines_received} received."
-    return "Uptime #{uptime}, #{@plugins.length} plugins active, #{@socket.lines_sent} lines sent, #{@socket.lines_received} received."
+    return (_("Uptime %{up}, %{plug} plugins active, %{sent} lines sent, %{recv} received.") %
+             {
+               :up => uptime, :plug => @plugins.length,
+               :sent => @socket.lines_sent, :recv => @socket.lines_received
+             })
   end
 
   # We want to respond to a hung server in a timely manner. If nothing was received