* Fix handling of discussion links on discussion pages when l10n is used.
parent
d8c3baf7a3
commit
f6e917fcce
|
@ -156,11 +156,14 @@ sub preprocess_inline (@) { #{{{
|
||||||
if ($actions) {
|
if ($actions) {
|
||||||
my $file = $pagesources{$page};
|
my $file = $pagesources{$page};
|
||||||
my $type = pagetype($file);
|
my $type = pagetype($file);
|
||||||
if ($config{discussion} &&
|
if ($config{discussion}) {
|
||||||
$page !~ /.*\/discussion$/ &&
|
my $discussionlink=gettext("discussion");
|
||||||
(length $config{cgiurl} || exists $links{$page."/".gettext("discussion")})) {
|
if ($page !~ /.*\/\Q$discussionlink\E$/ &&
|
||||||
$template->param(have_actions => 1);
|
(length $config{cgiurl} ||
|
||||||
$template->param(discussionlink => htmllink($page, $params{page}, "Discussion", 1, 1));
|
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) {
|
if (length $config{cgiurl} && defined $type) {
|
||||||
$template->param(have_actions => 1);
|
$template->param(have_actions => 1);
|
||||||
|
|
|
@ -93,10 +93,14 @@ sub genpage ($$$) { #{{{
|
||||||
$template->param(historyurl => $u);
|
$template->param(historyurl => $u);
|
||||||
$actions++;
|
$actions++;
|
||||||
}
|
}
|
||||||
if ($config{discussion} && $page !~ /.*\/discussion$/ &&
|
if ($config{discussion}) {
|
||||||
(length $config{cgiurl} || exists $links{$page."/".gettext("discussion")})) {
|
my $discussionlink=gettext("discussion");
|
||||||
$template->param(discussionlink => htmllink($page, $page, gettext("Discussion"), 1, 1));
|
if ($page !~ /.*\/\Q$discussionlink\E$/ &&
|
||||||
$actions++;
|
(length $config{cgiurl} ||
|
||||||
|
exists $links{$page."/".$discussionlink})) {
|
||||||
|
$template->param(discussionlink => htmllink($page, $page, gettext("Discussion"), 1, 1));
|
||||||
|
$actions++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($actions) {
|
if ($actions) {
|
||||||
|
|
|
@ -4,8 +4,9 @@ ikiwiki (1.41) UNRELEASED; urgency=low
|
||||||
if an older version is installed, just don't gettext strings, instead of
|
if an older version is installed, just don't gettext strings, instead of
|
||||||
crashing.
|
crashing.
|
||||||
* Added smileys for Moin Moin compatability.
|
* 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
|
||||||
|
|
||||||
|
|
|
@ -4,13 +4,11 @@ I do want discussion subpage, but I don't want to have, for example: discussion/
|
||||||
-- [[JeremyReed]]
|
-- [[JeremyReed]]
|
||||||
|
|
||||||
> Discussion pages should clearly be a special case that don't get Discussion
|
> 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
|
>>> 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
|
>>> you fixed it only for English "discussion" page. The bug still occurs
|
||||||
>>> for the international "discussion" pages. I have backported ikiwiki 1.40
|
>>> for the international "discussion" pages. I have backported ikiwiki 1.40
|
||||||
>>> and I can see "Dyskusja" link on my Polish "dyskusja" pages. --Pawel
|
>>> 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
|
>>> Yes, I missed that string when internationalizing ikiwiki, fixed now.
|
||||||
>>> and next I clicked "Cancel" button, because I forgot about my signature :)
|
|
||||||
>>> --Pawel
|
|
||||||
|
|
Loading…
Reference in New Issue