summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/rbot/load-gettext.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/rbot/load-gettext.rb b/lib/rbot/load-gettext.rb
index c8448bc6..4c18892d 100644
--- a/lib/rbot/load-gettext.rb
+++ b/lib/rbot/load-gettext.rb
@@ -29,10 +29,13 @@ begin
end
end
- debug 'using ruby-gettext'
- gettext_info = StringIO.new
- current_textdomain_info(:out=>gettext_info)
- gettext_info.string.each_line {|l| debug l}
+ begin
+ gettext_info = StringIO.new
+ current_textdomain_info(:out=>gettext_info) # fails sometimes
+ debug 'using ruby-gettext'
+ gettext_info.string.each_line {|l| debug l}
+ rescue Exception
+ end
rescue LoadError
warn 'ruby-gettext package not available; translations are disabled'