po: fix link() pagespec when used on translation pages

Signed-off-by: intrigeri <intrigeri@boum.org>
master
intrigeri 2009-08-28 16:34:58 +02:00
parent be954ff3cb
commit 646c9a4c95
1 changed files with 4 additions and 1 deletions

View File

@ -566,9 +566,12 @@ sub mybestlink ($$) {
my $link=shift; my $link=shift;
my $res=$origsubs{'bestlink'}->(masterpage($page), $link); my $res=$origsubs{'bestlink'}->(masterpage($page), $link);
my @caller = caller(1);
if (length $res if (length $res
&& istranslatable($res) && istranslatable($res)
&& istranslation($page)) { && istranslation($page)
&& !(exists $caller[3] && defined $caller[3]
&& ($caller[3] eq "IkiWiki::PageSpec::match_link"))) {
return $res . "." . lang($page); return $res . "." . lang($page);
} }
return $res; return $res;