diff options
author | intrigeri <intrigeri@boum.org> | 2009-01-15 23:04:57 +0100 |
---|---|---|
committer | intrigeri <intrigeri@boum.org> | 2009-01-15 23:04:57 +0100 |
commit | 3ba976d1d3d2122a399298888e28f4c7b3fa9e41 (patch) | |
tree | e446725a9d1346ed1f9524c6e4ddb444ddcf3c6c | |
parent | 9abda92324e2ae17a7437d7c0dded39cf4462649 (diff) |
po: pages in underlay dirs are not translatable
Fixes build break due to read-only underlay dirs, e.g. basewiki.
Signed-off-by: intrigeri <intrigeri@boum.org>
-rw-r--r-- | IkiWiki/Plugin/po.pm | 1 | ||||
-rw-r--r-- | 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** |