summaryrefslogtreecommitdiff
path: root/readmsg
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2002-12-23 22:01:35 +0000
committerWojciech Polak <polak@gnu.org>2002-12-23 22:01:35 +0000
commite7e50f768f6cb99795f2252255d6b92154481804 (patch)
tree8bef15dd01a015c63d61b889e433929263ad3eab /readmsg
parent348d388ccab203b02a6e058732d66081f7c2d483 (diff)
downloadmailutils-e7e50f768f6cb99795f2252255d6b92154481804.tar.gz
mailutils-e7e50f768f6cb99795f2252255d6b92154481804.tar.bz2
Added initial NLS support
Diffstat (limited to 'readmsg')
-rw-r--r--readmsg/msglist.c8
-rw-r--r--readmsg/readmsg.c34
-rw-r--r--readmsg/readmsg.h5
3 files changed, 26 insertions, 21 deletions
diff --git a/readmsg/msglist.c b/readmsg/msglist.c
index 02f5db553..10404b488 100644
--- a/readmsg/msglist.c
+++ b/readmsg/msglist.c
@@ -1,18 +1,18 @@
-/* GNU mailutils - a suite of utilities for electronic mail
+/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
- This program is distributed in the hope that it will be useful,
+ GNU Mailutils is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
+ along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "readmsg.h"
diff --git a/readmsg/readmsg.c b/readmsg/readmsg.c
index 2bf4821a5..6237cafa0 100644
--- a/readmsg/readmsg.c
+++ b/readmsg/readmsg.c
@@ -1,18 +1,18 @@
-/* GNU mailutils - a suite of utilities for electronic mail
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* GNU Mailutils -- a suite of utilities for electronic mail
+ Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
- This program is free software; you can redistribute it and/or modify
+ GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
- This program is distributed in the hope that it will be useful,
+ GNU Mailutils is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
+ along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
@@ -29,20 +29,21 @@ static void print_body __P ((message_t));
static int string_starts_with __P ((const char * s1, const char *s2));
const char *argp_program_version = "readmsg (" PACKAGE_STRING ")";
-static char doc[] = "GNU readmsg -- print messages";
+static char doc[] = N_("GNU readmsg -- print messages");
static error_t readmsg_parse_opt __P((int key, char *arg,
struct argp_state *astate));
static struct argp_option options[] =
{
- { "debug", 'd', 0, 0, "Display debugging information", 1 },
- { "header", 'h', 0, 0, "Display entire header", 1 },
- { "weedlist", 'w', "LIST", 0, "List of header names separated by whitespace or commas", 1 },
- { "folder", 'f', "FOLDER", 0, "Folder to use", 1 },
- { "no-header", 'n', 0, 0, "Exclude all headers", 1 },
- { "form-feeds", 'p', 0, 0, "Output formfeeds between messages", 1 },
+ { "debug", 'd', 0, 0, N_("Display debugging information"), 1 },
+ { "header", 'h', 0, 0, N_("Display entire header"), 1 },
+ { "weedlist", 'w', "LIST", 0,
+ N_("List of header names separated by whitespace or commas"), 1 },
+ { "folder", 'f', "FOLDER", 0, N_("Folder to use"), 1 },
+ { "no-header", 'n', 0, 0, N_("Exclude all headers"), 1 },
+ { "form-feeds", 'p', 0, 0, N_("Output formfeeds between messages"), 1 },
{ "show-all-match", 'a', NULL, 0,
- "Print all messages matching pattern, not just the first", 1 },
+ N_("Print all messages matching pattern, not just the first"), 1 },
{0, 0, 0, 0}
};
@@ -224,6 +225,9 @@ main (int argc, char **argv)
int index;
mailbox_t mbox = NULL;
+ /* Native Language Support */
+ mu_init_nls ();
+
mu_argp_parse (&argp, &argc, &argv, 0, readmsg_argp_capa, &index, NULL);
/* Registration. */
@@ -239,7 +243,7 @@ main (int argc, char **argv)
status = mailbox_create_default (&mbox, mailbox_name);
if (status != 0)
{
- fprintf (stderr, "could not create - %s\n", mu_errstring(status));
+ fprintf (stderr, _("could not create - %s\n"), mu_errstring(status));
exit (2);
}
@@ -257,7 +261,7 @@ main (int argc, char **argv)
url_t url = NULL;
mailbox_get_url (mbox, &url);
- fprintf (stderr, "can't open mailbox %s: %s\n",
+ fprintf (stderr, _("can't open mailbox %s: %s\n"),
url_to_string (url),
mu_errstring(status));
exit (2);
diff --git a/readmsg/readmsg.h b/readmsg/readmsg.h
index 0950fddae..921d677f3 100644
--- a/readmsg/readmsg.h
+++ b/readmsg/readmsg.h
@@ -1,5 +1,5 @@
-/* GNU mailutils - a suite of utilities for electronic mail
- Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+/* GNU Mailutils -- a suite of utilities for electronic mail
+ Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -39,6 +39,7 @@
#include <mailutils/registrar.h>
#include <mailutils/stream.h>
#include <mailutils/url.h>
+#include <mailutils/nls.h>
int msglist __P ((mailbox_t mbox, int show_all, int argc, char **argv, int **set, int *n));

Return to:

Send suggestions and report system problems to the System administrator.