diff options
author | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-08-21 21:19:53 +0000 |
---|---|---|
committer | joey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071> | 2007-08-21 21:19:53 +0000 |
commit | 7946c67d1f7538a2b131c7b79205527f86e9002c (patch) | |
tree | 79eb945c1d53f64a26fde8dcf741c2d2c9f3058b /IkiWiki.pm | |
parent | 7c032d14659cc57cecb529e9d22177844dd71dc0 (diff) |
* Avoid ugly gettext messages if LANG is empty. Closes: #439035
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r-- | IkiWiki.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm index 848f1dda8..a89d9c252 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -1017,7 +1017,9 @@ sub file_pruned ($$) { #{{{ sub gettext { #{{{ # Only use gettext in the rare cases it's needed. - if (exists $ENV{LANG} || exists $ENV{LC_ALL} || exists $ENV{LC_MESSAGES}) { + if ((exists $ENV{LANG} && length $ENV{LANG}) || + (exists $ENV{LC_ALL} && length $ENV{LC_ALL}) || + (exists $ENV{LC_MESSAGES} && length $ENV{LC_MESSAGES})) { if (! $gettext_obj) { $gettext_obj=eval q{ use Locale::gettext q{textdomain}; |