From 7eda085c41faa3445b4b168ce78ab18dab87d98a Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 7 Dec 2006 00:25:39 +0100 Subject: Imported from util-linux-2.9v tarball. --- disk-utils/mkfs.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'disk-utils/mkfs.c') diff --git a/disk-utils/mkfs.c b/disk-utils/mkfs.c index ba293e939..9ea27a504 100644 --- a/disk-utils/mkfs.c +++ b/disk-utils/mkfs.c @@ -10,6 +10,9 @@ * * Mon Jul 1 18:52:58 1996: janl@math.uio.no (Nicolai Langfeldt): * Incorporated fix by Jonathan Kamens + * 1999-02-22 Arkadiusz Mi¶kiewicz + * - added Native Language Support + * */ @@ -19,9 +22,10 @@ #include #include #include +#include "nls.h" - -#define VERSION "1.10" +#include "../version.h" +#define VERSION UTIL_LINUX_VERSION #ifndef DEFAULT_FSTYPE # define DEFAULT_FSTYPE "ext2" @@ -38,6 +42,10 @@ int main(int argc, char *argv[]) int i, more = 0, verbose = 0; char *oldpath, *newpath; + setlocale(LC_ALL, ""); + bindtextdomain(PACKAGE, LOCALEDIR); + textdomain(PACKAGE); + /* Check commandline options. */ opterr = 0; while ((more == 0) && ((i = getopt(argc, argv, "Vt:")) != EOF)) @@ -55,7 +63,7 @@ int main(int argc, char *argv[]) } if (optind == argc) { fprintf(stderr, - "Usage: mkfs [-V] [-t fstype] [fs-options] device [size]\n"); + _("Usage: mkfs [-V] [-t fstype] [fs-options] device [size]\n")); return -1; } @@ -69,7 +77,7 @@ int main(int argc, char *argv[]) oldpath = "/bin"; newpath = (char *) malloc(strlen(oldpath) + sizeof(SEARCH_PATH) + 2); if (!newpath) { - fputs("mkfs: out of memory\n", stderr); + fprintf(stderr, _("%s: Out of memory!\n"), "mkfs"); exit(1); } sprintf(newpath, "%s:%s\n", SEARCH_PATH, oldpath); @@ -78,7 +86,7 @@ int main(int argc, char *argv[]) argv[--optind] = progname; if (verbose) { - puts("mkfs version " VERSION " (" __DATE__ ")"); + puts(_("mkfs version " VERSION " (" __DATE__ ")")); i = optind; while (argv[i]) printf("%s ", argv[i++]); -- cgit v1.2.3-55-g7522