From fe554ac10e0a455141cbf51ea17861ac4bcc5720 Mon Sep 17 00:00:00 2001 From: Yaohan Chen Date: Sat, 14 Jul 2007 04:05:28 +0000 Subject: added a warning message if retrieving gettext info fails added Nn_ dummy replacement --- lib/rbot/load-gettext.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib') diff --git a/lib/rbot/load-gettext.rb b/lib/rbot/load-gettext.rb index 165a81c5..c7c45cf5 100644 --- a/lib/rbot/load-gettext.rb +++ b/lib/rbot/load-gettext.rb @@ -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 -- cgit v1.2.3