diff options
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/po.pm | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm index 13110d242..35e7c13ff 100644 --- a/IkiWiki/Plugin/po.pm +++ b/IkiWiki/Plugin/po.pm @@ -387,7 +387,15 @@ sub change(@) { sub cansave ($$$$) { my ($page, $content, $cgi, $session) = (shift, shift, shift, shift); - debug("po plugin running in cansave") + if (istranslation($page)) { + if (defined po_to_markup($page, $content, "nonfatal")) { + return undef; + } + else { + return "Could not parse this page's content; is this valid gettext?"; + } + } + return undef; } sub canremove ($$$) { |