From: intrigeri Date: Thu, 15 Jan 2009 22:04:57 +0000 (+0100) Subject: po: pages in underlay dirs are not translatable X-Git-Tag: 3.15~255 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3ba976d1d3d2122a399298888e28f4c7b3fa9e41;p=ikiwiki.git po: pages in underlay dirs are not translatable Fixes build break due to read-only underlay dirs, e.g. basewiki. Signed-off-by: intrigeri --- diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 3a696fb65..babf483a7 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -665,6 +665,7 @@ sub istranslatablefile ($) { return 0 unless defined $file; return 0 if (defined pagetype($file) && pagetype($file) eq 'po'); return 0 if $file =~ /\.pot$/; + return 0 unless -e "$config{srcdir}/$file"; # underlay dirs may be read-only return 1 if pagespec_match(pagename($file), $config{po_translatable_pages}); return; } diff --git a/doc/plugins/po.mdwn b/doc/plugins/po.mdwn index a064c0f7b..4ed2c6f7c 100644 --- a/doc/plugins/po.mdwn +++ b/doc/plugins/po.mdwn @@ -481,10 +481,8 @@ Robustness tests ### Enabling/disabling the plugin -- enabling the plugin with `po_translatable_pages` set to blacklist: - **breaks** due to read-only basewiki -- enabling the plugin with `po_translatable_pages` set to whitelist: - **OK** +- enabling the plugin with `po_translatable_pages` set to blacklist: **OK** +- enabling the plugin with `po_translatable_pages` set to whitelist: **OK** - enabling the plugin without `po_translatable_pages` set: **OK** - disabling the plugin: **OK**