summaryrefslogtreecommitdiff
path: root/pop3d
diff options
context:
space:
mode:
authorWojciech Polak <polak@gnu.org>2002-12-23 22:01:35 +0000
committerWojciech Polak <polak@gnu.org>2002-12-23 22:01:35 +0000
commite7e50f768f6cb99795f2252255d6b92154481804 (patch)
tree8bef15dd01a015c63d61b889e433929263ad3eab /pop3d
parent348d388ccab203b02a6e058732d66081f7c2d483 (diff)
downloadmailutils-e7e50f768f6cb99795f2252255d6b92154481804.tar.gz
mailutils-e7e50f768f6cb99795f2252255d6b92154481804.tar.bz2
Added initial NLS support
Diffstat (limited to 'pop3d')
-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
8 files changed, 117 insertions, 116 deletions
diff --git a/pop3d/apop.c b/pop3d/apop.c
index 40caadd6a..0fb2f5453 100644
--- a/pop3d/apop.c
+++ b/pop3d/apop.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 "pop3d.h"
@@ -53,9 +53,9 @@ pop3d_apopuser (const char *user)
if (rc)
{
if (rc == -1)
- syslog (LOG_INFO, "Bad permissions on APOP password db");
+ syslog (LOG_INFO, _("Bad permissions on APOP password db"));
else
- syslog (LOG_ERR, "Unable to open APOP db: %s",
+ syslog (LOG_ERR, _("Unable to open APOP db: %s"),
mu_errstring (rc));
return NULL;
}
@@ -73,7 +73,7 @@ pop3d_apopuser (const char *user)
mu_dbm_close (db);
if (rc)
{
- syslog (LOG_ERR, "Can't fetch APOP data: %s", mu_errstring (rc));
+ syslog (LOG_ERR, _("Can't fetch APOP data: %s"), mu_errstring (rc));
return NULL;
}
password = calloc (MU_DATUM_SIZE(data) + 1, sizeof (*password));
@@ -91,14 +91,14 @@ pop3d_apopuser (const char *user)
if (mu_check_perm (APOP_PASSFILE, 0600))
{
- syslog (LOG_INFO, "Bad permissions on APOP password file");
+ syslog (LOG_INFO, _("Bad permissions on APOP password file"));
return NULL;
}
apop_file = fopen (APOP_PASSFILE, "r");
if (apop_file == NULL)
{
- syslog (LOG_INFO, "Unable to open APOP password file %s",
+ syslog (LOG_INFO, _("Unable to open APOP password file %s"),
strerror (errno));
return NULL;
}
@@ -255,7 +255,7 @@ pop3d_apop (const char *arg)
{
url_t url = NULL;
mailbox_get_url (mbox, &url);
- syslog (LOG_INFO, "User '%s' logged in with mailbox '%s'",
+ syslog (LOG_INFO, _("User '%s' logged in with mailbox '%s'"),
username, url_to_string (url));
}
return OK;
diff --git a/pop3d/extra.c b/pop3d/extra.c
index f2b79bed2..7a66415c7 100644
--- a/pop3d/extra.c
+++ b/pop3d/extra.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 "pop3d.h"
@@ -94,34 +94,34 @@ pop3d_abquit (int reason)
{
case ERR_NO_MEM:
pop3d_outf ("-ERR Out of memory, quitting\r\n");
- syslog (LOG_ERR, "Out of memory");
+ syslog (LOG_ERR, _("Out of memory"));
break;
case ERR_SIGNAL:
pop3d_outf ("-ERR Quitting on signal\r\n");
- syslog (LOG_ERR, "Quitting on signal");
+ syslog (LOG_ERR, _("Quitting on signal"));
break;
case ERR_TIMEOUT:
pop3d_outf ("-ERR Session timed out\r\n");
if (state == TRANSACTION)
- syslog (LOG_INFO, "Session timed out for user: %s", username);
+ syslog (LOG_INFO, _("Session timed out for user: %s"), username);
else
- syslog (LOG_INFO, "Session timed out for no user");
+ syslog (LOG_INFO, _("Session timed out for no user"));
break;
case ERR_NO_OFILE:
- syslog (LOG_INFO, "No socket to send to");
+ syslog (LOG_INFO, _("No socket to send to"));
break;
case ERR_MBOX_SYNC:
- syslog (LOG_ERR, "Mailbox was updated by other party: %s", username);
+ syslog (LOG_ERR, _("Mailbox was updated by other party: %s"), username);
pop3d_outf ("-ERR [OUT-SYNC] Mailbox updated by other party or corrupt\r\n");
break;
default:
pop3d_outf ("-ERR Quitting (reason unknown)\r\n");
- syslog (LOG_ERR, "Unknown quit");
+ syslog (LOG_ERR, _("Unknown quit"));
break;
}
diff --git a/pop3d/lock.c b/pop3d/lock.c
index 83c7c101b..1d01b346d 100644
--- a/pop3d/lock.c
+++ b/pop3d/lock.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 "pop3d.h"
@@ -31,7 +31,7 @@ pop3d_lock ()
locker_set_flags (lock, MU_LOCKER_PID);
if ((status = locker_lock (lock)))
{
- syslog (LOG_NOTICE, "mailbox '%s' lock failed: %s",
+ syslog (LOG_NOTICE, _("mailbox '%s' lock failed: %s"),
(name) ? name : "?", mu_errstring(status));
return ERR_MBOX_LOCK;
}
diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c
index a7be92502..c9f8bdec5 100644
--- a/pop3d/pop3d.c
+++ b/pop3d/pop3d.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, 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 "pop3d.h"
@@ -44,7 +44,7 @@ static error_t pop3d_parse_opt __P((int key, char *arg,
struct argp_state *astate));
const char *argp_program_version = "pop3d (" PACKAGE_STRING ")";
-static char doc[] = "GNU pop3d -- the POP3 daemon";
+static char doc[] = N_("GNU pop3d -- the POP3 daemon");
static struct argp argp = {
NULL,
@@ -87,6 +87,9 @@ main (int argc, char **argv)
struct group *gr;
int status = OK;
+ /* Native Language Support */
+ mu_init_nls ();
+
MU_AUTH_REGISTER_ALL_MODULES();
mu_argp_parse (&argp, &argc, &argv, 0, pop3d_argp_capa, NULL, &daemon_param);
@@ -105,13 +108,13 @@ main (int argc, char **argv)
gr = getgrnam ("mail");
if (gr == NULL)
{
- perror ("Error getting mail group");
+ perror (_("Error getting mail group"));
exit (EXIT_FAILURE);
}
if (setgid (gr->gr_gid) == -1)
{
- perror ("Error setting mail group");
+ perror (_("Error setting mail group"));
exit (EXIT_FAILURE);
}
}
@@ -174,7 +177,7 @@ pop3d_daemon_init (void)
first three one, in, out, err */
if (daemon (0, 0) < 0)
{
- perror ("failed to become a daemon:");
+ perror (_("failed to become a daemon:"));
exit (EXIT_FAILURE);
}
@@ -211,22 +214,22 @@ pop3d_mainloop (int infile, int outfile)
state = AUTHORIZATION;
- syslog (LOG_INFO, "Incoming connection opened");
+ syslog (LOG_INFO, _("Incoming connection opened"));
/* log information on the connecting client */
if (debug_mode)
{
- syslog (LOG_INFO, "Started in debugging mode");
+ syslog (LOG_INFO, _("Started in debugging mode"));
}
else
{
struct sockaddr_in cs;
int len = sizeof cs;
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));
}
/* Prepare the shared secret for APOP. */
@@ -397,7 +400,7 @@ pop3d_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;
@@ -432,6 +435,3 @@ pop3d_daemon (unsigned int maxchildren, unsigned int port)
}
}
-
-
-
diff --git a/pop3d/pop3d.h b/pop3d/pop3d.h
index 1f6913dce..d516cd9e5 100644
--- a/pop3d/pop3d.h
+++ b/pop3d/pop3d.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. */
#ifndef _POP3D_H
@@ -122,6 +122,7 @@
#include <mailutils/registrar.h>
#include <mailutils/url.h>
#include <mailutils/mu_auth.h>
+#include <mailutils/nls.h>
/* For Berkley DB2 APOP password file */
#ifdef HAVE_DB_H
diff --git a/pop3d/popauth.c b/pop3d/popauth.c
index 8edf26fef..2f1be4c4d 100644
--- a/pop3d/popauth.c
+++ b/pop3d/popauth.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 "pop3d.h"
@@ -52,7 +52,7 @@ int (*ftab[]) __P((struct action_data *)) = {
};
const char *argp_program_version = "popauth (" PACKAGE_STRING ")";
-static char doc[] = "GNU popauth -- manage pop3 authentcation database";
+static char doc[] = N_("GNU popauth -- manage pop3 authentcation database");
static error_t popauth_parse_opt __P((int key, char *arg,
struct argp_state *astate));
@@ -63,22 +63,22 @@ void (*argp_program_version_hook) __P((FILE *stream,
static struct argp_option options[] =
{
- { NULL, 0, NULL, 0, "Actions are:", 1 },
- { "add", 'a', 0, 0, "Add user", 1 },
- { "modify", 'm', 0, 0, "Modify user's record (change password)", 1 },
- { "delete", 'd', 0, 0, "Delete user's record", 1 },
- { "list", 'l', 0, 0, "List the contents of DBM file", 1 },
+ { NULL, 0, NULL, 0, N_("Actions are:"), 1 },
+ { "add", 'a', 0, 0, N_("Add user"), 1 },
+ { "modify", 'm', 0, 0, N_("Modify user's record (change password)"), 1 },
+ { "delete", 'd', 0, 0, N_("Delete user's record"), 1 },
+ { "list", 'l', 0, 0, N_("List the contents of DBM file"), 1 },
{ NULL, 0, NULL, 0,
- "Default action is:\n"
+ N_("Default action is:\n"
" For the file owner: --list\n"
- " For a user: --modify --username <username>\n", 2 },
+ " For a user: --modify --username <username>\n"), 2 },
- { NULL, 0, NULL, 0, "Options are:", 3 },
- { "file", 'f', "FILE", 0, "Read input from FILE (default stdin)", 3 },
- { "output", 'o', "FILE", 0, "Direct output to file", 3 },
- { "password", 'p', "STRING", 0, "Specify user's password", 3 },
- { "user", 'u', "USERNAME", 0, "Specify user name", 3 },
+ { NULL, 0, NULL, 0, N_("Options are:"), 3 },
+ { "file", 'f', "FILE", 0, N_("Read input from FILE (default stdin)"), 3 },
+ { "output", 'o', "FILE", 0, N_("Direct output to file"), 3 },
+ { "password", 'p', "STRING", 0, N_("Specify user's password"), 3 },
+ { "user", 'u', "USERNAME", 0, N_("Specify user name"), 3 },
{ NULL, }
};
@@ -164,7 +164,10 @@ int
main(int argc, char **argv)
{
struct action_data adata;
-
+
+ /* Native Language Support */
+ mu_init_nls ();
+
mu_argp_parse (&argp, &argc, &argv, 0,
popauth_argp_capa, NULL, &adata);
@@ -176,7 +179,7 @@ check_action (int action)
{
if (action != -1)
{
- mu_error ("You may not specify more than one `-aldp' option");
+ mu_error (_("You may not specify more than one `-aldp' option"));
exit (1);
}
}
@@ -198,7 +201,7 @@ check_user_perm (int action, struct action_data *ap)
DBM_FILE db;
if (mu_dbm_open (ap->input_name, &db, MU_STREAM_CREAT, 0600))
{
- mu_error ("can't create %s: %s",
+ mu_error (_("can't create %s: %s"),
ap->input_name, strerror (errno));
exit (1);
}
@@ -207,7 +210,7 @@ check_user_perm (int action, struct action_data *ap)
}
else
{
- mu_error ("can't stat %s: %s", ap->input_name, strerror (errno));
+ mu_error (_("can't stat %s: %s"), ap->input_name, strerror (errno));
exit (1);
}
}
@@ -218,13 +221,13 @@ check_user_perm (int action, struct action_data *ap)
if (ap->username)
{
- mu_error ("Only the file owner can use --username");
+ mu_error (_("Only the file owner can use --username"));
exit (1);
}
if (action != ACT_CHPASS)
{
- mu_error ("Operation not allowed");
+ mu_error (_("Operation not allowed"));
exit (1);
}
pw = getpwuid (uid);
@@ -245,7 +248,7 @@ action_list (struct action_data *ap)
check_user_perm (ACT_LIST, ap);
if (mu_dbm_open (ap->input_name, &db, MU_STREAM_READ, 0600))
{
- mu_error("can't open %s: %s", ap->input_name, strerror (errno));
+ mu_error (_("can't open %s: %s"), ap->input_name, strerror (errno));
return 1;
}
@@ -254,7 +257,7 @@ action_list (struct action_data *ap)
fp = fopen (ap->output_name, "w");
if (!fp)
{
- mu_error("can't create %s: %s", ap->output_name, strerror (errno));
+ mu_error (_("can't create %s: %s"), ap->output_name, strerror (errno));
return 1;
}
}
@@ -269,7 +272,7 @@ action_list (struct action_data *ap)
MU_DATUM_SIZE (key) = strlen (ap->username);
if (mu_dbm_fetch (db, key, &contents))
{
- mu_error ("no such user: %s", ap->username);
+ mu_error (_("no such user: %s"), ap->username);
}
else
fprintf (fp, "%.*s: %.*s\n",
@@ -316,7 +319,7 @@ action_create (struct action_data *ap)
fp = fopen (ap->input_name, "r");
if (!fp)
{
- mu_error("can't open %s: %s", ap->input_name, strerror (errno));
+ mu_error (_("can't open %s: %s"), ap->input_name, strerror (errno));
return 1;
}
}
@@ -330,7 +333,7 @@ action_create (struct action_data *ap)
ap->output_name = APOP_PASSFILE;
if (mu_dbm_open (ap->output_name, &db, MU_STREAM_CREAT, 0600))
{
- mu_error("can't create %s: %s", ap->output_name, strerror (errno));
+ mu_error (_("can't create %s: %s"), ap->output_name, strerror (errno));
return 1;
}
@@ -360,7 +363,7 @@ action_create (struct action_data *ap)
if (argc != 3 || argv[1][0] != ':' || argv[1][1] != 0)
{
- mu_error ("%s:%d: malformed line", ap->input_name, line);
+ mu_error (_("%s:%d: malformed line"), ap->input_name, line);
argcv_free (argc, argv);
continue;
}
@@ -373,7 +376,7 @@ action_create (struct action_data *ap)
MU_DATUM_SIZE (contents) = strlen (argv[2]);
if (mu_dbm_insert (db, key, contents, 1))
- mu_error ("%s:%d: can't store datum", ap->input_name, line);
+ mu_error (_("%s:%d: can't store datum"), ap->input_name, line);
argcv_free (argc, argv);
}
@@ -390,7 +393,7 @@ open_io (int action, struct action_data *ap, DBM_FILE *db, int *not_owner)
*not_owner = rc;
if (mu_dbm_open (ap->input_name, db, MU_STREAM_RDWR, 0600))
{
- mu_error("can't open %s: %s", ap->input_name, strerror (errno));
+ mu_error (_("can't open %s: %s"), ap->input_name, strerror (errno));
return 1;
}
return 0;
@@ -406,14 +409,14 @@ fill_pass (struct action_data *ap)
while (1) {
if (ap->passwd)
free (ap->passwd);
- p = getpass ("Password:");
+ p = getpass (_("Password:"));
if (!p)
exit (1);
ap->passwd = strdup (p);
- p = getpass ("Confirm :");
+ p = getpass (_("Confirm :"));
if (strcmp (ap->passwd, p) == 0)
break;
- mu_error ("Passwords differ. Please retry.");
+ mu_error (_("Passwords differ. Please retry."));
}
}
}
@@ -428,7 +431,7 @@ action_add (struct action_data *ap)
if (!ap->username)
{
- mu_error ("missing username to add");
+ mu_error (_("missing username to add"));
return 1;
}
@@ -446,7 +449,7 @@ action_add (struct action_data *ap)
rc = mu_dbm_insert (db, key, contents, 1);
if (rc)
- mu_error ("can't store datum");
+ mu_error (_("can't store datum"));
mu_dbm_close (db);
return rc;
@@ -461,7 +464,7 @@ action_delete (struct action_data *ap)
if (!ap->username)
{
- mu_error ("missing username to delete");
+ mu_error (_("missing username to delete"));
return 1;
}
@@ -473,7 +476,7 @@ action_delete (struct action_data *ap)
rc = mu_dbm_delete (db, key);
if (rc)
- mu_error ("can't remove record for %s", ap->username);
+ mu_error (_("can't remove record for %s"), ap->username);
mu_dbm_close (db);
return rc;
@@ -493,7 +496,7 @@ action_chpass (struct action_data *ap)
if (!ap->username)
{
- mu_error ("missing username");
+ mu_error (_("missing username"));
return 1;
}
@@ -504,7 +507,7 @@ action_chpass (struct action_data *ap)
MU_DATUM_SIZE (key) = strlen (ap->username);
if (mu_dbm_fetch (db, key, &contents))
{
- mu_error ("no such user: %s", ap->username);
+ mu_error (_("no such user: %s"), ap->username);
return 1;
}
@@ -515,12 +518,12 @@ action_chpass (struct action_data *ap)
oldpass = xmalloc (MU_DATUM_SIZE (contents) + 1);
memcpy (oldpass, MU_DATUM_PTR (contents), MU_DATUM_SIZE (contents));
oldpass[MU_DATUM_SIZE (contents)] = 0;
- p = getpass ("Old Password:");
+ p = getpass (_("Old Password:"));
if (!p)
return 1;
if (strcmp (oldpass, p))
{
- mu_error ("Sorry");
+ mu_error (_("Sorry"));
return 1;
}
}
@@ -531,7 +534,7 @@ action_chpass (struct action_data *ap)
MU_DATUM_SIZE (contents) = strlen (ap->passwd);
rc = mu_dbm_insert (db, key, contents, 1);
if (rc)
- mu_error ("can't replace datum");
+ mu_error (_("can't replace datum"));
mu_dbm_close (db);
return rc;
@@ -550,7 +553,7 @@ popauth_version (FILE *stream, struct argp_state *state)
# define FORMAT "Old DBM"
#endif
printf ("%s\n", argp_program_version);
- printf ("Database format: %s\n", FORMAT);
- printf ("Database location: %s\n", APOP_PASSFILE);
+ printf (_("Database format: %s\n"), FORMAT);
+ printf (_("Database location: %s\n"), APOP_PASSFILE);
exit (EXIT_SUCCESS);
}
diff --git a/pop3d/quit.c b/pop3d/quit.c
index ad57be261..1277b0051 100644
--- a/pop3d/quit.c
+++ b/pop3d/quit.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 "pop3d.h"
@@ -38,10 +38,10 @@ pop3d_quit (const char *arg)
if (mailbox_close (mbox) != 0)
err = ERR_FILE;
mailbox_destroy (&mbox);
- syslog (LOG_INFO, "Session ended for user: %s", username);
+ syslog (LOG_INFO, _("Session ended for user: %s"), username);
}
else
- syslog (LOG_INFO, "Session ended for no user");
+ syslog (LOG_INFO, _("Session ended for no user"));
state = UPDATE;
free (username);
diff --git a/pop3d/user.c b/pop3d/user.c
index 87f86619b..6c15babb3 100644
--- a/pop3d/user.c
+++ b/pop3d/user.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 "pop3d.h"
@@ -63,7 +63,7 @@ pop3d_user (const char *arg)
tmp = pop3d_apopuser (arg);
if (tmp != NULL)
{
- syslog (LOG_INFO, "APOP user %s tried to log in with USER", arg);
+ syslog (LOG_INFO, _("APOP user %s tried to log in with USER"), arg);
free (tmp);
return ERR_BAD_LOGIN;
}
@@ -73,7 +73,7 @@ pop3d_user (const char *arg)
if (auth_data == NULL)
{
- syslog (LOG_INFO, "User '%s': nonexistent", arg);
+ syslog (LOG_INFO, _("User '%s': nonexistent"), arg);
return ERR_BAD_LOGIN;
}
@@ -82,14 +82,14 @@ pop3d_user (const char *arg)
if (rc)
{
- syslog (LOG_INFO, "User '%s': authentication failed", arg);
+ syslog (LOG_INFO, _("User '%s': authentication failed"), arg);
mu_auth_data_free (auth_data);
return ERR_BAD_LOGIN;
}
}
else if (strcasecmp (cmd, "QUIT") == 0)
{
- syslog (LOG_INFO, "Possible probe of account '%s'", arg);
+ syslog (LOG_INFO, _("Possible probe of account '%s'"), arg);
free (cmd);
return pop3d_quit (pass);
}
@@ -150,12 +150,9 @@ pop3d_user (const char *arg)
size_t total = 0;
mailbox_get_url (mbox, &url);
mailbox_messages_count (mbox, &total);
- syslog (LOG_INFO, "User '%s' logged in with mailbox '%s' (%d msgs)",
+ syslog (LOG_INFO, _("User '%s' logged in with mailbox '%s' (%d msgs)"),
username, url_to_string (url), total);
}
return OK;
-
}
-
-

Return to:

Send suggestions and report system problems to the System administrator.