]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
* Fix handling of discussion links on discussion pages when l10n is used.
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 18 Jan 2007 15:06:57 +0000 (15:06 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Thu, 18 Jan 2007 15:06:57 +0000 (15:06 +0000)
IkiWiki/Plugin/inline.pm
IkiWiki/Render.pm
debian/changelog
doc/bugs/disable_sub-discussion_pages.mdwn

index 13ff0aa19c92ea5b97134240b97c985b732b30fa..4bdb14032eb89b055aa8da3207228d3cee5b75c0 100644 (file)
@@ -156,11 +156,14 @@ sub preprocess_inline (@) { #{{{
                        if ($actions) {
                                my $file = $pagesources{$page};
                                my $type = pagetype($file);
                        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);
                                }
                                if (length $config{cgiurl} && defined $type) {
                                        $template->param(have_actions => 1);
index 7ca9a38208aef4d141f629943ce32d10f388ee20..dcd107b815172d86031d7cce3fc15a9d16544099 100644 (file)
@@ -93,10 +93,14 @@ sub genpage ($$$) { #{{{
                $template->param(historyurl => $u);
                $actions++;
        }
                $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) {
        }
 
        if ($actions) {
index 24a36edcf7965c1a1d76869e389b9ae86acbad62..6234668a70f042aa8e13eafbea728278369f02e1 100644 (file)
@@ -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.
     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
 
 
 ikiwiki (1.40) unstable; urgency=low
 
index 44ef66d812af190464fff185be2ecd531cc46090..5e7ea65b834b17b8dcb62c238a1520be5841d0f0 100644 (file)
@@ -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
 -- [[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
 
 
 >>> 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.