diff options
author | Yaohan Chen <yaohan.chen@gmail.com> | 2007-07-23 19:02:21 +0000 |
---|---|---|
committer | Yaohan Chen <yaohan.chen@gmail.com> | 2007-07-23 19:02:21 +0000 |
commit | d2d414a0fec91dfc2d79705b6e974f8830561dc5 (patch) | |
tree | 08fd688fe0b5009604bf516abe1c5319f4f01a82 | |
parent | fe9b3206a9d1579e767347b032958346a3e9bb47 (diff) |
* display installed version when gettext version is unsupported
-rw-r--r-- | lib/rbot/load-gettext.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/rbot/load-gettext.rb b/lib/rbot/load-gettext.rb index 8a74a1d1..1d7cb88b 100644 --- a/lib/rbot/load-gettext.rb +++ b/lib/rbot/load-gettext.rb @@ -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) |