diff options
author | franz <Franz.Netykafka@runbox.com> | 2009-06-29 08:26:46 +0200 |
---|---|---|
committer | Giuseppe Bilotta <giuseppe.bilotta@gmail.com> | 2009-08-26 23:31:38 +0200 |
commit | 1f00ab010a6aaaca9585d630b5dd009c2cf9ec93 (patch) | |
tree | 8b2b864aac63995516671bda43308f84cfba131d /lib/rbot/load-gettext.rb | |
parent | b4342233a61b23035f61f0a796a7aa196744b99d (diff) |
gettext: fix empty LANGUAGE env var
When LANGUAGE env var is set to empty value, it breaks
gettext in ruby, so we unset it if it's empty.
Diffstat (limited to 'lib/rbot/load-gettext.rb')
-rw-r--r-- | lib/rbot/load-gettext.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rbot/load-gettext.rb b/lib/rbot/load-gettext.rb index 2c65f197..b37369c1 100644 --- a/lib/rbot/load-gettext.rb +++ b/lib/rbot/load-gettext.rb @@ -10,6 +10,11 @@ end # try to load gettext, or provide fake getttext functions begin +# workaround for gettext not checking empty LANGUAGE +if ENV["LANGUAGE"] and ENV["LANGUAGE"].empty? + ENV.delete "LANGUAGE" +end + require 'gettext/version' gettext_version = GetText::VERSION.split('.').map {|n| n.to_i} |