X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/f39d02583abee54d1c7792dcc171db6bba226091..d57c45b2d41b760082d86e4de1c5893ffd60b6e5:/IkiWiki/Plugin/po.pm?ds=sidebyside diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 0ea35b21c..9ccc79268 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -624,20 +624,24 @@ sub mybeautify_urlpath ($) { return $res; } -sub mytargetpage ($$) { +sub mytargetpage ($$;$) { my $page=shift; my $ext=shift; + my $filename=shift; if (istranslation($page) || istranslatable($page)) { my ($masterpage, $lang) = (masterpage($page), lang($page)); - if (! $config{usedirs} || $masterpage eq 'index') { + if (defined $filename) { + return $masterpage . "/" . $filename . "." . $lang . "." . $ext; + } + elsif (! $config{usedirs} || $masterpage eq 'index') { return $masterpage . "." . $lang . "." . $ext; } else { return $masterpage . "/index." . $lang . "." . $ext; } } - return $origsubs{'targetpage'}->($page, $ext); + return $origsubs{'targetpage'}->($page, $ext, $filename); } sub myurlto ($;$$) {