summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am2
-rw-r--r--comsat/action.c30
-rw-r--r--comsat/cfg.c16
-rw-r--r--comsat/comsat.c57
-rw-r--r--comsat/comsat.h11
-rw-r--r--configure.ac14
-rw-r--r--frm/frm.c50
-rw-r--r--mail/alias.c12
-rw-r--r--mail/alt.c14
-rw-r--r--mail/cd.c8
-rw-r--r--mail/copy.c12
-rw-r--r--mail/decode.c18
-rw-r--r--mail/delete.c12
-rw-r--r--mail/dp.c8
-rw-r--r--mail/echo.c8
-rw-r--r--mail/edit.c8
-rw-r--r--mail/eq.c8
-rw-r--r--mail/exit.c8
-rw-r--r--mail/file.c18
-rw-r--r--mail/folders.c12
-rw-r--r--mail/followup.c14
-rw-r--r--mail/from.c8
-rw-r--r--mail/headers.c8
-rw-r--r--mail/help.c8
-rw-r--r--mail/hold.c8
-rw-r--r--mail/if.c25
-rw-r--r--mail/inc.c14
-rw-r--r--mail/list.c8
-rw-r--r--mail/mail.c112
-rw-r--r--mail/mail.h14
-rw-r--r--mail/mailline.c20
-rw-r--r--mail/mbox.c8
-rw-r--r--mail/next.c10
-rw-r--r--mail/pipe.c8
-rw-r--r--mail/previous.c10
-rw-r--r--mail/print.c12
-rw-r--r--mail/quit.c14
-rw-r--r--mail/reply.c18
-rw-r--r--mail/retain.c14
-rw-r--r--mail/save.c8
-rw-r--r--mail/send.c34
-rw-r--r--mail/set.c8
-rw-r--r--mail/setenv.c8
-rw-r--r--mail/shell.c8
-rw-r--r--mail/size.c8
-rw-r--r--mail/source.c14
-rw-r--r--mail/summary.c18
-rw-r--r--mail/table.c8
-rw-r--r--mail/tag.c8
-rw-r--r--mail/top.c8
-rw-r--r--mail/touch.c8
-rw-r--r--mail/unalias.c12
-rw-r--r--mail/undelete.c8
-rw-r--r--mail/unset.c8
-rw-r--r--mail/util.c46
-rw-r--r--mail/var.c48
-rw-r--r--mail/version.c9
-rw-r--r--mail/visual.c8
-rw-r--r--mail/write.c12
-rw-r--r--mail/z.c25
-rw-r--r--mailbox/Makefile.am10
-rw-r--r--messages/messages.c32
-rw-r--r--pop3d/apop.c22
-rw-r--r--pop3d/extra.c24
-rw-r--r--pop3d/lock.c12
-rw-r--r--pop3d/pop3d.c32
-rw-r--r--pop3d/pop3d.h11
-rw-r--r--pop3d/popauth.c95
-rw-r--r--pop3d/quit.c14
-rw-r--r--pop3d/user.c23
-rw-r--r--readmsg/msglist.c8
-rw-r--r--readmsg/readmsg.c34
-rw-r--r--readmsg/readmsg.h5
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 <mailutils/stream.h>
#include <mailutils/mu_auth.h>
#include <mailutils/argcv.h>
+#include <mailutils/nls.h>
#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 <mailutils/registrar.h>
#include <mailutils/stream.h>
#include <mailutils/url.h>
+#include <mailutils/nls.h>
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 debuggi