diff options
author | Yaohan Chen <yaohan.chen@gmail.com> | 2008-07-11 20:43:18 -0400 |
---|---|---|
committer | Yaohan Chen <yaohan.chen@gmail.com> | 2008-07-11 20:43:18 -0400 |
commit | c9bd2bc721a22827710d1a2060ac0c0492cf0b67 (patch) | |
tree | aa20470ec413e0b18e35d2020729cde558310a90 | |
parent | 4311b55915199875a172d26a42ae3c1e4e573ff0 (diff) |
do not crash when GetText.cached= is not defined
-rw-r--r-- | lib/rbot/load-gettext.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rbot/load-gettext.rb b/lib/rbot/load-gettext.rb index f2574af0..3eb7c30f 100644 --- a/lib/rbot/load-gettext.rb +++ b/lib/rbot/load-gettext.rb @@ -24,7 +24,11 @@ begin add_default_locale_path(File.join(Irc::Bot::Config.datadir, "../locale/%{locale}/LC_MESSAGES/%{name}.mo")) - GetText.cached = false + if GetText.respond_to? :cached= + GetText.cached = false + else + warning 'This version of ruby-gettext does not support non-cached mode; mo files are not reloaded when setting language' + end bindtextdomain 'rbot' module GetText |