uuidd: distinguish between singular and plural in three messages

Signed-off-by: Benno Schulenberg <bensberg@justemail.net>
This commit is contained in:
Benno Schulenberg 2011-07-30 19:21:52 +02:00 committed by Karel Zak
parent 27cc25474f
commit 0149cd8468
1 changed files with 10 additions and 4 deletions

View File

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