X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/7dd6385fdb181aabc8ec695c1e4d248ac834545b..086349813284211ede63430b03f8278143b2ab4f:/IkiWiki.pm 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};