Commit 60692c04 60692c0414ecdff092605ca29b93260a5d82db16 by Sergey Poznyakoff

Use ngettext

1 parent 45df8bce
......@@ -403,8 +403,9 @@ cleanup:
cleanup1:
if (show_summary)
printf (total == 1 ? _("You have %d message.\n")
: _("You have %d messages.\n"),
printf (ngettext ("You have %d message.\n",
"You have %d messages.\n",
total),
total);
if (show_query && have_new_mail)
printf (_("You have new mail.\n"));
......
......@@ -47,8 +47,10 @@ mail_mbox_close ()
mailbox_get_url (mbox, &url);
mailbox_messages_count (mbox, &held_count);
fprintf (ofile, held_count == 1 ? _("Held %d message in %s\n")
: _("Held %d messages in %s\n"),
fprintf (ofile,
ngettext ("Held %d message in %s\n",
"Held %d messages in %s\n",
held_count),
held_count, url_to_string (url));
mailbox_close (mbox);
mailbox_destroy (&mbox);
......@@ -125,8 +127,10 @@ mail_mbox_commit ()
url_t u = NULL;
mailbox_get_url (dest_mbox, &u);
fprintf(ofile, saved_count == 1 ? _("Saved %d message in %s\n")
: _("Saved %d messages in %s\n"),
fprintf(ofile,
ngettext ("Saved %d message in %s\n",
"Saved %d messages in %s\n",
saved_count),
saved_count, url_to_string (u));
mailbox_close (dest_mbox);
mailbox_destroy (&dest_mbox);
......
......@@ -63,7 +63,7 @@ mail_summary (int argc, char **argv)
mailbox_get_url (mbox, &url);
printf("\"%s\": ", url_to_string (url));
}
printf ("%d %s", count, count == 1 ? _("message") : _("messages"));
printf (ngettext ("%d message", "%d messages", count), count);
if (mnew > 0)
printf (_(" %d new"), mnew);
if (mseen > 0)
......