]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/po.pm
trail: Allow unescaped punctuation in pagenames
[git.ikiwiki.info.git] / IkiWiki / Plugin / po.pm
index 6107a4a2252c256e715a3b0bd210eb28d45371b3..418e8e58a2f1a705e8498ad9e22b7afaf8d493ec 100644 (file)
@@ -548,7 +548,7 @@ sub formbuilder_setup (@) {
                # their buttons, which is why this hook must be run last.
                # The canrename/canremove hooks already ensure this is forbidden
                # at the backend level, so this is only UI sugar.
-               if (istranslation($form->field("page"))) {
+               if (istranslation(scalar $form->field("page"))) {
                        map {
                                for (my $i = 0; $i < @{$params{buttons}}; $i++) {
                                        if (@{$params{buttons}}[$i] eq $_) {
@@ -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)