gfs2-utils: master - mkfs.gfs2: i18n improvements

Andrew Price andyp at fedoraproject.org
Thu Jan 10 09:44:31 UTC 2013


Gitweb:        http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=583efac3c351511ef91f5c2c659f3ec217337802
Commit:        583efac3c351511ef91f5c2c659f3ec217337802
Parent:        f7f8e1e9f01da323b163c0edd6008a622b1b3230
Author:        Andrew Price <anprice at redhat.com>
AuthorDate:    Wed Jan 9 15:37:56 2013 +0000
Committer:     Andrew Price <anprice at redhat.com>
CommitterDate: Wed Jan 9 15:37:56 2013 +0000

mkfs.gfs2: i18n improvements

Consolidate some "Error building foo" error messages so that they only
need translating once and tweak some other strings for easy of
translation.

Signed-off-by: Andrew Price <anprice at redhat.com>
---
 gfs2/mkfs/main_grow.c |    2 +-
 gfs2/mkfs/main_jadd.c |    6 +++---
 gfs2/mkfs/main_mkfs.c |   20 +++++++-------------
 3 files changed, 11 insertions(+), 17 deletions(-)

diff --git a/gfs2/mkfs/main_grow.c b/gfs2/mkfs/main_grow.c
index d1e1d02..c52f78d 100644
--- a/gfs2/mkfs/main_grow.c
+++ b/gfs2/mkfs/main_grow.c
@@ -74,7 +74,7 @@ static void usage(void)
 
 	printf("%s\n", _("Usage:"));
 	printf("    gfs2_grow [%s] <%s>\n\n", _("options"), _("device"));
-	printf(_("Expands a GFS2 file system after the device upon which the file system resides has been expanded"));
+	printf(_("Expands a GFS2 file system after the device containing the file system has been expanded"));
 	printf("\n\n%s\n", _("Options:"));
 
 	for (i = 0; options[i] != NULL; i += 3) {
diff --git a/gfs2/mkfs/main_jadd.c b/gfs2/mkfs/main_jadd.c
index dfe5f5b..a4c6ca7 100644
--- a/gfs2/mkfs/main_jadd.c
+++ b/gfs2/mkfs/main_jadd.c
@@ -211,9 +211,9 @@ print_results(struct gfs2_sbd *sdp)
 	if (sdp->expert)
 		printf("Expert mode:            on\n");
 
-	printf( _("Filesystem:            %s\n"), sdp->path_name);
-	printf( _("Old Journals           %u\n"), sdp->orig_journals);
-	printf( _("New Journals           %u\n"), sdp->md.journals);
+	printf( _("Filesystem: %s\n"), sdp->path_name);
+	printf( _("Old Journals: %u\n"), sdp->orig_journals);
+	printf( _("New Journals: %u\n"), sdp->md.journals);
 
 }
 
diff --git a/gfs2/mkfs/main_mkfs.c b/gfs2/mkfs/main_mkfs.c
index 07844d6..2ed17d2 100644
--- a/gfs2/mkfs/main_mkfs.c
+++ b/gfs2/mkfs/main_mkfs.c
@@ -229,7 +229,7 @@ static void decode_arguments(int argc, char *argv[], struct gfs2_sbd *sdp)
 		strcpy(sdp->device_name, argv[optind++]);
 
 	if (sdp->device_name[0] == '\0')
-		die( _("No device specified. Please use '-h' for help\n"));
+		die( _("No device specified. Please use '-h' for help.\n"));
 
 	if (optind < argc)
 		sdp->orig_fssize = atol(argv[optind++]);
@@ -684,40 +684,34 @@ void main_mkfs(int argc, char *argv[])
 	build_sb(sdp, uuid);
 	error = build_jindex(sdp);
 	if (error) {
-		/* Translators: "jindex" is the name of a special file */
-		perror(_("Error building 'jindex'"));
+		fprintf(stderr, _("Error building '%s': %s\n"), "jindex", strerror(errno));
 		exit(EXIT_FAILURE);
 	}
 	error = build_per_node(sdp);
 	if (error) {
-		/* Translators: "per-node" is the name of a special directory */
-		perror(_("Error building per-node directory"));
+		fprintf(stderr, _("Error building '%s': %s\n"), "per_node", strerror(errno));
 		exit(EXIT_FAILURE);
 	}
 	error = build_inum(sdp);
 	if (error) {
-		/* Translators: "inum" here is the name of a special file */
-		perror(_("Error building 'inum'"));
+		fprintf(stderr, _("Error building '%s': %s\n"), "inum", strerror(errno));
 		exit(EXIT_FAILURE);
 	}
 	gfs2_lookupi(sdp->master_dir, "inum", 4, &sdp->md.inum);
 	error = build_statfs(sdp);
 	if (error) {
-		/* Translators: "statfs" is the name of a special file */
-		perror(_("Error building 'statfs'"));
+		fprintf(stderr, _("Error building '%s': %s\n"), "statfs", strerror(errno));
 		exit(EXIT_FAILURE);
 	}
 	gfs2_lookupi(sdp->master_dir, "statfs", 6, &sdp->md.statfs);
 	error = build_rindex(sdp);
 	if (error) {
-		/* Translators: "rindex" is the name of a special file */
-		perror(_("Error building 'rindex'"));
+		fprintf(stderr, _("Error building '%s': %s\n"), "rindex", strerror(errno));
 		exit(EXIT_FAILURE);
 	}
 	error = build_quota(sdp);
 	if (error) {
-		/* Translators: "quota" is the name of a special file */
-		perror(_("Error building 'quota'"));
+		fprintf(stderr, _("Error building '%s': %s\n"), "quota", strerror(errno));
 		exit(EXIT_FAILURE);
 	}
 


More information about the cluster-commits mailing list