diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-12-27 15:35:06 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2002-12-27 15:35:06 +0000 |
commit | 60692c0414ecdff092605ca29b93260a5d82db16 (patch) | |
tree | 5c175c201eb66a0552fc344b897b88ce7a0a1be0 | |
parent | 45df8bce7d4f1ed1427d0d4da52f5a0ae9fa2afe (diff) | |
download | mailutils-60692c0414ecdff092605ca29b93260a5d82db16.tar.gz mailutils-60692c0414ecdff092605ca29b93260a5d82db16.tar.bz2 |
Use ngettext
-rw-r--r-- | frm/frm.c | 5 | ||||
-rw-r--r-- | mail/quit.c | 12 | ||||
-rw-r--r-- | mail/summary.c | 2 |
3 files changed, 12 insertions, 7 deletions
@@ -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")); diff --git a/mail/quit.c b/mail/quit.c index 474921f2c..f0492af5e 100644 --- a/mail/quit.c +++ b/mail/quit.c @@ -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); diff --git a/mail/summary.c b/mail/summary.c index 87346c8d5..75777c248 100644 --- a/mail/summary.c +++ b/mail/summary.c @@ -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) |