From 1f00ab010a6aaaca9585d630b5dd009c2cf9ec93 Mon Sep 17 00:00:00 2001 From: franz Date: Mon, 29 Jun 2009 08:26:46 +0200 Subject: 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. --- lib/rbot/load-gettext.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/rbot') 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} -- cgit v1.2.3