summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2011-10-05 01:00:30 -0400
committerTheodore Ts'o <tytso@mit.edu>2011-10-05 01:00:30 -0400
commit9d4507c5b61007df968638623aa1b4c47dae6cf9 (patch)
tree85c8c384ab772fa9e5efb039385714af96d171be
parent4259052093da329907e255b11bf3e799872828c7 (diff)
downloade2fsprogs-9d4507c5b61007df968638623aa1b4c47dae6cf9.tar.gz
Pass the gettext() function to libcom_err
For those e2fsprogs programs which use libcom_err and are internationalized, pass the gettext() function to libcom_err during program initialization. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--e2fsck/unix.c1
-rw-r--r--misc/badblocks.c1
-rw-r--r--misc/chattr.c1
-rw-r--r--misc/dumpe2fs.c1
-rw-r--r--misc/e2image.c1
-rw-r--r--misc/e2initrd_helper.c1
-rw-r--r--misc/e2undo.c1
-rw-r--r--misc/findsuper.c1
-rw-r--r--misc/lsattr.c1
-rw-r--r--misc/mke2fs.c1
-rw-r--r--misc/partinfo.c1
-rw-r--r--misc/tune2fs.c1
-rw-r--r--misc/uuidgen.c1
-rw-r--r--resize/main.c1
14 files changed, 14 insertions, 0 deletions
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index c95caddf..2f4c232a 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1120,6 +1120,7 @@ int main (int argc, char *argv[])
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
my_ver = ext2fs_parse_version_string(my_ver_string);
lib_ver = ext2fs_get_library_version(0, &lib_ver_date);
diff --git a/misc/badblocks.c b/misc/badblocks.c
index 168d93e6..57882416 100644
--- a/misc/badblocks.c
+++ b/misc/badblocks.c
@@ -1056,6 +1056,7 @@ int main (int argc, char ** argv)
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
srandom((unsigned int)time(NULL)); /* simple randomness is enough */
test_func = test_ro;
diff --git a/misc/chattr.c b/misc/chattr.c
index 69aaed1c..8a2d61f9 100644
--- a/misc/chattr.c
+++ b/misc/chattr.c
@@ -301,6 +301,7 @@ int main (int argc, char ** argv)
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
if (argc && *argv)
program_name = *argv;
diff --git a/misc/dumpe2fs.c b/misc/dumpe2fs.c
index df241c21..5b114e96 100644
--- a/misc/dumpe2fs.c
+++ b/misc/dumpe2fs.c
@@ -507,6 +507,7 @@ int main (int argc, char ** argv)
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
add_error_table(&et_ext2_error_table);
fprintf (stderr, "dumpe2fs %s (%s)\n", E2FSPROGS_VERSION,
diff --git a/misc/e2image.c b/misc/e2image.c
index 4cd834af..c108a7a2 100644
--- a/misc/e2image.c
+++ b/misc/e2image.c
@@ -1236,6 +1236,7 @@ int main (int argc, char ** argv)
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
fprintf (stderr, "e2image %s (%s)\n", E2FSPROGS_VERSION,
E2FSPROGS_DATE);
diff --git a/misc/e2initrd_helper.c b/misc/e2initrd_helper.c
index c98a07a2..b2f39bc4 100644
--- a/misc/e2initrd_helper.c
+++ b/misc/e2initrd_helper.c
@@ -306,6 +306,7 @@ static void PRS(int argc, char **argv)
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
while ((c = getopt(argc, argv, "rv")) != EOF) {
diff --git a/misc/e2undo.c b/misc/e2undo.c
index c968f912..f97ddc2f 100644
--- a/misc/e2undo.c
+++ b/misc/e2undo.c
@@ -135,6 +135,7 @@ int main(int argc, char *argv[])
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
add_error_table(&et_ext2_error_table);
diff --git a/misc/findsuper.c b/misc/findsuper.c
index e3baf2e0..6b5e16fc 100644
--- a/misc/findsuper.c
+++ b/misc/findsuper.c
@@ -131,6 +131,7 @@ int main(int argc, char *argv[])
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
while ((c = getopt (argc, argv, "j")) != EOF) {
diff --git a/misc/lsattr.c b/misc/lsattr.c
index 1f55db31..e5e59690 100644
--- a/misc/lsattr.c
+++ b/misc/lsattr.c
@@ -167,6 +167,7 @@ int main (int argc, char ** argv)
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
if (argc && *argv)
program_name = *argv;
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index c439e37d..b33ad602 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -2211,6 +2211,7 @@ int main (int argc, char *argv[])
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
PRS(argc, argv);
diff --git a/misc/partinfo.c b/misc/partinfo.c
index 49660744..c461e801 100644
--- a/misc/partinfo.c
+++ b/misc/partinfo.c
@@ -35,6 +35,7 @@ int main(int argc, char **argv)
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
if (argc == 1) {
fprintf(stderr, _("Usage: %s device...\n\nPrints out the "
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 88e814b4..36368fb9 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1852,6 +1852,7 @@ int main(int argc, char **argv)
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
if (argc && *argv)
program_name = *argv;
diff --git a/misc/uuidgen.c b/misc/uuidgen.c
index f181d193..1dbac8c6 100644
--- a/misc/uuidgen.c
+++ b/misc/uuidgen.c
@@ -46,6 +46,7 @@ main (int argc, char *argv[])
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
while ((c = getopt (argc, argv, "tr")) != EOF)
diff --git a/resize/main.c b/resize/main.c
index 659a9234..e6e9e7bd 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -181,6 +181,7 @@ int main (int argc, char ** argv)
setlocale(LC_CTYPE, "");
bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
textdomain(NLS_CAT_NAME);
+ set_com_err_gettext(gettext);
#endif
add_error_table(&et_ext2_error_table);