aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-01-18 15:06:57 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-01-18 15:06:57 +0000
commitf6e917fcce86638e2a06c48c0df714c3dd93c8b0 (patch)
tree9b81ea34ee1a3d0f7072ebc71506891bf6a51969
parentd8c3baf7a3c152f44bcb0e68ed13776a38c8f3a0 (diff)
downloadikiwiki-f6e917fcce86638e2a06c48c0df714c3dd93c8b0.tar
ikiwiki-f6e917fcce86638e2a06c48c0df714c3dd93c8b0.tar.gz
* Fix handling of discussion links on discussion pages when l10n is used.
-rw-r--r--IkiWiki/Plugin/inline.pm13
-rw-r--r--IkiWiki/Render.pm12
-rw-r--r--debian/changelog3
-rw-r--r--doc/bugs/disable_sub-discussion_pages.mdwn6
4 files changed, 20 insertions, 14 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm
index 13ff0aa19..4bdb14032 100644
--- a/IkiWiki/Plugin/inline.pm
+++ b/IkiWiki/Plugin/inline.pm
@@ -156,11 +156,14 @@ sub preprocess_inline (@) { #{{{
if ($actions) {
my $file = $pagesources{$page};
my $type = pagetype($file);
- if ($config{discussion} &&
- $page !~ /.*\/discussion$/ &&
- (length $config{cgiurl} || exists $links{$page."/".gettext("discussion")})) {
- $template->param(have_actions => 1);
- $template->param(discussionlink => htmllink($page, $params{page}, "Discussion", 1, 1));
+ if ($config{discussion}) {
+ my $discussionlink=gettext("discussion");
+ if ($page !~ /.*\/\Q$discussionlink\E$/ &&
+ (length $config{cgiurl} ||
+ exists $links{$page."/".$discussionlink})) {
+ $template->param(have_actions => 1);
+ $template->param(discussionlink => htmllink($page, $params{page}, "Discussion", 1, 1));
+ }
}
if (length $config{cgiurl} && defined $type) {
$template->param(have_actions => 1);
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index 7ca9a3820..dcd107b81 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -93,10 +93,14 @@ sub genpage ($$$) { #{{{
$template->param(historyurl => $u);
$actions++;
}
- if ($config{discussion} && $page !~ /.*\/discussion$/ &&
- (length $config{cgiurl} || exists $links{$page."/".gettext("discussion")})) {
- $template->param(discussionlink => htmllink($page, $page, gettext("Discussion"), 1, 1));
- $actions++;
+ if ($config{discussion}) {
+ my $discussionlink=gettext("discussion");
+ if ($page !~ /.*\/\Q$discussionlink\E$/ &&
+ (length $config{cgiurl} ||
+ exists $links{$page."/".$discussionlink})) {
+ $template->param(discussionlink => htmllink($page, $page, gettext("Discussion"), 1, 1));
+ $actions++;
+ }
}
if ($actions) {
diff --git a/debian/changelog b/debian/changelog
index 24a36edcf..6234668a7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,8 +4,9 @@ ikiwiki (1.41) UNRELEASED; urgency=low
if an older version is installed, just don't gettext strings, instead of
crashing.
* Added smileys for Moin Moin compatability.
+ * Fix handling of discussion links on discussion pages when l10n is used.
- -- Joey Hess <joeyh@debian.org> Thu, 18 Jan 2007 09:45:47 -0500
+ -- Joey Hess <joeyh@debian.org> Thu, 18 Jan 2007 10:03:59 -0500
ikiwiki (1.40) unstable; urgency=low
diff --git a/doc/bugs/disable_sub-discussion_pages.mdwn b/doc/bugs/disable_sub-discussion_pages.mdwn
index 44ef66d81..5e7ea65b8 100644
--- a/doc/bugs/disable_sub-discussion_pages.mdwn
+++ b/doc/bugs/disable_sub-discussion_pages.mdwn
@@ -4,13 +4,11 @@ I do want discussion subpage, but I don't want to have, for example: discussion/
-- [[JeremyReed]]
> Discussion pages should clearly be a special case that don't get Discussion
-> links put at the top... aaand.. [[done]]! --[[Joey]]
+> links put at the top... aaand.. [[bugs/done]]! --[[Joey]]
>>> Joey, I've just seen that you closed that bug in ikiwiki 1.37, but it seems
>>> you fixed it only for English "discussion" page. The bug still occurs
>>> for the international "discussion" pages. I have backported ikiwiki 1.40
>>> and I can see "Dyskusja" link on my Polish "dyskusja" pages. --Pawel
->>> I'm so sorry for two commits, but first I clicked "Save Page" button
->>> and next I clicked "Cancel" button, because I forgot about my signature :)
->>> --Pawel
+>>> Yes, I missed that string when internationalizing ikiwiki, fixed now.