]> git.donarmstrong.com Git - debbugs.git/blobdiff - scripts/service
Plural/singular agreement in error message
[debbugs.git] / scripts / service
index 4d20051f332b55437eb6060b7f71b8dcf3166751..10fbbc0a2488c3abc6f772e790bb2e0b5231e21f 100755 (executable)
@@ -7,6 +7,9 @@
 use warnings;
 use strict;
 
+use locale;
+use POSIX qw(strftime locale_h);
+setlocale(LC_TIME, "C");
 
 use Debbugs::Config qw(:globals :config);
 
@@ -473,11 +476,13 @@ END
                         transcript => $transcript,
                         debug => $debug,
                         ok => \$ok,
+                        replyto => $replyto,
                        );
        if ($terminate_control) {
            last;
        }
     } else {
+       print {$transcript} "Unknown command or malformed arguments to command.\n";
        $errors++;
         if (++$unknowns >= 5) {
             print {$transcript} "Too many unknown commands, stopping here.\n\n";
@@ -504,7 +509,7 @@ if (!defined $header{'subject'} || $header{'subject'} eq "") {
 }
 
 # Error text here advertises how many errors there were
-my $error_text = $errors > 0 ? " (with $errors errors)":'';
+my $error_text = $errors > 0 ? " (with $errors error" . ($errors > 1 ? "s" : "") . ")" : "";
 
 my @common_headers;
 push @common_headers, 'X-Loop',$gMaintainerEmail;