uptime --help: put together message parts that belong together
authorBenno Schulenberg <bensberg@justemail.net>
Sun, 31 Aug 2008 10:35:18 +0000 (12:35 +0200)
committerJim Meyering <meyering@redhat.com>
Fri, 19 Sep 2008 10:27:37 +0000 (12:27 +0200)
src/uptime.c

index a5c4fe5..8687a57 100644 (file)
@@ -130,17 +130,21 @@ print_uptime (size_t n, const STRUCT_UTMP *this)
   /* procps' version of uptime also prints the seconds field, but
      previous versions of coreutils don't. */
   if (tmn)
-    fprintftime (stdout, _(" %H:%M%P  up "), tmn, 0, 0);
+    /* TRANSLATORS: This prints the current clock time. */
+    fprintftime (stdout, _(" %H:%M%P  "), tmn, 0, 0);
   else
-    printf (_(" ??:????  up "));
+    printf (_(" ??:????  "));
   if (uptime == (time_t) -1)
-    printf (_("???? days ??:??,  "));
+    printf (_("up ???? days ??:??,  "));
   else
     {
       if (0 < updays)
-       printf (ngettext ("%ld day", "%ld days", select_plural (updays)),
-               updays);
-      printf (" %2d:%02d,  ", uphours, upmins);
+       printf (ngettext ("up %ld day %2d:%02d,  ",
+                         "up %ld days %2d:%02d,  ",
+                         select_plural (updays)),
+               updays, uphours, upmins);
+      else
+       printf ("up  %2d:%02d,  ", uphours, upmins);
     }
   printf (ngettext ("%lu user", "%lu users", entries),
          (unsigned long int) entries);