aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-01-16 03:37:39 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-01-16 03:37:39 +0000
commit04cde27a0e070af714826cf89071d27286d1d7fe (patch)
tree731ca0bda4de070910b1d411be30def865e05ac0
parentcd6234f8660c651199d636595308aec0cc221f2e (diff)
downloadikiwiki-04cde27a0e070af714826cf89071d27286d1d7fe.tar
ikiwiki-04cde27a0e070af714826cf89071d27286d1d7fe.tar.gz
* 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.
-rw-r--r--IkiWiki.pm11
-rw-r--r--debian/changelog8
-rw-r--r--debian/control2
-rw-r--r--doc/bugs/Missing_constant_domain_at_IkiWiki.pm_line_842.mdwn12
-rw-r--r--doc/install.mdwn3
5 files changed, 31 insertions, 5 deletions
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);
}
diff --git a/debian/changelog b/debian/changelog
index e73f12f0d..7a6500643 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -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.
diff --git a/debian/control b/debian/control
index d29a03846..a5918b043 100644
--- a/debian/control
+++ b/debian/control
@@ -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
diff --git a/doc/bugs/Missing_constant_domain_at_IkiWiki.pm_line_842.mdwn b/doc/bugs/Missing_constant_domain_at_IkiWiki.pm_line_842.mdwn
index d4fa9c241..629006139 100644
--- a/doc/bugs/Missing_constant_domain_at_IkiWiki.pm_line_842.mdwn
+++ b/doc/bugs/Missing_constant_domain_at_IkiWiki.pm_line_842.mdwn
@@ -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]]
diff --git a/doc/install.mdwn b/doc/install.mdwn
index d9c2a79f7..da84616e4 100644
--- a/doc/install.mdwn
+++ b/doc/install.mdwn
@@ -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.