diff options
author | Yaohan Chen <yaohan.chen@gmail.com> | 2007-07-14 04:05:28 +0000 |
---|---|---|
committer | Yaohan Chen <yaohan.chen@gmail.com> | 2007-07-14 04:05:28 +0000 |
commit | fe554ac10e0a455141cbf51ea17861ac4bcc5720 (patch) | |
tree | ee5d161afd103e745ec123cfc87f94e01be3f9ce /lib | |
parent | 0873ce4d2f31f240d05ab8c16d31150aff289c82 (diff) |
added a warning message if retrieving gettext info fails
added Nn_ dummy replacement
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rbot/load-gettext.rb | 5 |
1 files changed, 5 insertions, 0 deletions
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 |