]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
agetty: properly pluralize the reporting of the number of users
authorBenno Schulenberg <bensberg@justemail.net>
Tue, 22 Jan 2013 08:36:01 +0000 (09:36 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 30 Jan 2013 14:23:42 +0000 (15:23 +0100)
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
term-utils/agetty.c

index aee853cb7df6aef843d8da91fb101e4414bfe1ab..c79c41665a0cbd41c820498d99e5433c91feb432 100644 (file)
@@ -1930,9 +1930,10 @@ static void output_special_char(unsigned char c, struct options *op,
                        if (ut->ut_type == USER_PROCESS)
                                users++;
                endutent();
-               printf ("%d ", users);
                if (c == 'U')
-                       printf((users == 1) ? _("user") : _("users"));
+                       printf(P_("%d user", "%d users", users), users);
+               else
+                       printf ("%d ", users);
                break;
        }
        case '4':