From 3ba976d1d3d2122a399298888e28f4c7b3fa9e41 Mon Sep 17 00:00:00 2001 From: intrigeri Date: Thu, 15 Jan 2009 23:04:57 +0100 Subject: [PATCH] po: pages in underlay dirs are not translatable Fixes build break due to read-only underlay dirs, e.g. basewiki. Signed-off-by: intrigeri --- IkiWiki/Plugin/po.pm | 1 + doc/plugins/po.mdwn | 6 ++---- 2 files changed, 3 insertions(+), 4 deletions(-) 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** -- 2.32.0.93.g670b81a890