]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
added a warning message if retrieving gettext info fails
authorYaohan Chen <yaohan.chen@gmail.com>
Sat, 14 Jul 2007 04:05:28 +0000 (04:05 +0000)
committerYaohan Chen <yaohan.chen@gmail.com>
Sat, 14 Jul 2007 04:05:28 +0000 (04:05 +0000)
added Nn_ dummy replacement

lib/rbot/load-gettext.rb

index 165a81c581bbba5d4fe9fa26f7808deb3fc1b32a..c7c45cf53236ca3eb1daf64e74de24b6fb081a90 100644 (file)
@@ -26,6 +26,7 @@ begin
     debug 'using ruby-gettext'
     gettext_info.string.each_line {|l| debug l}
   rescue Exception
+    warn "ruby-gettext was loaded but appears to be non-functional. maybe an mo file doesn't exist for your locale."
   end
 
 rescue LoadError
@@ -44,6 +45,10 @@ rescue LoadError
     n > 1 ? s_plural : s_single
   end
 
+  def Nn_(s_single, s_plural)
+    n_(s_single, s_plural)
+  end
+
   def s_(*args)
     args[0]
   end