]> git.netwichtig.de Git - user/henk/code/ruby/rbot.git/commitdiff
* display installed version when gettext version is unsupported
authorYaohan Chen <yaohan.chen@gmail.com>
Mon, 23 Jul 2007 19:02:21 +0000 (19:02 +0000)
committerYaohan Chen <yaohan.chen@gmail.com>
Mon, 23 Jul 2007 19:02:21 +0000 (19:02 +0000)
lib/rbot/load-gettext.rb

index 8a74a1d1d31af52db4560503e772f4b4ab69593e..1d7cb88b3b6f505175a8986dd7b4c34e75dc2ae1 100644 (file)
@@ -9,7 +9,9 @@ begin
 
   gettext_version = GetText::VERSION.split('.').map {|n| n.to_i}
   include Comparable # required for Array#between?
-  raise GetTextVersionError unless gettext_version.between? [1, 8, 0], [1, 10, 0]
+  unless gettext_version.between? [1, 8, 0], [1, 10, 0]
+    raise GetTextVersionError, "Unsupported ruby-gettext version installed: #{gettext_version.join '.'}; supported versions are 1.8.0-1.10.0"
+  end
 
   require 'gettext'
 
@@ -40,7 +42,7 @@ begin
   end
 
 rescue LoadError, GetTextVersionError
-  warn 'ruby-gettext package not available, or its version is unsupported; translations are disabled'
+  warn "failed to load ruby-gettext package: #{$!}; translations are disabled"
 
   # dummy functions that return msg_id without translation
   def _(s)