]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
uuidd: distinguish between singular and plural in three messages
authorBenno Schulenberg <bensberg@justemail.net>
Sat, 30 Jul 2011 17:21:52 +0000 (19:21 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 2 Aug 2011 12:13:44 +0000 (14:13 +0200)
Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
misc-utils/uuidd.c

index 93cb17441371e3d6098c6ba37623f49eabd58d26..cf1b37bf1a8dd758378288b7927dfb1f130b1fd6 100644 (file)
@@ -376,8 +376,11 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
                        __uuid_generate_time(uu, &num);
                        if (debug) {
                                uuid_unparse(uu, str);
-                               printf(_("Generated time UUID %s and %d "
-                                        "following\n"), str, num - 1);
+                               printf(P_("Generated time UUID %s "
+                                         "and %d following\n",
+                                         "Generated time UUID %s "
+                                         "and %d following\n", num - 1),
+                                      str, num - 1);
                        }
                        memcpy(reply_buf, uu, sizeof(uu));
                        reply_len = sizeof(uu);
@@ -394,7 +397,8 @@ static void server_loop(const char *socket_path, const char *pidfile_path,
                        __uuid_generate_random((unsigned char *) reply_buf +
                                              sizeof(num), &num);
                        if (debug) {
-                               printf(_("Generated %d UUIDs:\n"), num);
+                               printf(P_("Generated %d UUID:\n",
+                                         "Generated %d UUIDs:\n", num), num);
                                for (i = 0, cp = reply_buf + sizeof(num);
                                     i < num;
                                     i++, cp += UUID_LEN) {
@@ -543,7 +547,9 @@ int main(int argc, char **argv)
 
                        uuid_unparse((unsigned char *) buf, str);
 
-                       printf(_("%s and subsequent %d UUIDs\n"), str, num - 1);
+                       printf(P_("%s and %d subsequent UUID\n",
+                                 "%s and %d subsequent UUIDs\n", num - 1),
+                              str, num - 1);
                } else {
                        printf(_("List of UUIDs:\n"));
                        cp = buf + 4;