aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin/po.pm
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2014-12-30 15:51:50 -0400
committerJoey Hess <joeyh@joeyh.name>2014-12-30 15:51:50 -0400
commitf88e109bec4df70875a72f5044b8940eefbdd26e (patch)
tree3970bb1b962c37868d564118798b3354f8651f36 /IkiWiki/Plugin/po.pm
parent8a98440db6454fc8653c264f61502bd0d1d6baf8 (diff)
downloadikiwiki-f88e109bec4df70875a72f5044b8940eefbdd26e.tar
ikiwiki-f88e109bec4df70875a72f5044b8940eefbdd26e.tar.gz
po: If msgmerge falls over on a problem po file, print a warning message, but don't let this problem crash ikiwiki entirely.
Diffstat (limited to 'IkiWiki/Plugin/po.pm')
-rw-r--r--IkiWiki/Plugin/po.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/IkiWiki/Plugin/po.pm b/IkiWiki/Plugin/po.pm
index 6107a4a22..6b55ee351 100644
--- a/IkiWiki/Plugin/po.pm
+++ b/IkiWiki/Plugin/po.pm
@@ -993,10 +993,9 @@ sub refreshpofiles ($@) {
}
if (-e $pofile) {
- system("msgmerge", "--previous", "-q", "-U", "--backup=none", $pofile, $potfile) == 0
- or error("po(refreshpofiles) ".
- sprintf(gettext("failed to update %s"),
- $pofile));
+ if (! (system("msgmerge", "--previous", "-q", "-U", "--backup=none", $pofile, $potfile) == 0)) {
+ print STDERR ("po(refreshpofiles) ". sprintf(gettext("failed to update %s"), $pofile));
+ }
}
else {
File::Copy::syscopy($potfile,$pofile)