From 04cde27a0e070af714826cf89071d27286d1d7fe Mon Sep 17 00:00:00 2001 From: joey Date: Tue, 16 Jan 2007 03:37:39 +0000 Subject: * Gettext 1.04 or up is needed for the OO interface that ikiwiki needs, if an older version is installed, just don't gettext strings, instead of crashing. --- IkiWiki.pm | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'IkiWiki.pm') diff --git a/IkiWiki.pm b/IkiWiki.pm index 8a3c81755..42d607b0d 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -838,8 +838,15 @@ 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 (! $gettext_obj) { - eval q{use Locale::gettext ''}; - $gettext_obj=Locale::gettext->domain('ikiwiki'); + $gettext_obj=eval q{ + use Locale::gettext q{textdomain}; + Locale::gettext->domain('ikiwiki') + }; + if ($@) { + print STDERR "$@"; + $gettext_obj=undef; + return shift; + } } return $gettext_obj->get(shift); } -- cgit v1.2.3 ue='switch'/> Unnamed repository; edit this file 'description' to name the repository.Jonas Smedegaard
summaryrefslogtreecommitdiff
path: root/tags/80/33/20120602170032.GF1856@yuggoth.org
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200
committerJonas Smedegaard <dr@jones.dk>2023-06-27 09:35:08 +0200
commitfd54908da2b05c526dd3bee9b6dcd093214a220d (patch)
treec69c845069c99d1d01044f6fafda7c08433329c6 /tags/80/33/20120602170032.GF1856@yuggoth.org
parentba46132213560cf3335d53560d519c0ec0190da2 (diff)
Diffstat (limited to 'tags/80/33/20120602170032.GF1856@yuggoth.org')
-rw-r--r--tags/80/33/20120602170032.GF1856@yuggoth.org/debian0
1 files changed, 0 insertions, 0 deletions