util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Francesco Cosoleto <cosoleto@gmail.com>
To: util-linux@vger.kernel.org
Cc: Francesco Cosoleto <cosoleto@gmail.com>
Subject: [PATCH 1/3] fdisk: use ngettext() in str_units() for plural forms
Date: Mon, 14 Nov 2011 14:47:17 +0100	[thread overview]
Message-ID: <1321278439-9392-1-git-send-email-cosoleto@gmail.com> (raw)

Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
---
 fdisk/fdisk.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/fdisk/fdisk.c b/fdisk/fdisk.c
index d517d4b..5b8e24a 100644
--- a/fdisk/fdisk.c
+++ b/fdisk/fdisk.c
@@ -1542,11 +1542,11 @@ get_nonexisting_partition(int warn, int max) {
 }
 
 const char *
-str_units(int n) {	/* n==1: use singular */
-	if (n == 1)
-		return display_in_cyl_units ? _("cylinder") : _("sector");
-	else
-		return display_in_cyl_units ? _("cylinders") : _("sectors");
+str_units(int n)
+{
+	if (display_in_cyl_units)
+		return P_("cylinder", "cylinders", n);
+	return P_("sector", "sectors", n);
 }
 
 void change_units(void)
-- 
1.7.3.4


             reply	other threads:[~2011-11-14 13:48 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 13:47 Francesco Cosoleto [this message]
2011-11-14 13:47 ` [PATCH 2/3] fdisk: avoid segfault validating a sgi label (boot/swap not set) Francesco Cosoleto
2011-11-14 14:23   ` Karel Zak
2011-11-14 16:06     ` Francesco Cosoleto
2011-11-14 13:47 ` [PATCH 3/3] fdisk: split delete_partition() off from dos_delete_partition() Francesco Cosoleto
2011-11-14 14:23   ` Karel Zak
2011-11-14 14:08 ` [PATCH 1/3] fdisk: use ngettext() in str_units() for plural forms Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1321278439-9392-1-git-send-email-cosoleto@gmail.com \
    --to=cosoleto@gmail.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).