summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2002-12-24 08:25:36 +0000
committerWojciech Polak <polak@gnu.org>2002-12-24 08:25:36 +0000
commitb944f483f908502d74f6444326ba480a9b30ffbe (patch)
tree0285bdb6587e9cc7b2b7be7c358938ba84222d4f
parent50f245bf7b022233fcce50eac36999615c8627f8 (diff)
downloadmailutils-b944f483f908502d74f6444326ba480a9b30ffbe.tar.gz
mailutils-b944f483f908502d74f6444326ba480a9b30ffbe.tar.bz2
Added NLS (guimb/imap4d/mailutils-config/sieve)
-rw-r--r--ChangeLog7
-rw-r--r--guimb/collect.c22
-rw-r--r--guimb/guimb.h11
-rw-r--r--guimb/main.c49
-rw-r--r--guimb/util.c15
-rw-r--r--imap4d/auth_gss.c18
-rw-r--r--imap4d/authenticate.c2
-rw-r--r--imap4d/bye.c27
-rw-r--r--imap4d/imap4d.c39
-rw-r--r--imap4d/imap4d.h11
-rw-r--r--imap4d/list.c12
-rw-r--r--imap4d/login.c16
-rw-r--r--imap4d/search.c16
-rw-r--r--imap4d/signal.c14
-rw-r--r--imap4d/util.c16
-rw-r--r--mailbox/mailutils-config.c22
-rw-r--r--po/POTFILES.in20
-rw-r--r--sieve/Makefile.am2
-rw-r--r--sieve/sieve.c84
19 files changed, 220 insertions, 183 deletions
diff --git a/ChangeLog b/ChangeLog
index efdd0acb1..d6bd65fe7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2002-12-24 Wojciech Polak <polak@gnu.org>
+
+ * po/POTFILES.in: Updated.
+ * imap4d/*: Added NLS.
+ * guimb/*: Likewise.
+ * sieve/sieve.c: Likewise.
+
2002-12-23 Wojciech Polak <polak@gnu.org>
* po/: New directory.
diff --git a/guimb/collect.c b/guimb/collect.c
index 640bf3262..6a5eda8b3 100644
--- a/guimb/collect.c
+++ b/guimb/collect.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 "guimb.h"
@@ -31,14 +31,14 @@ collect_open_default ()
asprintf (&default_mailbox, "%s%s", mu_path_maildir, user_name);
if (!default_mailbox)
{
- util_error ("not enough memory");
+ util_error (_("not enough memory"));
exit (1);
}
}
if (mailbox_create (&mbox, default_mailbox) != 0
|| mailbox_open (mbox, MU_STREAM_RDWR) != 0)
{
- util_error ("can't open default mailbox %s: %s",
+ util_error (_("can't open default mailbox %s: %s"),
default_mailbox, mu_errstring (errno));
exit (1);
}
@@ -82,7 +82,7 @@ collect_append_file (char *name)
fp = fopen (name, "r");
if (!fp)
{
- util_error ("can't open input file %s: %s", name, strerror (errno));
+ util_error (_("can't open input file %s: %s"), name, strerror (errno));
return -1;
}
}
@@ -110,7 +110,7 @@ collect_create_mailbox ()
if (mailbox_create (&mbox, temp_filename) != 0
|| mailbox_open (mbox, MU_STREAM_READ) != 0)
{
- util_error ("can't create temp mailbox %s: %s",
+ util_error (_("can't create temp mailbox %s: %s"),
temp_filename, strerror (errno));
unlink (temp_filename);
exit (1);
@@ -121,7 +121,7 @@ collect_create_mailbox ()
if (nmesg == 0)
{
- util_error ("input format not recognized");
+ util_error (_("input format not recognized"));
exit (1);
}
}
@@ -146,7 +146,7 @@ collect_output ()
|| mailbox_open (outbox, MU_STREAM_RDWR|MU_STREAM_CREAT) != 0)
{
mailbox_destroy (&outbox);
- fprintf (stderr, "guimb: can't open output mailbox %s: %s\n",
+ fprintf (stderr, _("guimb: can't open output mailbox %s: %s\n"),
default_mailbox, strerror (errno));
return 1;
}
diff --git a/guimb/guimb.h b/guimb/guimb.h
index 3b1ec79e8..380031858 100644
--- a/guimb/guimb.h
+++ b/guimb/guimb.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. */
#if defined(HAVE_CONFIG_H)
@@ -35,6 +35,7 @@
#include <mailutils/error.h>
#include <mailutils/address.h>
#include <mailutils/registrar.h>
+#include <mailutils/nls.h>
#include <mu_asprintf.h>
#include <libguile.h>
diff --git a/guimb/main.c b/guimb/main.c
index 9a490f152..a046e612e 100644
--- a/guimb/main.c
+++ b/guimb/main.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 "guimb.h"
@@ -42,7 +42,7 @@ append_arg (char *arg)
g_argv = realloc (g_argv, g_size * sizeof (g_argv[0]));
if (!g_argv)
{
- util_error ("not enough memory");
+ util_error (_("not enough memory"));
exit (1);
}
}
@@ -51,23 +51,23 @@ append_arg (char *arg)
static struct argp_option options[] = {
{NULL, 0, NULL, 0,
- "The following switches stop argument processing, and pass all\n"
- "remaining arguments as the value of (command-line):", 1},
- {"code", 'c', "EXPR", 0, "Execute given scheme expression.", 1},
+ N_("The following switches stop argument processing, and pass all\n"
+ "remaining arguments as the value of (command-line):"), 1},
+ {"code", 'c', "EXPR", 0, N_("Execute given scheme expression."), 1},
{"source", 's', "PROGFILE", 0,
- "Load Scheme source code from PROGFILE, and exit", 1},
+ N_("Load Scheme source code from PROGFILE, and exit"), 1},
{NULL, 0, NULL, 0,
- "The following options do not change the order of options parsing:", 2},
- {"expression", 'e', "EXPR", 0, "Execute given scheme expression.", 2},
+ N_("The following options do not change the order of options parsing:"), 2},
+ {"expression", 'e', "EXPR", 0, N_("Execute given scheme expression."), 2},
{"file", 'f', "PROGFILE", 0,
- "Load Scheme source code from PROGFILE, and exit", 2},
- {NULL, 0, NULL, 0, "Other options:", 3},
- {"debug", 'd', NULL, 0, "Start with debugging evaluator and backtraces.", 3},
+ N_("Load Scheme source code from PROGFILE, and exit"), 2},
+ {NULL, 0, NULL, 0, N_("Other options:"), 3},
+ {"debug", 'd', NULL, 0, N_("Start with debugging evaluator and backtraces."), 3},
{"guile-arg", 'g', "ARG", 0,
- "Append ARG to the command line passed to Guile", 3},
- {"mailbox", 'M', "NAME", 0, "Set default mailbox name", 3},
+ N_("Append ARG to the command line passed to Guile"), 3},
+ {"mailbox", 'M', "NAME", 0, N_("Set default mailbox name"), 3},
{"user", 'u', "NAME", OPTION_ARG_OPTIONAL,
- "Act as local MDA for user NAME", 3},
+ N_("Act as local MDA for user NAME"), 3},
{0, 0, 0, 0}
};
@@ -120,9 +120,9 @@ parse_opt (int key, char *arg, struct argp_state *state)
const char *argp_program_version = "guimb (" PACKAGE_STRING ")";
static char doc[] =
-"GNU guimb -- Process the contents of the specified mailboxes\n"
-"using a Scheme program or expression.";
-static char args_doc[] = "[mailbox...]";
+N_("GNU guimb -- Process the contents of the specified mailboxes\n"
+"using a Scheme program or expression.");
+static char args_doc[] = N_("[mailbox...]");
static struct argp argp = {
options,
@@ -146,7 +146,10 @@ main (int argc, char *argv[])
int c = argc;
guimb_param_t param;
struct guimb_data gd;
-
+
+ /* Native Language Support */
+ mu_init_nls ();
+
append_arg ("");
mu_argp_parse (&argp, &argc, &argv, 0, guimb_argp_capa, NULL, &c);
@@ -160,7 +163,7 @@ main (int argc, char *argv[])
g_argv[0] = program_file;
else if (!program_expr)
{
- mu_error ("At least one of -fecs must be used. Try guimb --help for more info");
+ mu_error (_("At least one of -fecs must be used. Try guimb --help for more info."));
exit (0);
}
diff --git a/guimb/util.c b/guimb/util.c
index fa1289dc4..930bc2430 100644
--- a/guimb/util.c
+++ b/guimb/util.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 "guimb.h"
@@ -47,14 +47,14 @@ util_get_sender (int msgno)
if (envelope_sender (env, buffer, sizeof (buffer), NULL)
|| address_create (&addr, buffer))
{
- util_error ("can't determine sender name (msg %d)", msgno);
+ util_error (_("can't determine sender name (msg %d)"), msgno);
return NULL;
}
}
if (address_get_email (addr, 1, buffer, sizeof (buffer), NULL))
{
- util_error ("can't determine sender name (msg %d)", msgno);
+ util_error (_("can't determine sender name (msg %d)"), msgno);
address_destroy (&addr);
return NULL;
}
@@ -62,3 +62,4 @@ util_get_sender (int msgno)
address_destroy (&addr);
return strdup (buffer);
}
+
diff --git a/imap4d/auth_gss.c b/imap4d/auth_gss.c
index 03a73eccd..8c36f4513 100644
--- a/imap4d/auth_gss.c
+++ b/imap4d/auth_gss.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. */
/* GSSAPI authentication for imap (rfc 1731).
@@ -49,7 +49,7 @@ display_status_1 (char *m, OM_uint32 code, int type)
type, GSS_C_NULL_OID,
&msg_ctx, &msg);
syslog (LOG_ERR,
- "GSS-API error %s: %s\n", m,
+ _("GSS-API error %s: %s\n"), m,
(char *)msg.value);
gss_release_buffer (&min_stat, &msg);
}
@@ -220,7 +220,7 @@ auth_gssapi (struct imap4d_command *command, char **username)
if ((mech & SUPPORTED_P_MECH) == 0)
{
syslog (LOG_NOTICE,
- "client requested unsupported protection mechanism (%d)",
+ _("client requested unsupported protection mechanism (%d)"),
mech);
gss_release_buffer (&min_stat, &outbuf);
maj_stat = gss_delete_sec_context (&min_stat, &context, &outbuf);
@@ -250,7 +250,7 @@ auth_gssapi (struct imap4d_command *command, char **username)
if (imap4d_gss_userok (&client_name, *username))
{
- syslog (LOG_NOTICE, "GSSAPI user %s is NOT authorized as %s",
+ syslog (LOG_NOTICE, _("GSSAPI user %s is NOT authorized as %s"),
(char *) client_name.value, *username);
util_finish (command, RESP_NO,
"GSSAPI user %s is NOT authorized as %s",
@@ -263,7 +263,7 @@ auth_gssapi (struct imap4d_command *command, char **username)
}
else
{
- syslog (LOG_NOTICE, "GSSAPI user %s is authorized as %s",
+ syslog (LOG_NOTICE, _("GSSAPI user %s is authorized as %s"),
(char *) client_name.value, *username);
}
diff --git a/imap4d/authenticate.c b/imap4d/authenticate.c
index 6a3f3f92b..d935c2d37 100644
--- a/imap4d/authenticate.c
+++ b/imap4d/authenticate.c
@@ -71,7 +71,7 @@ imap4d_authenticate (struct imap4d_command *command, char *arg)
/* FIXME: Check for errors. */
chdir (homedir);
namespace_init (homedir);
- syslog (LOG_INFO, "User '%s' logged in", username);
+ syslog (LOG_INFO, _("User '%s' logged in"), username);
return 0;
}
diff --git a/imap4d/bye.c b/imap4d/bye.c
index 34f63816a..98db5c92e 100644
--- a/imap4d/bye.c
+++ b/imap4d/bye.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. */
@@ -40,39 +40,39 @@ imap4d_bye0 (int reason, struct imap4d_command *command)
{
case ERR_NO_MEM:
util_out (RESP_BYE, "Server terminating no more resources.");
- syslog (LOG_ERR, "Out of memory");
+ syslog (LOG_ERR, _("Out of memory"));
break;
case ERR_SIGNAL:
if (ofile)
util_out (RESP_BYE, "Quitting on signal");
- syslog (LOG_ERR, "Quitting on signal");
+ syslog (LOG_ERR, _("Quitting on signal"));
break;
case ERR_TIMEOUT:
util_out (RESP_BYE, "Session timed out");
if (state == STATE_NONAUTH)
- syslog (LOG_INFO, "Session timed out for no user");
+ syslog (LOG_INFO, _("Session timed out for no user"));
else
- syslog (LOG_INFO, "Session timed out for user: %s", auth_data->name);
+ syslog (LOG_INFO, _("Session timed out for user: %s"), auth_data->name);
break;
case ERR_NO_OFILE:
- syslog (LOG_INFO, "No socket to send to");
+ syslog (LOG_INFO, _("No socket to send to"));
break;
case OK:
util_out (RESP_BYE, "Session terminating.");
if (state == STATE_NONAUTH)
- syslog (LOG_INFO, "Session terminating");
+ syslog (LOG_INFO, _("Session terminating"));
else
- syslog (LOG_INFO, "Session terminating for user: %s", auth_data->name);
+ syslog (LOG_INFO, _("Session terminating for user: %s"), auth_data->name);
status = EXIT_SUCCESS;
break;
default:
util_out (RESP_BYE, "Quitting (reason unknown)");
- syslog (LOG_ERR, "Unknown quit");
+ syslog (LOG_ERR, _("Unknown quit"));
break;
}
@@ -82,4 +82,3 @@ imap4d_bye0 (int reason, struct imap4d_command *command)
exit (status);
}
-
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index c09c173f8..becff4494 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.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 "imap4d.h"
@@ -37,14 +37,14 @@ struct daemon_param daemon_param = {
volatile size_t children;
const char *argp_program_version = "imap4d (" PACKAGE_STRING ")";
-static char doc[] = "GNU imap4d -- the IMAP4D daemon";
+static char doc[] = N_("GNU imap4d -- the IMAP4D daemon");
static struct argp_option options[] =
{
{"other-namespace", 'O', "PATHLIST", 0,
- "set the `other' namespace", 0},
+ N_("set the `other' namespace"), 0},
{"shared-namespace", 'S', "PATHLIST", 0,
- "set the `shared' namespace", 0},
+ N_("set the `shared' namespace"), 0},
{ NULL, 0, NULL, 0, NULL, 0 }
};
@@ -102,7 +102,10 @@ main (int argc, char **argv)
{
struct group *gr;
int status = EXIT_SUCCESS;
-
+
+ /* Native Language Support */
+ mu_init_nls ();
+
state = STATE_NONAUTH; /* Starting state in non-auth. */
MU_AUTH_REGISTER_ALL_MODULES();
@@ -125,13 +128,13 @@ main (int argc, char **argv)
gr = getgrnam ("mail");
if (gr == NULL)
{
- perror ("Error getting mail group");
+ perror (_("Error getting mail group"));
exit (1);
}
if (setgid (gr->gr_gid) == -1)
{
- perror ("Error setting mail group");
+ perror (_("Error setting mail group"));
exit (1);
}
}
@@ -210,17 +213,17 @@ imap4d_mainloop (int infile, int outfile)
struct sockaddr_in cs;
int len = sizeof cs;
- syslog (LOG_INFO, "Incoming connection opened");
+ syslog (LOG_INFO, _("Incoming connection opened"));
if (getpeername (infile, (struct sockaddr*)&cs, &len) < 0)
- syslog (LOG_ERR, "can't obtain IP address of client: %s",
+ syslog (LOG_ERR, _("can't obtain IP address of client: %s"),
strerror (errno));
else
- syslog (LOG_INFO, "connect from %s", inet_ntoa(cs.sin_addr));
+ syslog (LOG_INFO, _("connect from %s"), inet_ntoa(cs.sin_addr));
text = "IMAP4rev1";
}
else
{
- syslog (LOG_INFO, "Started in debugging mode");
+ syslog (LOG_INFO, _("Started in debugging mode"));
text = "IMAP4rev1 Debugging mode";
}
@@ -253,7 +256,7 @@ imap4d_daemon_init (void)
first three one, in, out, err */
if (daemon (0, 0) < 0)
{
- perror("fork failed:");
+ perror(_("fork failed:"));
exit (1);
}
@@ -313,7 +316,7 @@ imap4d_daemon (unsigned int maxchildren, unsigned int port)
{
if (children > maxchildren)
{
- syslog (LOG_ERR, "too many children (%lu)",
+ syslog (LOG_ERR, _("too many children (%lu)"),
(unsigned long) children);
pause ();
continue;
@@ -347,5 +350,3 @@ imap4d_daemon (unsigned int maxchildren, unsigned int port)
}
}
-
-
diff --git a/imap4d/imap4d.h b/imap4d/imap4d.h
index ba02f8935..d10e026c9 100644
--- a/imap4d/imap4d.h
+++ b/imap4d/imap4d.h
@@ -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. */
#ifndef _IMAP4D_H
@@ -87,6 +87,7 @@
#include <mailutils/stream.h>
#include <mailutils/mu_auth.h>
#include <mailutils/url.h>
+#include <mailutils/nls.h>
#ifdef __cplusplus
extern "C" {
diff --git a/imap4d/list.c b/imap4d/list.c
index 6e1471d76..568897488 100644
--- a/imap4d/list.c
+++ b/imap4d/list.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 "imap4d.h"
@@ -243,7 +243,7 @@ list_file (const char *cwd, const char *ref, const char *pattern,
if (stat (entry, &st))
{
- mu_error ("can't stat %s: %s",
+ mu_error (_("can't stat %s: %s"),
entry, strerror (errno));
continue;
}
diff --git a/imap4d/login.c b/imap4d/login.c
index fa872733d..03f73e67e 100644
--- a/imap4d/login.c
+++ b/imap4d/login.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 "imap4d.h"
@@ -39,7 +39,7 @@ imap4d_login (struct imap4d_command *command, char *arg)
if (auth_data == NULL)
{
- syslog (LOG_INFO, "User '%s': nonexistent", arg);
+ syslog (LOG_INFO, _("User '%s': nonexistent"), arg);
return util_finish (command, RESP_NO, "User name or passwd rejected");
}
@@ -47,7 +47,7 @@ imap4d_login (struct imap4d_command *command, char *arg)
openlog ("gnu-imap4d", LOG_PID, log_facility);
if (rc)
{
- syslog (LOG_INFO, "Login failed: %s", arg);
+ syslog (LOG_INFO, _("Login failed: %s"), arg);
return util_finish (command, RESP_NO, "User name or passwd rejected");
}
@@ -57,7 +57,7 @@ imap4d_login (struct imap4d_command *command, char *arg)
homedir = mu_normalize_path (strdup (auth_data->dir), "/");
chdir (homedir);
namespace_init (homedir);
- syslog (LOG_INFO, "User '%s' logged in", username);
+ syslog (LOG_INFO, _("User '%s' logged in"), username);
return util_finish (command, RESP_OK, "Completed");
}
diff --git a/imap4d/search.c b/imap4d/search.c
index fc7e3219d..24882affb 100644
--- a/imap4d/search.c
+++ b/imap4d/search.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 "imap4d.h"
@@ -481,7 +481,7 @@ parse_equiv_key (struct parsebuf *pb)
if (parse_search_key_list (pb))
{
/* shouldn't happen */
- syslog(LOG_CRIT, "%s:%d: INTERNAL ERROR", __FILE__, __LINE__);
+ syslog(LOG_CRIT, _("%s:%d: INTERNAL ERROR"), __FILE__, __LINE__);
abort ();
}
@@ -568,7 +568,7 @@ parse_simple_key (struct parsebuf *pb)
put_code (pb, (inst_t) parse_regmem (pb, set));
break;
default:
- syslog(LOG_CRIT, "%s:%d: INTERNAL ERROR", __FILE__, __LINE__);
+ syslog(LOG_CRIT, _("%s:%d: INTERNAL ERROR"), __FILE__, __LINE__);
abort (); /* should never happen */
}
}
@@ -635,7 +635,7 @@ _search_pop (struct parsebuf *pb)
{
if (pb->tos == 0)
{
- syslog(LOG_CRIT, "%s:%d: INTERNAL ERROR", __FILE__, __LINE__);
+ syslog(LOG_CRIT, _("%s:%d: INTERNAL ERROR"), __FILE__, __LINE__);
abort (); /* shouldn't happen */
}
return pb->stack[--pb->tos];
diff --git a/imap4d/signal.c b/imap4d/signal.c
index cb0d41b11..2e3ef5b38 100644
--- a/imap4d/signal.c
+++ b/imap4d/signal.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. */
@@ -39,11 +39,11 @@ imap4d_sigchld (int signo)
RETSIGTYPE
imap4d_signal (int signo)
{
- syslog (LOG_CRIT, "got signal %s", strsignal (signo));
+ syslog (LOG_CRIT, _("got signal %s"), strsignal (signo));
/* Master process. */
if (!ofile)
{
- syslog (LOG_CRIT, "MASTER: exiting on signal");
+ syslog (LOG_CRIT, _("MASTER: exiting on signal"));
exit (1); /* abort(); */
}
diff --git a/imap4d/util.c b/imap4d/util.c
index 359386423..1782212b7 100644
--- a/imap4d/util.c
+++ b/imap4d/util.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 (a