From 7954bec2bbf4ba75c05412a98a9265a33d891b13 Mon Sep 17 00:00:00 2001 From: Dmitry Kim Date: Thu, 12 Jul 2007 09:49:50 +0000 Subject: * (gettext) work around failing current_textdomain_info() --- lib/rbot/load-gettext.rb | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'lib/rbot') 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' -- cgit v1.2.3