aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-08-21 21:19:53 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-08-21 21:19:53 +0000
commit7946c67d1f7538a2b131c7b79205527f86e9002c (patch)
tree79eb945c1d53f64a26fde8dcf741c2d2c9f3058b
parent7c032d14659cc57cecb529e9d22177844dd71dc0 (diff)
downloadikiwiki-7946c67d1f7538a2b131c7b79205527f86e9002c.tar
ikiwiki-7946c67d1f7538a2b131c7b79205527f86e9002c.tar.gz
* Avoid ugly gettext messages if LANG is empty. Closes: #439035
-rw-r--r--IkiWiki.pm4
-rwxr-xr-xMakefile.PL2
-rw-r--r--debian/changelog3
3 files changed, 6 insertions, 3 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};
diff --git a/Makefile.PL b/Makefile.PL
index 0e306ac08..aba4239d8 100755
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -31,7 +31,7 @@ ikiwiki.out: ikiwiki.in
chmod +x ikiwiki.out
extra_build: ikiwiki.out
- LANG=C perl -I. $(extramodules) $(tflag) ikiwiki.out doc html --templatedir=templates \
+ LANG= perl -I. $(extramodules) $(tflag) ikiwiki.out doc html --templatedir=templates \
--underlaydir=basewiki --nousedirs\
--wikiname="ikiwiki" --verbose \
--exclude=/discussion --no-discussion --userdir=users \
diff --git a/debian/changelog b/debian/changelog
index 5bcf097db..11f1c40c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -45,8 +45,9 @@ ikiwiki (2.6) UNRELEASED; urgency=low
* Add color parameter to postsparkline. Closes: #438900
* Add proper Homepage field to Debian package (needs uber-new dpkg).
* Add monotone support, contributed by William Uther.
+ * Avoid ugly gettext messages if LANG is empty. Closes: #439035
- -- Joey Hess <joeyh@debian.org> Mon, 20 Aug 2007 23:09:11 -0400
+ -- Joey Hess <joeyh@debian.org> Tue, 21 Aug 2007 17:18:50 -0400
ikiwiki (2.5) unstable; urgency=low