]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/po.pm
po: Check that translated underlay directories exist before using them for master...
[git.ikiwiki.info.git] / IkiWiki / Plugin / po.pm
index 2cbfb0a459a91c37469b3429d437cdae5433bbc1..00c58fbe54f4992dd802496157ecd267a2ac30bf 100644 (file)
@@ -174,7 +174,9 @@ sub checkconfig () {
                if ($config{po_master_language}{code} ne 'en') {
                        # Add underlay containing translated source files
                        # for the master language.
                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";
                }
        }
 }
                }
        }
 }
@@ -308,7 +310,7 @@ sub pagetemplate (@) {
        if (ishomepage($page) && $template->query(name => "title")) {
                $template->param(title => $config{wikiname});
        }
        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 (@) {
 
 # Add the renamed page translations to the list of to-be-renamed pages.
 sub renamepages (@) {