util-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] fdisk: use ngettext() in str_units() for plural forms
@ 2011-11-14 13:47 Francesco Cosoleto
  2011-11-14 13:47 ` [PATCH 2/3] fdisk: avoid segfault validating a sgi label (boot/swap not set) Francesco Cosoleto
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Francesco Cosoleto @ 2011-11-14 13:47 UTC (permalink / raw)
  To: util-linux; +Cc: Francesco Cosoleto

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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-11-14 16:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-14 13:47 [PATCH 1/3] fdisk: use ngettext() in str_units() for plural forms Francesco Cosoleto
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

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).