]> granicus.if.org Git - neomutt/commitdiff
mx.c: Fix plural message "messages(s) not deleted"
authorReis Radomil <reisradomil@fake-box.com>
Tue, 22 May 2018 14:16:12 +0000 (14:16 +0000)
committerRichard Russon <rich@flatcap.org>
Tue, 29 May 2018 03:03:35 +0000 (04:03 +0100)
mx.c

diff --git a/mx.c b/mx.c
index 0b9c0375b79e0d980bbf40b51a1a7cbd3320721b..89cf710088f4d6f55778a0a1c5b48d5f705c9980 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -616,9 +616,10 @@ static int trash_append(struct Context *ctx)
   if (!Trash || !ctx->deleted || (ctx->magic == MUTT_MAILDIR && MaildirTrash))
     return 0;
 
+  int delmsgcount = 0;
   for (i = 0; i < ctx->msgcount; i++)
     if (ctx->hdrs[i]->deleted && (!ctx->hdrs[i]->purge))
-      break;
+      delmsgcount++;
   if (i == ctx->msgcount)
     return 0; /* nothing to be done */
 
@@ -631,7 +632,10 @@ static int trash_append(struct Context *ctx)
     Confirmappend = true;
   if (rc != 0)
   {
-    mutt_error(_("message(s) not deleted"));
+    /* L10N: Although we now the precise number of messages, we do not show it to the user.
+       So feel free to use a "generic plural" as plural translation if your language has one.
+     */
+    mutt_error(ngettext("message not deleted", "messages not deleted", delmsgcount));
     return -1;
   }