summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/po.pm13
1 files changed, 13 insertions, 0 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 02fc4a89e..bbbb3b870 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -63,6 +63,8 @@ sub import {
inject(name => "IkiWiki::cgiurl", call => \&mycgiurl);
$origsubs{'rootpage'}=\&IkiWiki::rootpage;
inject(name => "IkiWiki::rootpage", call => \&myrootpage);
+ $origsubs{'isselflink'}=\&IkiWiki::isselflink;
+ inject(name => "IkiWiki::isselflink", call => \&myisselflink);
}
@@ -671,6 +673,17 @@ sub myrootpage (@) {
return $rootpage;
}
+sub myisselflink ($$) {
+ my $page=shift;
+ my $link=shift;
+
+ return 1 if $origsubs{'isselflink'}->($page, $link);
+ if (istranslation($page)) {
+ return $origsubs{'isselflink'}->(masterpage($page), $link);
+ }
+ return;
+}
+
# ,----
# | Blackboxes for private data
# `----