diff options
author | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-08-26 00:14:49 +0000 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2007-08-26 00:14:49 +0000 |
commit | e6d03d684ea66a6157c159cf1c233bef27e49407 (patch) | |
tree | d11c38fca7c1de77356454afde6fad0e0c6e3034 /lib/rbot/load-gettext.rb | |
parent | 5b58c076243085bd8d6166e23a17f68518bf6dea (diff) |
Cleaner gettext debug information reporting
Diffstat (limited to 'lib/rbot/load-gettext.rb')
-rw-r--r-- | lib/rbot/load-gettext.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/rbot/load-gettext.rb b/lib/rbot/load-gettext.rb index 1d7cb88b..9798fd60 100644 --- a/lib/rbot/load-gettext.rb +++ b/lib/rbot/load-gettext.rb @@ -1,4 +1,9 @@ -# load gettext module and provide fallback in case of failure +#-- vim:sw=2:et +#++ +# +# :title: GetText interface for rbot +# +# Load gettext module and provide fallback in case of failure class GetTextVersionError < Exception end @@ -34,11 +39,12 @@ begin begin require 'stringio' gettext_info = StringIO.new - current_textdomain_info(:out=>gettext_info) # fails sometimes + current_textdomain_info(:out => gettext_info) # fails sometimes 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." + ensure + gettext_info.string.each_line { |l| debug l} end rescue LoadError, GetTextVersionError |