summaryrefslogtreecommitdiff
path: root/misc/lsattr.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2000-02-08 00:47:55 +0000
committerTheodore Ts'o <tytso@mit.edu>2000-02-08 00:47:55 +0000
commitd9c56d3ca0bee11e3446ff7e12e3124d28e298a7 (patch)
tree24305bb280a265ca959b23c265f71cb38c78a224 /misc/lsattr.c
parent0c4a07264e55b42c6e30230e66b1dea7d4b94ea9 (diff)
downloade2fsprogs-d9c56d3ca0bee11e3446ff7e12e3124d28e298a7.tar.gz
Many files:
badblocks.c, chattr.c, dumpe2fs.c, e2label.c, findsuper.c, fsck.c, get_device_by_label.c, lsattr.c, mke2fs.c, mklost+found.c, nls-enable.h, partinfo.c, tune2fs.c, uuidgen.c: Add Internationalization support as suggested by Marco d'Itri <md@linux.it>.
Diffstat (limited to 'misc/lsattr.c')
-rw-r--r--misc/lsattr.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/misc/lsattr.c b/misc/lsattr.c
index afc882c8..4011d628 100644
--- a/misc/lsattr.c
+++ b/misc/lsattr.c
@@ -41,6 +41,7 @@ extern char *optarg;
#include "e2p/e2p.h"
#include "../version.h"
+#include "nls-enable.h"
const char * program_name = "lsattr";
@@ -53,7 +54,7 @@ int v_opt = 0;
static void usage(void)
{
- fprintf(stderr, "Usage: %s [-RVadlv] [files...]\n", program_name);
+ fprintf(stderr, _("Usage: %s [-RVadlv] [files...]\n"), program_name);
exit(1);
}
@@ -63,10 +64,10 @@ static void list_attributes (const char * name)
unsigned long version;
if (fgetflags (name, &flags) == -1)
- com_err (program_name, errno, "While reading flags on %s",
+ com_err (program_name, errno, _("While reading flags on %s"),
name);
else if (fgetversion (name, &version) == -1)
- com_err (program_name, errno, "While reading version on %s",
+ com_err (program_name, errno, _("While reading version on %s"),
name);
else
{
@@ -84,7 +85,7 @@ static void lsattr_args (const char * name)
struct stat st;
if (lstat (name, &st) == -1)
- com_err (program_name, errno, "while stating %s", name);
+ com_err (program_name, errno, _("while stating %s"), name);
else
{
if (S_ISDIR(st.st_mode) && !d_opt)
@@ -126,6 +127,11 @@ int main (int argc, char ** argv)
int c;
int i;
+#ifdef ENABLE_NLS
+ setlocale(LC_MESSAGES, "");
+ bindtextdomain(NLS_CAT_NAME, LOCALEDIR);
+ textdomain(NLS_CAT_NAME);
+#endif
if (argc && *argv)
program_name = *argv;
while ((c = getopt (argc, argv, "RVadlv")) != EOF)
@@ -154,7 +160,7 @@ int main (int argc, char ** argv)
}
if (verbose)
- fprintf (stderr, "lsattr %s, %s for EXT2 FS %s, %s\n",
+ fprintf (stderr, _("lsattr %s, %s for EXT2 FS %s, %s\n"),
E2FSPROGS_VERSION, E2FSPROGS_DATE,
EXT2FS_VERSION, EXT2FS_DATE);
if (optind > argc - 1)