summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/po.pm5
1 files changed, 4 insertions, 1 deletions
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;