From: intrigeri Date: Fri, 28 Aug 2009 14:34:58 +0000 (+0200) Subject: po: fix link() pagespec when used on translation pages X-Git-Tag: 3.1415926~10^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=646c9a4c95a480544d63c161651c45b3b029e598;p=ikiwiki.git po: fix link() pagespec when used on translation pages Signed-off-by: intrigeri --- diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 14c7318fe..21e3b8e37 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -566,9 +566,12 @@ sub mybestlink ($$) { my $link=shift; my $res=$origsubs{'bestlink'}->(masterpage($page), $link); + my @caller = caller(1); if (length $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;