summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kim <dmitry point kim at gmail point com>2007-07-12 09:49:50 +0000
committerDmitry Kim <dmitry point kim at gmail point com>2007-07-12 09:49:50 +0000
commit7954bec2bbf4ba75c05412a98a9265a33d891b13 (patch)
treeb073e983b5e5f9aa75d0fa20522372878f62e751
parentab7fc621d6b073d3cb5be4a7db3d4f7caf14b18b (diff)
* (gettext) work around failing current_textdomain_info()
-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'