From b96f5ea4925854db9eae61f98a7ec44568ecae7d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 16 Aug 2006 19:36:46 +0000 Subject: Fix bugs when printing plurals of numbers that are not unsigned long int values. * src/system.h (select_plural): New function. * src/md5sum.c (digest_check): Use select_plural to avoid bug. * src/uptime.c (print_uptime): Likewise. * src/dd.c (print_stats): Likewise. Also, don't use ngettext to print a floating point number, as reducing to 0 or 1 doesn't work for some languages. Instead, just use "s" for seconds since it doesn't need a plural form. --- src/md5sum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/md5sum.c') diff --git a/src/md5sum.c b/src/md5sum.c index 1ecd672b5..a8ce1cf27 100644 --- a/src/md5sum.c +++ b/src/md5sum.c @@ -563,7 +563,7 @@ digest_check (const char *checkfile_name) " listed file could not be read", "WARNING: %" PRIuMAX " of %" PRIuMAX " listed files could not be read", - n_properly_formatted_lines), + select_plural (n_properly_formatted_lines)), n_open_or_read_failures, n_properly_formatted_lines); if (n_mismatched_checksums != 0) @@ -575,7 +575,7 @@ digest_check (const char *checkfile_name) " computed checksum did NOT match", "WARNING: %" PRIuMAX " of %" PRIuMAX " computed checksums did NOT match", - n_computed_checksums), + select_plural (n_computed_checksums)), n_mismatched_checksums, n_computed_checksums); } } -- cgit v1.2.3-54-g00ecf