* 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.master
parent
cd6234f866
commit
04cde27a0e
11
IkiWiki.pm
11
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);
|
||||
}
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
ikiwiki (1.41) UNRELEASED; urgency=low
|
||||
|
||||
* 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.
|
||||
|
||||
-- Joey Hess <joeyh@debian.org> Mon, 15 Jan 2007 22:19:02 -0500
|
||||
|
||||
ikiwiki (1.40) unstable; urgency=low
|
||||
|
||||
* Fix missing categories in rss/atom feeds.
|
||||
|
|
|
@ -11,7 +11,7 @@ Package: ikiwiki
|
|||
Architecture: all
|
||||
Depends: ${perl:Depends}, libxml-simple-perl, markdown, libtimedate-perl, libhtml-template-perl, libhtml-scrubber-perl, libcgi-formbuilder-perl (>= 3.02.02), libtime-duration-perl, libcgi-session-perl (>= 4.14-1), libmail-sendmail-perl, gcc | c-compiler, libc6-dev | libc-dev, libhtml-parser-perl, liburi-perl
|
||||
Recommends: subversion | git-core | tla | mercurial, hyperestraier
|
||||
Suggests: viewcvs, librpc-xml-perl, libtext-wikiformat-perl, python-docutils, polygen, tidy, libxml-feed-perl, libmailtools-perl, perlmagick, libfile-mimeinfo-perl, libnet-openid-consumer-perl, libcrypt-ssleay-perl, liblocale-gettext-perl
|
||||
Suggests: viewcvs, librpc-xml-perl, libtext-wikiformat-perl, python-docutils, polygen, tidy, libxml-feed-perl, libmailtools-perl, perlmagick, libfile-mimeinfo-perl, libnet-openid-consumer-perl, libcrypt-ssleay-perl, liblocale-gettext-perl (>= 1.04)
|
||||
Description: a wiki compiler
|
||||
ikiwiki converts a directory full of wiki pages into html pages suitable
|
||||
for publishing on a website. Unlike many wikis, ikiwiki does not have its
|
||||
|
|
|
@ -25,4 +25,14 @@ new version of Locale::gettext fixed it. --Ethan
|
|||
> way to use the non-OO version while still getting proper UTF-8 strings,
|
||||
> which is why I began to use the OO version in the first place..
|
||||
>
|
||||
> Looks like the OO interface was added in version 1.04 --[[Joey]]
|
||||
> Looks like the OO interface was added in version 1.04
|
||||
>
|
||||
> And there's no good way to get utf-8 strings w/o the OO interface, that I
|
||||
> can see.
|
||||
>
|
||||
> So, what I've done is documented that it needs Locale::gettext 1.04, and
|
||||
> made it not crash if run with an older version, though it also won't
|
||||
> gettext anything in that case. Might be a bit confusing if someone misses
|
||||
> the docs about it needing the newer version and wonders why gettext
|
||||
> doesn't work, but I consider it good enough to mark this [[bugs/done].
|
||||
> --[[Joey]]
|
||||
|
|
|
@ -11,7 +11,8 @@ installed, and also uses the following perl modules if available:
|
|||
[[cpan CGI::Session]], [[cpan CGI::FormBuilder]] (version 3.02.02 or newer),
|
||||
[[cpan Mail::Sendmail]], [[cpan Time::Duration]], [[cpan TimeDate]],
|
||||
[[cpan HTML::Scrubber]], [[cpan RPC::XML]], [[cpan XML::Simple]],
|
||||
[[cpan XML::Feed]], [[cpan File::MimeInfo]], [[cpan Locale::gettext]].
|
||||
[[cpan XML::Feed]], [[cpan File::MimeInfo]], [[cpan Locale::gettext]]
|
||||
(version 1.04 or newer).
|
||||
|
||||
The [[tla]] support also needs the [[cpan MailTools]] perl module.
|
||||
|
||||
|
|
Loading…
Reference in New Issue