po: fix link() pagespec when used on translation pages
Signed-off-by: intrigeri <intrigeri@boum.org>master
parent
be954ff3cb
commit
646c9a4c95
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue