]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/po.pm
po plugin: fix targetpage for home page's translations
[ikiwiki.git] / IkiWiki / Plugin / po.pm
index 127d6d47f3496d2aa5c19c126cbb66ed5ec4793b..88f8194fbe7cb70bb93c15c74dd14a1dbe96ae5a 100644 (file)
@@ -35,7 +35,6 @@ sub import {
        hook(type => "getsetup", id => "po", call => \&getsetup);
        hook(type => "checkconfig", id => "po", call => \&checkconfig);
        hook(type => "needsbuild", id => "po", call => \&needsbuild);
-       hook(type => "tweakurlpath", id => "po", call => \&tweakurlpath);
        hook(type => "filter", id => "po", call => \&filter);
        hook(type => "htmlize", id => "po", call => \&htmlize);
        hook(type => "pagetemplate", id => "po", call => \&pagetemplate);
@@ -226,7 +225,7 @@ sub mytargetpage ($$) { #{{{
 
        if (istranslation($page)) {
                my ($masterpage, $lang) = ($page =~ /(.*)[.]([a-z]{2})$/);
-               if (! $config{usedirs} || $page eq 'index') {
+               if (! $config{usedirs} || $masterpage eq 'index') {
                        return $masterpage . "." . $lang . "." . $ext;
                }
                else {