pluralization and tiny adjustments of some messages
PATCH 1/1 pluralization and tiny adjustments of some messages
Hi,
Attached bunch of nine patches correct some mistaken words in some of the messages, and adds pluralization to three messages of the uuidd deamon. Most of these things were first noticed by the Czech translator Petr Pisar.
Regards,
Benno
Signature · 1 line
http://www.fastmail.fm - A fast, anti-spam email service.
From 275ffed75f7c2e2e2907d53b7b4e47760adb0a7a Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 30 Jul 2011 15:35:16 +0200
Subject: [PATCH 1/9] partx.c: switch on localization (noted by Petr Pisar)
--- partx/partx.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
partx/partx.c +4 -0
@@ -640,6 +640,10 @@ int main(int argc, char **argv) { NULL, 0, NULL, 0 } }; +setlocale (LC_ALL ,"" ); +bindtextdomain (PACKAGE ,LOCALEDIR ); +textdomain (PACKAGE ); +while ((c =getopt_long (argc, argv,"abdglrsvn:t:o:Ph" , long_opts,NULL )) !=-1 ) {
Signature · 1 line
1.7.0.4
From 57f33663ad2b97a216f62273cf34744a1d2071fe Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 30 Jul 2011 17:13:27 +0200
Subject: [PATCH 2/9] lsblk.c: correct mistaken word (noted by Petr Pisar)
--- misc-utils/lsblk.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
misc-utils/lsblk.c +1 -1
@@ -789,7 +789,7 @@ static int process_one_device(char *devname)return EXIT_FAILURE ; }if (blkid_devno_to_wholedisk (st.st_rdev, buf,sizeof (buf), &disk)) { -warn (_ ("%s: failed to get whole-list devno" ), devname); +warn (_ ("%s: failed to get whole-disk device number" ), devname);return EXIT_FAILURE ; }if (st.st_rdev == disk) {
Signature · 1 line
1.7.0.4
From 01af34d1fd02ae3ff0ab12a3fd921bc29ed56355 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 30 Jul 2011 17:16:09 +0200
Subject: [PATCH 3/9] fstrim.c: correct mistaken grammar in one message
--- sys-utils/fstrim.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
sys-utils/fstrim.c +1 -1
@@ -143,7 +143,7 @@ int main(int argc, char **argv)err (EXIT_FAILURE ,_ ("%s: FITRIM ioctl failed" ), path);if (verbose) -printf (_ ("%s: %" PRIu64" bytes was trimmed\n" ), +printf (_ ("%s: %" PRIu64" bytes were trimmed\n" ), path, (uint64_t ) range.len);close (fd);return EXIT_SUCCESS ;
Signature · 1 line
1.7.0.4
From 9363e5374057e59832ef9835f7faed91283b0304 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 30 Jul 2011 17:17:26 +0200
Subject: [PATCH 4/9] wipefs.c: gettextize one sentence as a whole
--- misc-utils/wipefs.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
misc-utils/wipefs.c +3 -2
@@ -237,7 +237,8 @@ do_wipe_offset(int fd, struct wipe_desc *wp, const char *fname, int noact)if (noact ==0 &&write_all (fd, buf, len))err (EXIT_FAILURE ,_ ("%s: write failed" ), fname); -printf (_ ("%zd bytes [" ), wp->len); +printf (_ ("%zd bytes were erased at offset 0x%jx (%s)\nthey were: " ), + wp->len, wp->offset, wp->type);for (i =0 ; i < len; i++) {printf ("%02x" , wp->magic[i]);
@@ -245,7 +246,7 @@ do_wipe_offset(int fd, struct wipe_desc *wp, const char *fname, int noact)fputc (' ' , stdout); } -printf (_ ("] erased at offset 0x%jx (%s)\n" ), wp->offset, wp->type); +printf ("\n" );return 0 ; }
Signature · 1 line
1.7.0.4
From bc8b7db0e535717c72bdc4629c0769002f7369ef Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 30 Jul 2011 19:20:58 +0200
Subject: [PATCH 5/9] nls.h: define a macro for handling plurals with ngettext()
--- include/nls.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
include/nls.h +2 -0
@@ -22,6 +22,7 @@ int main(int argc, char *argv[]);# else # define N_ (String) (String)# endif +# define P_ (Singular, Plural, n) ngettext (Singular, Plural, n)#else # undef bindtextdomain# define bindtextdomain (Domain, Directory)/* empty */
@@ -29,6 +30,7 @@ int main(int argc, char *argv[]);# define textdomain (Domain)/* empty */ # define _ (Text) (Text)# define N_ (Text) (Text) +# define P_ (Singular, Plural, n) ((n) == 1 ? (Singular) : (Plural))#endif #ifdef HAVE_LANGINFO_H
Signature · 1 line
1.7.0.4
From 4a38316f2100ebfc7f9423d339082e5a9399abbd Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 30 Jul 2011 19:21:52 +0200
Subject: [PATCH 6/9] uuidd.c: distinguish between singular and plural in three messages
--- misc-utils/uuidd.c | 14 ++++++++++---- 1 files changed, 10 insertions(+), 4 deletions(-)
misc-utils/uuidd.c +10 -4
@@ -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 ;
Signature · 1 line
1.7.0.4
From d1055bbcf5aa4601f55d55da0ec88672034fad05 Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 30 Jul 2011 21:27:16 +0200
Subject: [PATCH 7/9] po: also extract plural messages from the C files
--- po/Makevars | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
po/Makevars +1 -1
@@ -8,7 +8,7 @@ subdir = po top_builddir = .. # These options get passed to xgettext. -XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ +XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --keyword=P_:1,2 # This is the copyright holder that gets inserted into the header of the # $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
Signature · 1 line
1.7.0.4
From a524cae461131c03a109662cf8f6e9229ef28f6b Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sat, 30 Jul 2011 21:28:07 +0200
Subject: [PATCH 8/9] textual: add some guiding comments for translators
These are picked up by xgettext and put in the POT file.
--- login-utils/login.c | 1 + misc-utils/lsblk.c | 1 + sys-utils/fstrim.c | 1 + 3 files changed, 3 insertions(+), 0 deletions(-)
login-utils/login.c +1 -0
@@ -1356,6 +1356,7 @@ static void timedout(int sig) {signal (SIGALRM, timedout2);alarm (10 ); +/* TRANSLATORS: The standard value for %d is 60. */ warnx (_ ("timed out after %d seconds" ), timeout);signal (SIGALRM ,SIG_IGN );alarm (0 );
misc-utils/lsblk.c +1 -0
@@ -856,6 +856,7 @@ static void parse_excludes(const char *str) excludes[nexcludes++] = n;if (nexcludes ==ARRAY_SIZE (excludes)) +/* TRANSLATORS: The standard value for %d is 256. */ errx (EXIT_FAILURE ,_ ("the list of excluded devices is " "too large (limit is %d devices)" ), (int )ARRAY_SIZE (excludes));
sys-utils/fstrim.c +1 -0
@@ -143,6 +143,7 @@ int main(int argc, char **argv)err (EXIT_FAILURE ,_ ("%s: FITRIM ioctl failed" ), path);if (verbose) +/* TRANSLATORS: The standard value here is a very large number. */ printf (_ ("%s: %" PRIu64" bytes were trimmed\n" ), path, (uint64_t ) range.len);close (fd);
Signature · 1 line
1.7.0.4
From ddb1cef9ccf713bedf19e3c1df51a027cb85722a Mon Sep 17 00:00:00 2001
From: Benno Schulenberg <[email protected]>
Date: Sun, 31 Jul 2011 21:27:58 +0200
Subject: [PATCH 9/9] fsck.c: use same word category in message, and add translators comment
--- fsck/fsck.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
fsck/fsck.c +2 -1
@@ -291,7 +291,8 @@ static void lock_disk(struct fsck_instance *inst) }if (verbose) -printf ("%s.\n" , inst->lock >=0 ?_ ("success" ) :_ ("failed" )); +/* TRANSLATORS: These are followups to "Locking disk...". */ +printf ("%s.\n" , inst->lock >=0 ?_ ("succeeded" ) :_ ("failed" ));free (diskname);return ;
Signature · 1 line
1.7.0.4
31.7.2011 22:30, Benno Schulenberg kirjoitti:
sys-utils/fstrim.c int main(int argc, char **argv) · line 147
Quoted 6 lines
sys-utils/fstrim.c +1
-1if (verbose) -printf (_ ("%s: %" PRIu64" bytes was trimmed\n" ), +printf (_ ("%s: %" PRIu64" bytes were trimmed\n" ), path, (uint64_t ) range.len);
Hi,
shouldn't this one be pluralized also?
Regards,
LN
Quoted 4 lines · Benno Schulenberg
Attached bunch of nine patches correct some mistaken words in some of the messages, and adds pluralization to three messages of the uuidd deamon. Most of these things were first noticed by the Czech translator Petr Pisar.
Applied, *thanks!*
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com