From e7e50f768f6cb99795f2252255d6b92154481804 Mon Sep 17 00:00:00 2001 From: Wojciech Polak Date: Mon, 23 Dec 2002 22:01:35 +0000 Subject: Added initial NLS support --- Makefile.am | 2 +- comsat/action.c | 30 +++++++------- comsat/cfg.c | 16 ++++---- comsat/comsat.c | 57 +++++++++++++------------- comsat/comsat.h | 11 +++--- configure.ac | 14 +++++-- frm/frm.c | 50 ++++++++++++----------- mail/alias.c | 12 +++--- mail/alt.c | 14 +++---- mail/cd.c | 8 ++-- mail/copy.c | 12 +++--- mail/decode.c | 18 ++++----- mail/delete.c | 12 +++--- mail/dp.c | 8 ++-- mail/echo.c | 8 ++-- mail/edit.c | 8 ++-- mail/eq.c | 8 ++-- mail/exit.c | 8 ++-- mail/file.c | 18 ++++----- mail/folders.c | 12 +++--- mail/followup.c | 14 +++---- mail/from.c | 8 ++-- mail/headers.c | 8 ++-- mail/help.c | 8 ++-- mail/hold.c | 8 ++-- mail/if.c | 25 ++++++------ mail/inc.c | 14 +++---- mail/list.c | 8 ++-- mail/mail.c | 112 ++++++++++++++++++++++++++-------------------------- mail/mail.h | 14 +++---- mail/mailline.c | 20 +++++----- mail/mbox.c | 8 ++-- mail/next.c | 10 ++--- mail/pipe.c | 8 ++-- mail/previous.c | 10 ++--- mail/print.c | 12 +++--- mail/quit.c | 14 +++---- mail/reply.c | 18 ++++----- mail/retain.c | 14 +++---- mail/save.c | 8 ++-- mail/send.c | 34 ++++++++-------- mail/set.c | 8 ++-- mail/setenv.c | 8 ++-- mail/shell.c | 8 ++-- mail/size.c | 8 ++-- mail/source.c | 14 +++---- mail/summary.c | 18 ++++----- mail/table.c | 8 ++-- mail/tag.c | 8 ++-- mail/top.c | 8 ++-- mail/touch.c | 8 ++-- mail/unalias.c | 12 +++--- mail/undelete.c | 8 ++-- mail/unset.c | 8 ++-- mail/util.c | 46 ++++++++++----------- mail/var.c | 48 +++++++++++----------- mail/version.c | 9 +++-- mail/visual.c | 8 ++-- mail/write.c | 12 +++--- mail/z.c | 25 ++++++------ mailbox/Makefile.am | 10 +++-- messages/messages.c | 32 ++++++++------- pop3d/apop.c | 22 +++++------ pop3d/extra.c | 24 +++++------ pop3d/lock.c | 12 +++--- pop3d/pop3d.c | 32 +++++++-------- pop3d/pop3d.h | 11 +++--- pop3d/popauth.c | 95 +++++++++++++++++++++++--------------------- pop3d/quit.c | 14 +++---- pop3d/user.c | 23 +++++------ readmsg/msglist.c | 8 ++-- readmsg/readmsg.c | 34 +++++++++------- readmsg/readmsg.h | 5 ++- 73 files changed, 661 insertions(+), 634 deletions(-) diff --git a/Makefile.am b/Makefile.am index c09b9048e..3bf283dd1 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = gnu 1.7.1 readme-alpha std-options ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = include m4 lib testsuite mailbox libsieve examples doc \ +SUBDIRS = include m4 intl po lib testsuite mailbox libsieve examples doc \ auth frm from pop3d imap4d \ mail sieve scripts libmu_scm guimb messages comsat readmsg \ mail.local mail.remote dotlock mh diff --git a/comsat/action.c b/comsat/action.c index 6abbda31b..2c51b209b 100644 --- a/comsat/action.c +++ b/comsat/action.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. */ #include "comsat.h" @@ -277,27 +277,27 @@ action_exec (FILE *tty, int line, int argc, char **argv) if (argc == 0) { - syslog (LOG_ERR, "%s:.biffrc:%d: No arguments for exec", username, line); + syslog (LOG_ERR, _("%s:.biffrc:%d: No arguments for exec"), username, line); return; } if (argv[0][0] != '/') { - syslog (LOG_ERR, "%s:.biffrc:%d: Not an absolute pathname", + syslog (LOG_ERR, _("%s:.biffrc:%d: Not an absolute pathname"), username, line); return; } if (stat (argv[0], &stb)) { - syslog (LOG_ERR, "%s:.biffrc:%d: can't stat %s: %s", + syslog (LOG_ERR, _("%s:.biffrc:%d: can't stat %s: %s"), username, line, argv[0], strerror (errno)); return; } if (stb.st_mode & (S_ISUID|S_ISGID)) { - syslog (LOG_ERR, "%s:.biffrc:%d: won't execute set[ug]id programs", + syslog (LOG_ERR, _("%s:.biffrc:%d: won't execute set[ug]id programs"), username, line); return; } @@ -311,7 +311,7 @@ action_exec (FILE *tty, int line, int argc, char **argv) dup2 (fileno (tty), 2); fclose (tty); execv (argv[0], argv); - syslog (LOG_ERR, "can't execute %s: %s", argv[0], strerror (errno)); + syslog (LOG_ERR, _("can't execute %s: %s"), argv[0], strerror (errno)); exit (0); } } @@ -329,14 +329,14 @@ open_rc (const char *filename, FILE *tty) { if (stb.st_uid != pw->pw_uid) { - syslog (LOG_NOTICE, "%s's %s is not owned by %s", + syslog (LOG_NOTICE, _("%s's %s is not owned by %s"), username, filename, username); return NULL; } if ((stb.st_mode & 0777) != 0600) { - fprintf (tty, "Warning: your .biffrc has wrong permissions\r\n"); - syslog (LOG_NOTICE, "%s's %s has wrong permissions", + fprintf (tty, _("Warning: your .biffrc has wrong permissions\r\n")); + syslog (LOG_NOTICE, _("%s's %s has wrong permissions"), username, filename); return NULL; } @@ -393,8 +393,8 @@ run_user_action (FILE *tty, const char *cr, message_t msg) } else { - fprintf (tty, ".biffrc:%d: unknown keyword\r\n", line); - syslog (LOG_ERR, "%s:.biffrc:%d: unknown keyword %s", + fprintf (tty, _(".biffrc:%d: unknown keyword\r\n"), line); + syslog (LOG_ERR, _("%s:.biffrc:%d: unknown keyword %s"), username, line, argv[0]); break; } diff --git a/comsat/cfg.c b/comsat/cfg.c index ea97d9e90..b78e23d19 100644 --- a/comsat/cfg.c +++ b/comsat/cfg.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1998,2001 Free Software Foundation, Inc. +/* Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc. This file is part of GNU Inetutils. @@ -111,7 +111,7 @@ netdef_parse (char *str) netdef = malloc (sizeof *netdef); if (!netdef) { - syslog (LOG_ERR, "out of memory"); + syslog (LOG_ERR, _("out of memory")); exit (1); } @@ -136,7 +136,7 @@ read_config (const char *config_file) fp = fopen (config_file, "r"); if (!fp) { - syslog (LOG_ERR, "can't open config file %s: %m", config_file); + syslog (LOG_ERR, _("can't open config file %s: %m"), config_file); return; } @@ -163,7 +163,7 @@ read_config (const char *config_file) argcv_get (ptr, "", NULL, &argc, &argv); if (argc < 2) { - syslog (LOG_ERR, "%s:%d: too few fields", config_file, line); + syslog (LOG_ERR, _("%s:%d: too few fields"), config_file, line); argcv_free (argc, argv); continue; } @@ -175,7 +175,7 @@ read_config (const char *config_file) else if (strcmp (argv[1], "no") == 0) allow_biffrc = 0; else - syslog (LOG_ERR, "%s:%d: yes or no expected", config_file, line); + syslog (LOG_ERR, _("%s:%d: yes or no expected"), config_file, line); } else if (strcmp (argv[0], "max-requests") == 0) maxrequests = strtoul (argv[1], NULL, 0); @@ -195,7 +195,7 @@ read_config (const char *config_file) action = ACT_DENY; else { - syslog (LOG_ERR, "%s:%d: unknown keyword", config_file, line); + syslog (LOG_ERR, _("%s:%d: unknown keyword"), config_file, line); argcv_free (argc, argv); continue; } @@ -206,7 +206,7 @@ read_config (const char *config_file) netdef_t *cur = netdef_parse (argv[i]); if (!cur) { - syslog (LOG_ERR, "%s:%d: can't parse netdef: %s", + syslog (LOG_ERR, _("%s:%d: can't parse netdef: %s"), config_file, line, argv[i]); continue; } @@ -222,7 +222,7 @@ read_config (const char *config_file) acl = malloc (sizeof *acl); if (!acl) { - syslog (LOG_CRIT, "out of memory"); + syslog (LOG_CRIT, _("out of memory")); exit (1); } acl->next = NULL; diff --git a/comsat/comsat.c b/comsat/comsat.c index 9932ee761..b68728778 100644 --- a/comsat/comsat.c +++ b/comsat/comsat.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. */ #include "comsat.h" @@ -55,7 +55,7 @@ static char doc[] = "GNU comsatd"; static struct argp_option options[] = { - {"config", 'c', "FILE", 0, "Read configuration from FILE", 0}, + {"config", 'c', "FILE", 0, N_("Read configuration from FILE"), 0}, { NULL, 0, NULL, 0, NULL, 0 } }; @@ -136,12 +136,15 @@ main(int argc, char **argv) { int c; + /* Native Language Support */ + mu_init_nls (); + mu_argp_parse (&argp, &argc, &argv, 0, comsat_argp_capa, NULL, &daemon_param); if (daemon_param.timeout > 0 && daemon_param.mode == MODE_DAEMON) { - fprintf (stderr, "--timeout and --daemon are incompatible\n"); + fprintf (stderr, _("--timeout and --daemon are incompatible\n")); exit (EXIT_FAILURE); } @@ -175,10 +178,10 @@ main(int argc, char **argv) static RETSIGTYPE sig_hup (int sig) { - syslog (LOG_NOTICE, "restarting"); + syslog (LOG_NOTICE, _("restarting")); if (xargv[0][0] != '/') - syslog (LOG_ERR, "can't restart: not started with absolute pathname"); + syslog (LOG_ERR, _("can't restart: not started with absolute pathname")); else execvp (xargv[0], xargv); @@ -212,7 +215,7 @@ comsat_daemon_init (void) first three one, in, out, err. Do not do the chdir("/"). */ if (daemon (1, 0) < 0) { - perror ("failed to become a daemon:"); + perror (_("failed to become a daemon:")); exit (EXIT_FAILURE); } } @@ -256,7 +259,7 @@ comsat_daemon (int port) exit (1); } - syslog (LOG_NOTICE, "GNU comsat started"); + syslog (LOG_NOTICE, _("GNU comsat started")); last_request_time = last_overflow_time = time (NULL); while (1) @@ -283,7 +286,7 @@ comsat_daemon (int port) unsigned delay; delay = overflow_delay_time << (overflow_count + 1); - syslog (LOG_NOTICE, "too many requests: pausing for %u seconds", + syslog (LOG_NOTICE, _("too many requests: pausing for %u seconds"), delay); sleep (delay); reqcount = 0; @@ -336,12 +339,12 @@ comsat_main (int fd) if (acl_match (&sin_from)) { - syslog (LOG_ALERT, "DENIED attempt to connect from %s", + syslog (LOG_ALERT, _("DENIED attempt to connect from %s"), inet_ntoa (sin_from.sin_addr)); return 1; } - syslog (LOG_INFO, "%d bytes from %s", rdlen, inet_ntoa (sin_from.sin_addr)); + syslog (LOG_INFO, _("%d bytes from %s"), rdlen, inet_ntoa (sin_from.sin_addr)); buffer[rdlen] = 0; @@ -349,7 +352,7 @@ comsat_main (int fd) p = strchr (buffer, '@'); if (!p) { - syslog (LOG_ERR, "malformed input: %s", buffer); + syslog (LOG_ERR, _("malformed input: %s"), buffer); return 1; } *p++ = 0; @@ -364,7 +367,7 @@ comsat_main (int fd) break; default: if (!isspace (*endp)) - syslog (LOG_ERR, "malformed input: %s@%s (near %s)", buffer, p, endp); + syslog (LOG_ERR, _("malformed input: %s@%s (near %s)"), buffer, p, endp); } if (find_user (buffer, tty) != SUCCESS) @@ -429,7 +432,7 @@ notify_user (const char *user, const char *device, const char *path, off_t offse change_user (user); if ((fp = fopen (device, "w")) == NULL) { - syslog (LOG_ERR, "can't open device %s: %m", device); + syslog (LOG_ERR, _("can't open device %s: %m"), device); exit (0); } @@ -445,21 +448,21 @@ notify_user (const char *user, const char *device, const char *path, off_t offse if ((status = mailbox_create (&mbox, path)) != 0 || (status = mailbox_open (mbox, MU_STREAM_READ)) != 0) { - syslog (LOG_ERR, "can't open mailbox %s: %s", + syslog (LOG_ERR, _("can't open mailbox %s: %s"), path, mu_errstring (status)); return; } if ((status = mailbox_get_stream (mbox, &stream))) { - syslog (LOG_ERR, "can't get stream for mailbox %s: %s", + syslog (LOG_ERR, _("can't get stream for mailbox %s: %s"), path, mu_errstring (status)); return; } if ((status = stream_size (stream, (off_t *) &size))) { - syslog (LOG_ERR, "can't get stream size (mailbox %s): %s", + syslog (LOG_ERR, _("can't get stream size (mailbox %s): %s"), path, mu_errstring (status)); return; } @@ -476,14 +479,14 @@ notify_user (const char *user, const char *device, const char *path, off_t offse if ((status = mailbox_create (&tmp, "/dev/null")) != 0 || (status = mailbox_open (tmp, MU_STREAM_READ)) != 0) { - syslog (LOG_ERR, "can't create temporary mailbox: %s", + syslog (LOG_ERR, _("can't create temporary mailbox: %s"), mu_errstring (status)); return; } if ((status = memory_stream_create (&stream, 0, 0))) { - syslog (LOG_ERR, "can't create temporary stream: %s", + syslog (LOG_ERR, _("can't create temporary stream: %s"), mu_errstring (status)); return; } @@ -530,7 +533,7 @@ find_user (const char *name, char *tty) if (strncmp (ftty, PATH_TTY_PFX, strlen (PATH_TTY_PFX))) { /* An attempt to break security... */ - syslog (LOG_ALERT, "bad line name in utmp record: %s", ftty); + syslog (LOG_ALERT, _("bad line name in utmp record: %s"), ftty); return NOT_HERE; } @@ -538,7 +541,7 @@ find_user (const char *name, char *tty) { if (!S_ISCHR (statb.st_mode)) { - syslog (LOG_ALERT, "not a character device: %s", ftty); + syslog (LOG_ALERT, _("not a character device: %s"), ftty); return NOT_HERE; } @@ -571,7 +574,7 @@ change_user (const char *user) pw = getpwnam (user); if (!pw) { - syslog (LOG_CRIT, "no such user: %s", user); + syslog (LOG_CRIT, _("no such user: %s"), user); exit (1); } @@ -591,7 +594,7 @@ mailbox_path (const char *user) if (!auth) { - syslog (LOG_ALERT, "user nonexistent: %s", user); + syslog (LOG_ALERT, _("user nonexistent: %s"), user); return NULL; } @@ -606,7 +609,7 @@ volatile int _st=0; void stop() { - syslog (LOG_ALERT, "waiting for debug"); + syslog (LOG_ALERT, _("waiting for debug")); while (!_st) _st=_st; } diff --git a/comsat/comsat.h b/comsat/comsat.h index 3531102b5..b60583ddb 100644 --- a/comsat/comsat.h +++ b/comsat/comsat.h @@ -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 @@ -58,6 +58,7 @@ #include #include #include +#include #ifndef INADDR_NONE # define INADDR_NONE -1 diff --git a/configure.ac b/configure.ac index aab212367..c0f6a51f5 100644 --- a/configure.ac +++ b/configure.ac @@ -2,23 +2,24 @@ # # 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. # -AC_INIT([GNU Mailutils],[0.2],[bug-mailutils@gnu.org]) +AC_INIT([GNU Mailutils], [0.2], [bug-mailutils@gnu.org], [mailutils]) AC_CONFIG_SRCDIR([mailbox/mailbox.c]) +AC_CONFIG_AUX_DIR([scripts]) AC_CANONICAL_TARGET([]) AM_INIT_AUTOMAKE AC_CONFIG_HEADERS([config.h]) @@ -34,6 +35,10 @@ AM_PROG_LIBTOOL AC_PROG_YACC AM_PROG_LEX +dnl Internationalization macros. +AM_GNU_GETTEXT +AM_GNU_GETTEXT_VERSION(0.11.5) + dnl Check for libraries AC_CHECK_LIB(resolv, res_query) LTDL_LIB= @@ -588,6 +593,7 @@ dnl Output Makefiles AC_CONFIG_FILES([Makefile mailutils.spec include/Makefile include/mailutils/Makefile include/mailutils/gnu/Makefile m4/Makefile + intl/Makefile po/Makefile.in doc/Makefile doc/man/Makefile doc/rfc/Makefile doc/texinfo/Makefile lib/Makefile lib/posix/Makefile testsuite/Makefile diff --git a/frm/frm.c b/frm/frm.c index 89854ec9c..b3828088a 100644 --- a/frm/frm.c +++ b/frm/frm.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 @@ -38,6 +38,7 @@ #include #include #include +#include static char* show_field; static int show_to; @@ -60,19 +61,19 @@ static int selected; static int action (observer_t, size_t); const char *argp_program_version = "frm (" PACKAGE_STRING ")"; -static char doc[] = "GNU frm -- display From: lines"; +static char doc[] = N_("GNU frm -- display From: lines"); static struct argp_option options[] = { - {"debug", 'd', NULL, 0, "Enable debugging output", 0}, - {"field", 'f', "NAME", 0, "Header field to display", 0}, - {"to", 'l', NULL, 0, "Include the To: information", 0}, - {"number", 'n', NULL, 0, "Display message numbers", 0}, - {"Quiet", 'Q', NULL, 0, "Very quiet", 0}, - {"query", 'q', NULL, 0, "Print a message if unread mail", 0}, - {"summary",'S', NULL, 0, "Print a summary of messages", 0}, + {"debug", 'd', NULL, 0, N_("Enable debugging output"), 0}, + {"field", 'f', "NAME", 0, N_("Header field to display"), 0}, + {"to", 'l', NULL, 0, N_("Include the To: information"), 0}, + {"number", 'n', NULL, 0, N_("Display message numbers"), 0}, + {"Quiet", 'Q', NULL, 0, N_("Very quiet"), 0}, + {"query", 'q', NULL, 0, N_("Print a message if unread mail"), 0}, + {"summary",'S', NULL, 0, N_("Print a summary of messages"), 0}, {"status", 's', "[nor]",0, - "Select message with the specific attribute: [n]ew, [r]ead, [u]nread.", 0 }, - {"align", 't', NULL, 0, "Try to align", 0}, + N_("Select message with the specific attribute: [n]ew, [r]ead, [u]nread."), 0 }, + {"align", 't', NULL, 0, N_("Try to align"), 0}, {0, 0, 0, 0} }; @@ -105,7 +106,7 @@ parse_opt (int key, char *arg, struct argp_state *state) be_quiet += 2; if (freopen("/dev/null", "w", stdout) == NULL) { - perror ("Can not be very quiet"); + perror (_("Can not be very quiet")); exit (3); } break; @@ -301,7 +302,10 @@ main(int argc, char **argv) size_t total = 0; int c; int status = 0; - + + /* Native Language Support */ + mu_init_nls (); + mu_argp_parse (&argp, &argc, &argv, 0, frm_argp_capa, &c, NULL); /* have an argument */ @@ -331,8 +335,8 @@ main(int argc, char **argv) if (status != 0) { - fprintf (stderr, "could not create mailbox <%s>: %s\n", - mailbox_name ? mailbox_name : "default", + fprintf (stderr, _("could not create mailbox <%s>: %s\n"), + mailbox_name ? mailbox_name : _("default"), mu_errstring(status)); exit (3); } @@ -355,7 +359,7 @@ main(int argc, char **argv) goto cleanup1; else { - fprintf (stderr, "could not open mailbox %s: %s\n", + fprintf (stderr, _("could not open mailbox %s: %s\n"), url_to_string (url), mu_errstring(status)); @@ -378,7 +382,7 @@ main(int argc, char **argv) url_t url = NULL; mailbox_get_url (mbox, &url); - fprintf (stderr, "could not scan mailbox <%s>: %s\n", + fprintf (stderr, _("could not scan mailbox <%s>: %s\n"), url_to_string (url), mu_errstring(status)); goto cleanup; @@ -399,9 +403,9 @@ cleanup: cleanup1: if (show_summary) - printf ("You have %d messages\n", total); + printf (_("You have %d messages\n"), total); if (show_query && have_new_mail) - printf ("You have new mail\n"); + printf (_("You have new mail\n")); /* 0 - selected messages discover. 1 - have messages. diff --git a/mail/alias.c b/mail/alias.c index 8756f7043..9e6d7805f 100644 --- a/mail/alias.c +++ b/mail/alias.c @@ -1,18 +1,18 @@ -/* GNU mailutils - a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* GNU Mailutils -- a suite of utilities for electronic mail + Copyright (C) 1999, 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. */ #include "mail.h" @@ -191,7 +191,7 @@ alias_print(char *name) if (!alias_lookup(name, &list)) { - util_error("\"%s\": not a group", name); + util_error(_("\"%s\": not a group"), name); return; } alias_print_group(name, list); diff --git a/mail/alt.c b/mail/alt.c index 5557c16e1..aab161192 100644 --- a/mail/alt.c +++ b/mail/alt.c @@ -1,18 +1,18 @@ -/* GNU mailutils - a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* GNU Mailutils -- a suite of utilities for electronic mail + Copyright (C) 1999, 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. */ #include "mail.h" @@ -60,7 +60,7 @@ mail_set_my_name (char *name) struct passwd *pw = getpwuid (getuid ()); if (!pw) { - util_error ("can't determine my username"); + util_error (_("can't determine my username")); exit (1); } name = pw->pw_name; @@ -69,7 +69,7 @@ mail_set_my_name (char *name) my_email = mu_get_user_email (name); if (!my_email) { - util_error("can't determine my email address: %s", mu_errstring (errno)); + util_error(_("can't determine my email address: %s"), mu_errstring (errno)); exit (1); } } diff --git a/mail/cd.c b/mail/cd.c index 6f53e0434..ec2eee733 100644 --- a/mail/cd.c +++ b/mail/cd.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 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 "mail.h" diff --git a/mail/copy.c b/mail/copy.c index b21457e23..63ace3937 100644 --- a/mail/copy.c +++ b/mail/copy.c @@ -1,18 +1,18 @@ -/* GNU mailutils - a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* GNU Mailutils -- a suite of utilities for electronic mail + Copyright (C) 1999, 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. */ #include "mail.h" @@ -64,7 +64,7 @@ mail_copy0 (int argc, char **argv, int mark) if (mailbox_create_default (&mbx, filename) || mailbox_open (mbx, MU_STREAM_WRITE | MU_STREAM_CREAT)) { - util_error ("can't create mailbox %s", filename); + util_error (_("can't create mailbox %s"), filename); free (filename); msgset_free (msglist); return 1; diff --git a/mail/decode.c b/mail/decode.c index 0373b97e3..61b7244d7 100644 --- a/mail/decode.c +++ b/mail/decode.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. */ #include "mail.h" @@ -133,15 +133,15 @@ display_part_header (FILE *out, const msgset_t *msgset, fputc ('-', out); fputc ('+', out); fputc ('\n', out); - fprintf (out, "| Message=%d", msgset->msg_part[0]); + fprintf (out, _("| Message=%d"), msgset->msg_part[0]); for (i = 1; i < msgset->npart; i++) fprintf (out, "[%d", msgset->msg_part[i]); for (i = 1; i < msgset->npart; i++) fprintf (out, "]"); fprintf (out, "\n"); - fprintf (out, "| Type=%s\n", type); - fprintf (out, "| encoding=%s\n", encoding); + fprintf (out, _("| Type=%s\n"), type); + fprintf (out, _("| encoding=%s\n"), encoding); fputc ('+', out); for (i = 0; (int)i <= size; i++) fputc ('-', out); @@ -242,7 +242,7 @@ print_stream (stream_t stream, FILE *out) { if (ml_got_interrupt()) { - util_error("\nInterrupt"); + util_error(_("\nInterrupt")); break; } buffer[n] = '\0'; diff --git a/mail/delete.c b/mail/delete.c index d7a84de35..d57bb5c72 100644 --- a/mail/delete.c +++ b/mail/delete.c @@ -1,18 +1,18 @@ -/* GNU mailutils - a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* GNU Mailutils -- a suite of utilities for electronic mail + Copyright (C) 1999, 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. */ #include "mail.h" @@ -27,7 +27,7 @@ mail_delete0 (void) message_t msg; attribute_t attr; - if (util_get_message (mbox, cursor, &msg, MSG_ALL)) + if (util_get_message (mbox, cursor, &msg, MSG_NODELETED)) return 1; message_get_attribute (msg, &attr); attribute_set_deleted (attr); diff --git a/mail/dp.c b/mail/dp.c index d0b3f7cd3..72a291b02 100644 --- a/mail/dp.c +++ b/mail/dp.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, 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 "mail.h" diff --git a/mail/echo.c b/mail/echo.c index ed030a20a..80b03e785 100644 --- a/mail/echo.c +++ b/mail/echo.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, 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. */ #include "mail.h" diff --git a/mail/edit.c b/mail/edit.c index ce8d7c07e..8606d0188 100644 --- a/mail/edit.c +++ b/mail/edit.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 "mail.h" diff --git a/mail/eq.c b/mail/eq.c index 98f816486..b6609ac4f 100644 --- a/mail/eq.c +++ b/mail/eq.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, 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 "mail.h" diff --git a/mail/exit.c b/mail/exit.c index 2758f3445..cfe0560ab 100644 --- a/mail/exit.c +++ b/mail/exit.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, 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 "mail.h" diff --git a/mail/file.c b/mail/file.c index e4722bf68..e04cbd0ea 100644 --- a/mail/file.c +++ b/mail/file.c @@ -1,18 +1,18 @@ -/* GNU mailutils - a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* GNU Mailutils -- a suite of utilities for electronic mail + Copyright (C) 1999, 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. */ #include "mail.h" @@ -36,7 +36,7 @@ mail_expand_name (const char *name) { case '#': if (!prev_name) - util_error ("No previous file"); + util_error (_("No previous file")); else name = xstrdup (prev_name); break; @@ -44,7 +44,7 @@ mail_expand_name (const char *name) case '&': name = getenv ("MBOX"); if (!name) - util_error ("MBOX environment variable not set"); + util_error (_("MBOX environment variable not set")); else name = xstrdup (name); break; @@ -87,7 +87,7 @@ mail_file (int argc, char **argv) || mailbox_open (newbox, MU_STREAM_RDWR) != 0) { mailbox_destroy (&newbox); - util_error("can't open mailbox %s: %s", name, mu_errstring (errno)); + util_error(_("can't open mailbox %s: %s"), name, mu_errstring (errno)); free (name); return 1; } @@ -121,7 +121,7 @@ mail_file (int argc, char **argv) } else { - util_error("%s takes only one arg", argv[0]); + util_error(_("%s takes only one arg"), argv[0]); } return 1; } diff --git a/mail/folders.c b/mail/folders.c index 5b439f4fc..c00beda7e 100644 --- a/mail/folders.c +++ b/mail/folders.c @@ -1,18 +1,18 @@ -/* GNU mailutils - a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* GNU Mailutils -- a suite of utilities for electronic mail + Copyright (C) 1999, 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. */ #include "mail.h" @@ -36,7 +36,7 @@ mail_folders (int argc, char **argv) char *tmp = alloca (strlen (path) + 3); if (!tmp) { - util_error ("Not enough memory"); + util_error (_("Not enough memory")); return 1; } diff --git a/mail/followup.c b/mail/followup.c index a071ef910..b5c634e30 100644 --- a/mail/followup.c +++ b/mail/followup.c @@ -1,18 +1,18 @@ -/* GNU mailutils - a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* GNU Mailutils -- a suite of utilities for electronic mail + Copyright (C) 1999, 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. */ #include "mail.h" @@ -69,8 +69,8 @@ mail_followup (int argc, char **argv) msgset_free (msglist); - fprintf (ofile, "To: %s\n", compose_header_get (&env, MU_HEADER_TO, "")); - fprintf (ofile, "Subject: %s\n\n", + fprintf (ofile, _("To: %s\n"), compose_header_get (&env, MU_HEADER_TO, "")); + fprintf (ofile, _("Subject: %s\n\n"), compose_header_get (&env, MU_HEADER_SUBJECT, "")); status = mail_send0 (&env, isupper (argv[0][0])); diff --git a/mail/from.c b/mail/from.c index ae8bb85ce..ca9f93218 100644 --- a/mail/from.c +++ b/mail/from.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 "mail.h" diff --git a/mail/headers.c b/mail/headers.c index a9d5c5507..f7f6a2341 100644 --- a/mail/headers.c +++ b/mail/headers.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 "mail.h" diff --git a/mail/help.c b/mail/help.c index 087a5e3da..aaa45393e 100644 --- a/mail/help.c +++ b/mail/help.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, 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 "mail.h" diff --git a/mail/hold.c b/mail/hold.c index 60a761f8c..54f8b7e91 100644 --- a/mail/hold.c +++ b/mail/hold.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, 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 "mail.h" diff --git a/mail/if.c b/mail/if.c index ba18ce007..8384ec2d4 100644 --- a/mail/if.c +++ b/mail/if.c @@ -1,18 +1,18 @@ -/* GNU mailutils - a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* GNU Mailutils -- a suite of utilities for electronic mail + Copyright (C) 1999, 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. */ #include "mail.h" @@ -52,7 +52,7 @@ _cond_push(int val) if (!_cond_stack) { - util_error("not enough memory"); + util_error(_("not enough memory")); exit (EXIT_FAILURE); } _cond_stack[_cond_level++] = val; @@ -63,7 +63,7 @@ _cond_pop() { if (_cond_level == 0) { - util_error("internal error: condition stack underflow"); + util_error(_("internal error: condition stack underflow")); abort(); } return _cond_stack[--_cond_level]; @@ -85,13 +85,13 @@ mail_if (int argc, char **argv) if (argc != 2) { - util_error("if requires an argument: s | r | t"); + util_error(_("if requires an argument: s | r | t")); return 1; } if (argv[1][1] != 0) { - util_error("valid if arguments are: s | r | t"); + util_error(_("valid if arguments are: s | r | t")); return 1; } @@ -115,7 +115,7 @@ mail_if (int argc, char **argv) cond = interactive; break; default: - util_error("valid if arguments are: s | r | t"); + util_error(_("valid if arguments are: s | r | t")); return 1; } } @@ -131,7 +131,7 @@ mail_else (int argc, char **argv) (void)argc; (void)argv; if (_cond_level == 0) { - util_error("else without matching if"); + util_error(_("else without matching if")); return 1; } cond = _cond_pop(); @@ -147,11 +147,10 @@ mail_endif (int argc, char **argv) (void)argc; (void)argv; if (_cond_level == 0) { - util_error("endif without matching if"); + util_error(_("endif without matching if")); return 1; } _cond_pop(); return 1; } - diff --git a/mail/inc.c b/mail/inc.c index 42f9552a4..a8f1c3079 100644 --- a/mail/inc.c +++ b/mail/inc.c @@ -1,18 +1,18 @@ -/* GNU mailutils - a suite of utilities for electronic mail - Copyright (C) 1999, 2001 Free Software Foundation, Inc. +/* GNU Mailutils -- a suite of utilities for electronic mail + Copyright (C) 1999, 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. */ #include "mail.h" @@ -28,10 +28,10 @@ mail_inc (int argc, char **argv) if (!mailbox_is_updated (mbox)) { mailbox_messages_count (mbox, &total); - fprintf (ofile, "New mail has arrived\n"); + fprintf (ofile, _("New mail has arrived.\n")); } else - fprintf (ofile, "No new mail for %s\n", mail_whoami()); + fprintf (ofile, _("No new mail for %s\n"), mail_whoami()); return 0; } diff --git a/mail/list.c b/mail/list.c index 63cf63120..8e07f1176 100644 --- a/mail/list.c +++ b/mail/list.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, 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 "mail.h" diff --git a/mail/mail.c b/mail/mail.c index 3a52cc59f..cd8b02d82 100644 --- a/mail/mail.c +++ b/mail/mail.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. */ #include "mail.h" @@ -26,29 +26,29 @@ FILE *ofile; int interactive; const char *argp_program_version = "mail (" PACKAGE_STRING ")"; -static char doc[] = "GNU mail -- the standard /bin/mail interface"; -static char args_doc[] = "[address...]"; +static char doc[] = N_("GNU mail -- the standard /bin/mail interface"); +static char args_doc[] = N_("[address...]"); static struct argp_option options[] = { - {"exist", 'e', 0, 0, "Return true if mail exists", 0}, + {"exist", 'e', 0, 0, N_("Return true if mail exists"), 0}, {"file", 'f', "FILE", OPTION_ARG_OPTIONAL, - "Operate on mailbox FILE (default ~/mbox)", 0}, - {"byname", 'F', 0, 0, "Save messages according to sender", 0}, - {"headers", 'H', 0, 0, "Write a header summary and exit", 0}, - {"ignore", 'i', 0, 0, "Ignore interrupts", 0}, - {"norc", 'n', 0, 0, "Do not read the system mailrc file", 0}, - {"nosum", 'N', 0, 0, "Do not display initial header summary", 0}, - {"print", 'p', 0, 0, "Print all mail to standard output", 0}, - {"quit", 'q', 0, 0, "Cause interrupts to terminate program", 0}, - {"read", 'r', 0, 0, "Same as -p", 0}, - {"subject", 's', "SUBJ", 0, "Send a message with a Subject of SUBJ", 0}, - {"to", 't', 0, 0, "Precede message by a list of addresses", 0}, - {"user", 'u', "USER", 0, "Operate on USER's mailbox", 0}, + N_("Operate on mailbox FILE (default ~/mbox)"), 0}, + {"byname", 'F', 0, 0, N_("Save messages according to sender"), 0}, + {"headers", 'H', 0, 0, N_("Write a header summary and exit"), 0}, + {"ignore", 'i', 0, 0, N_("Ignore interrupts"), 0}, + {"norc", 'n', 0, 0, N_("Do not read the system mailrc file"), 0}, + {"nosum", 'N', 0, 0, N_("Do not display initial header summary"), 0}, + {"print", 'p', 0, 0, N_("Print all mail to standard output"), 0}, + {"quit", 'q', 0, 0, N_("Cause interrupts to terminate program"), 0}, + {"read", 'r', 0, 0, N_("Same as -p"), 0}, + {"subject", 's', "SUBJ", 0, N_("Send a message with a Subject of SUBJ"), 0}, + {"to", 't', 0, 0, N_("Precede message by a list of addresses"), 0}, + {"user", 'u', "USER", 0, N_("Operate on USER's mailbox"), 0}, {NULL, 0, NULL, OPTION_DOC, - "Note: Argument to --file (-f) option is optional. If it is present, " + N_("Note: Argument to --file (-f) option is optional. If it is present, " "it must follow the short option immediately, without any intervening " "whitespace. If it is used with the long option, it must be separated " - "from it by an equal sign, with no intervening whitespace.", 0}, + "from it by an equal sign, with no intervening whitespace."), 0}, { NULL, 0, NULL, 0, NULL, 0 } }; @@ -135,9 +135,10 @@ parse_opt (int key, char *arg, struct argp_state *state) if (args->file) { - util_error ("Usage error: --file takes an optional argument, it must follow the option\n" - "without any intervening whitespace."); - util_error ("Run mail --help for more info."); + util_error (_("Usage error: --file takes an optional argument, " + "it must follow the option\n" + "without any intervening whitespace.")); + util_error (_("Run mail --help for more info.")); util_do_command ("set quiet"); args->file = arg; } @@ -187,20 +188,20 @@ mail_cmdline(void *closure, int cont) && !mailbox_is_updated (mbox)) { mailbox_messages_count (mbox, &total); - fprintf (ofile, "New mail has arrived\n"); + fprintf (ofile, _("New mail has arrived.\n")); } rc = ml_readline (prompt); if (ml_got_interrupt()) { - util_error("Interrupt"); + util_error(_("Interrupt")); continue; } if (!rc && util_getenv (NULL, "ignoreeof", Mail_env_boolean, 0) == 0) { - util_error ("Use \"quit\" to quit."); + util_error (_("Use \"quit\" to quit.")); continue; } @@ -221,6 +222,9 @@ main (int argc, char **argv) cursor = 1; realcursor = cursor; + /* Native Language Support */ + mu_init_nls (); + /* Register the desire formats. */ { list_t bookie; @@ -350,10 +354,10 @@ main (int argc, char **argv) if (util_getenv (NULL, "quiet", Mail_env_boolean, 0)) { fprintf (ofile, - "%s, Copyright (C) 2001 Free Software Foundation, Inc.\n" + _("%s, Copyright (C) 2001 Free Software Foundation, Inc.\n" "mail is free software with ABSOLUTELY NO WARRANTY.\n" "For details type `warranty'.\n" - "Send bug reports to %s.\n", + "Send bug reports to %s.\n"), argp_program_version, argp_program_bug_address); } @@ -391,14 +395,14 @@ main (int argc, char **argv) rc = mailbox_create_default (&mbox, NULL); if (rc != 0) { - util_error ("Can not create mailbox for %s: %s", args.user, + util_error (_("Can not create mailbox for %s: %s"), args.user, mu_errstring (rc)); exit (EXIT_FAILURE); } } else if ((rc = mailbox_create_default (&mbox, args.file)) != 0) { - util_error ("Can not create mailbox %s: %s", args.file, + util_error (_("Can not create mailbox %s: %s"), args.file, mu_errstring (rc)); exit (EXIT_FAILURE); } @@ -415,7 +419,7 @@ main (int argc, char **argv) { url_t url = NULL; mailbox_get_url (mbox, &url); - util_error ("Can not open mailbox %s: %s", + util_error (_("Can not open mailbox %s: %s"), url_to_string (url), mu_errstring (rc)); exit (EXIT_FAILURE); } @@ -428,7 +432,7 @@ main (int argc, char **argv) { url_t url = NULL; mailbox_get_url (mbox, &url); - util_error ("Can not read mailbox %s: %s", + util_error (_("Can not read mailbox %s: %s"), url_to_string (url), mu_errstring (rc)); exit (EXIT_FAILURE); } @@ -446,9 +450,9 @@ main (int argc, char **argv) if (total == 0) { if