X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a43194c57bdf72d3968f445f2059736956c0a2ea..73f4a8835876c8cb07808367cd72d9ae972893e8:/IkiWiki/Plugin/po.pm?ds=inline diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index d9aa9bfda..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); } @@ -386,8 +388,7 @@ sub change (@) { resetalreadyfiltered(); require IkiWiki::Render; foreach my $file (@rendered) { - debug(sprintf(gettext("building %s"), $file)); - IkiWiki::render($file); + IkiWiki::render($file, sprintf(gettext("building %s"), $file)); } } @@ -672,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 # `----