Signed-off-by: intrigeri <intrigeri@boum.org>
sub cansave ($$$$) {
my ($page, $content, $cgi, $session) = (shift, shift, shift, shift);
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;