]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(print_uptime): Use ngettext for day/days and user/users.
authorJim Meyering <jim@meyering.net>
Fri, 3 May 2002 09:58:37 +0000 (09:58 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 3 May 2002 09:58:37 +0000 (09:58 +0000)
Suggestion from Karl Eichwalder.

src/uptime.c

index a5b3259cc1a5806cd249e0007789f8f2b1a0975f..d04a7f118a1714d6269054935aac9e48516f3f72 100644 (file)
@@ -1,5 +1,5 @@
 /* GNU's uptime.
-   Copyright (C) 1992-2001 Free Software Foundation, Inc.
+   Copyright (C) 1992-2002 Free Software Foundation, Inc.
 
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -122,9 +122,9 @@ print_uptime (int n, const STRUCT_UTMP *this)
             the german translation is meaningless.  */
          tmn->tm_min, (tmn->tm_hour < 12 ? _("am") : _("pm")));
   if (updays > 0)
-    printf ("%d %s,", updays, (updays == 1 ? _("day") : _("days")));
+    printf ("%d %s,", updays, ngettext(_("day"), _("days"), updays));
   printf (" %2d:%02d,  %d %s", uphours, upmins, entries,
-         (entries == 1) ? _("user") : _("users"));
+         ngettext (_("user"), _("users"), entries));
 
 #if defined (HAVE_GETLOADAVG) || defined (C_GETLOADAVG)
   loads = getloadavg (avg, 3);