]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/po.pm
Merge remote branch 'smcv/unescaped-meta'
[git.ikiwiki.info.git] / IkiWiki / Plugin / po.pm
index f8801185e2450152f2155fb01ff1da5fdcee607f..00c58fbe54f4992dd802496157ecd267a2ac30bf 100644 (file)
@@ -85,7 +85,8 @@ sub getsetup () {
        return
                plugin => {
                        safe => 0,
-                       rebuild => 1,
+                       rebuild => 1, # format plugin
+                       section => "format",
                },
                po_master_language => {
                        type => "string",
@@ -173,7 +174,9 @@ sub checkconfig () {
                if ($config{po_master_language}{code} ne 'en') {
                        # Add underlay containing translated source files
                        # for the master language.
-                       add_underlay("locale/$config{po_master_language}{code}/$underlay");
+print STDERR "added underlay locale/$config{po_master_language}{code}/$underlay\n";
+                       add_underlay("locale/$config{po_master_language}{code}/$underlay")
+                               if -d "$config{underlaydirbase}/locale/$config{po_master_language}{code}/$underlay";
                }
        }
 }
@@ -307,7 +310,7 @@ sub pagetemplate (@) {
        if (ishomepage($page) && $template->query(name => "title")) {
                $template->param(title => $config{wikiname});
        }
-} # }}}
+}
 
 # Add the renamed page translations to the list of to-be-renamed pages.
 sub renamepages (@) {