Commit e7e50f76 e7e50f768f6cb99795f2252255d6b92154481804 by Wojciech Polak

Added initial NLS support

1 parent 348d388c
......@@ -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
......
/* 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;
}
......
/* 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;
......
/* 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;
}
......
/* 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
......
......@@ -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
......
/* 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 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.
......
/* 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);
......
/* 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);
}
}
......
/* 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"
......
/* 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;
......
/* 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';
......
/* 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);
......
/* 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"
......
/* 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"
......
/* 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"
......
/* 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"
......
/* 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"
......
/* 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;
}
......
/* 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;
}
......
/* 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]));
......
/* 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"
......
/* 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"
......
/* 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"
......
/* 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"
......
/* 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;
}
......
/* 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;
}
......
/* 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"
......
/* 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 (args.file)
fprintf (ofile, "%s: 0 messages\n", args.file);
fprintf (ofile, _("%s: 0 messages\n"), args.file);
else
fprintf (ofile, "No mail for %s\n",
fprintf (ofile, _("No mail for %s\n"),
args.user ? args.user : mail_whoami ());
return 1;
}
......@@ -508,28 +512,24 @@ mail_mainloop (char *(*input) __P((void *, int)), void *closure, int do_history)
}
}
static char warranty_stmt[] =
"GNU mailutils - a suite of utilities for electronic mail\n\
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.\n\
\n\
This program is free software; you can redistribute it and/or modify\n\
it under the terms of the GNU General Public License as published by\n\
the Free Software Foundation; either version 2, or (at your option)\n\
any later version.\n\
\n\
This program is distributed in the hope that it will be useful,\n\
but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
GNU General Public License for more details.\n\
\n\
You should have received a copy of the GNU General Public License\n\
along with this program; if not, write to the Free Software\n\
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n";
int
mail_warranty(int argc, char **argv)
mail_warranty (int argc, char **argv)
{
(void)argc; (void)argv;
fprintf (ofile, "%s", warranty_stmt);
fputs (_("GNU Mailutils -- a suite of utilities for electronic mail\n"
"Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.\n\n"),
ofile);
fputs (_("GNU Mailutils is free software; you can redistribute it and/or modify\n"
"it under the terms of the GNU General Public License as published by\n"
"the Free Software Foundation; either version 2, or (at your option)\n"
"any later version.\n\n"), ofile);
fputs (_("GNU Mailutils is distributed in the hope that it will be useful,\n"
"but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
"GNU General Public License for more details.\n\n"), ofile);
fputs (_("You should have received a copy of the GNU General Public License\n"
"along with GNU Mailutils; if not, write to the Free Software\n"
"Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n"), ofile);
return 0;
}
......
/* 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. */
#ifndef _MAIL_H
......@@ -54,8 +54,8 @@
#include <xalloc.h>
#ifdef HAVE_READLINE_READLINE_H
#include <readline/readline.h>
#include <readline/history.h>
# include <readline/readline.h>
# include <readline/history.h>
#endif
#include <mailutils/address.h>
......@@ -76,7 +76,7 @@
#include <mailutils/registrar.h>
#include <mailutils/stream.h>
#include <mailutils/url.h>
#include <mailutils/nls.h>
#include <mailutils/argcv.h>
#include <getline.h>
#include <mu_asprintf.h>
......
/* 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"
......@@ -391,7 +391,7 @@ ml_reread (const char *prompt, char **text)
if (!line)
{
util_error("not enough memory to edit the line");
util_error (_("not enough memory to edit the line"));
return -1;
}
......@@ -419,7 +419,7 @@ ml_reread (const char *prompt, char **text)
if ((p = realloc (line, line_size + LINE_INC)) == NULL)
{
fputs ("\n", stdout);
util_error ("not enough memory to edit the line");
util_error (_("not enough memory to edit the line"));
break;
}
else
......@@ -465,8 +465,8 @@ ml_reread (const char *prompt, char **text)
{
if ((p = realloc (line, line_size + LINE_INC)) == NULL)
{
fputs("\n", stdout);
util_error("not enough memory to edit the line");
fputs ("\n", stdout);
util_error (_("not enough memory to edit the line"));
break;
}
else
......@@ -502,7 +502,7 @@ ml_reread (const char *prompt, char **text)
if ((p = realloc (line, line_size + LINE_INC)) == NULL)
{
fputs ("\n", stdout);
util_error ("not enough memory to edit the line");
util_error (_("not enough memory to edit the line"));
break;
}
else
......
/* 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"
......
/* 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"
......@@ -40,7 +40,7 @@ mail_next (int argc, char **argv)
if (rc)
{
util_error ("No applicable message");
util_error (_("No applicable message"));
return 1;
}
}
......
/* 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"
......
/* 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"
......@@ -40,7 +40,7 @@ mail_previous (int argc, char **argv)
if (rc)
{
util_error ("No applicable message");
util_error (_("No applicable message"));
return 1;
}
}
......
/* 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"
......@@ -96,7 +96,7 @@ mail_print (int argc, char **argv)
{
if (ml_got_interrupt())
{
util_error("\nInterrupt");
util_error (_("\nInterrupt"));
break;
}
buffer[n] = '\0';
......
/* 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"
......@@ -47,7 +47,7 @@ mail_mbox_close ()
mailbox_get_url (mbox, &url);
mailbox_messages_count (mbox, &held_count);
fprintf (ofile, "Held %d messages in %s\n", held_count, url_to_string (url));
fprintf (ofile, _("Held %d messages in %s\n"), held_count, url_to_string (url));
mailbox_close (mbox);
mailbox_destroy (&mbox);
......@@ -104,7 +104,7 @@ mail_mbox_commit ()
|| mailbox_open (dest_mbox,
MU_STREAM_WRITE | MU_STREAM_CREAT))
{
util_error("can't create mailbox %s", name);
util_error (_("can't create mailbox %s"), name);
return 1;
}
}
......@@ -124,7 +124,7 @@ mail_mbox_commit ()
url_t u = NULL;
mailbox_get_url (dest_mbox, &u);
fprintf(ofile, "Saved %d messages in %s\n", saved_count,
fprintf(ofile, _("Saved %d messages in %s\n"), saved_count,
url_to_string (u));
mailbox_close (dest_mbox);
mailbox_destroy (&dest_mbox);
......
/* 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"
......@@ -61,7 +61,7 @@ make_in_reply_to (compose_env_t *env, message_t msg)
}
if (value)
asprintf (&s1, "Your message of %s", value);
asprintf (&s1, _("Your message of %s"), value);
if (header_aget_value (hdr, MU_HEADER_MESSAGE_ID, &value) == 0)
{
......@@ -235,12 +235,12 @@ mail_reply (int argc, char **argv)
else
compose_header_set (&env, MU_HEADER_SUBJECT, "", COMPOSE_REPLACE);
fprintf (ofile, "To: %s\n",
fprintf (ofile, _("To: %s\n"),
compose_header_get (&env, MU_HEADER_TO, ""));
str = compose_header_get (&env, MU_HEADER_CC, NULL);
if (str)
fprintf (ofile, "Cc: %s\n", str);
fprintf (ofile, "Subject: %s\n\n",
fprintf (ofile, _("Cc: %s\n"), str);
fprintf (ofile, _("Subject: %s\n\n"),
compose_header_get (&env, MU_HEADER_SUBJECT, ""));
make_in_reply_to (&env, msg);
......
/* 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"
......@@ -30,7 +30,7 @@ mail_retain (int argc, char **argv)
if (argc == 1)
{
if (!retained_headers)
fprintf (ofile, "No fields are currently being retained\n");
fprintf (ofile, _("No fields are currently being retained\n"));
else
util_slist_print (retained_headers, 1);
return 0;
......@@ -52,7 +52,7 @@ mail_discard (int argc, char **argv)
if (argc == 1)
{
if (!ignored_headers)
fprintf (ofile, "No fields are currently being ignored\n");
fprintf (ofile, _("No fields are currently being ignored\n"));
else
util_slist_print (ignored_headers, 1);
return 0;
......
/* 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"
......
/* 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 <sys/types.h>
......@@ -112,7 +112,7 @@ compose_header_set (compose_env_t * env, char *name, char *value, int mode)
if (!env->header
&& (status = header_create (&env->header, NULL, 0, NULL)) != 0)
{
util_error ("can't create header: %s", mu_errstring (status));
util_error (_("can't create header: %s"), mu_errstring (status));
return status;
}
......@@ -195,7 +195,7 @@ mail_send0 (compose_env_t * env, int save_to)
if (fd == -1)
{
util_error ("Can not open temporary file");
util_error (_("Can not open temporary file"));
return 1;
}
......@@ -224,7 +224,7 @@ mail_send0 (compose_env_t * env, int save_to)
free (buf);
if (++int_cnt == 2)
break;
util_error ("(Interrupt -- one more to kill letter)");
util_error (_("(Interrupt -- one more to kill letter)"));
}
continue;
}
......@@ -234,8 +234,8 @@ mail_send0 (compose_env_t * env, int save_to)
if (util_getenv (NULL, "ignore", Mail_env_boolean, 0) == 0)
{
util_error (util_getenv (NULL, "dot", Mail_env_boolean, 0) == 0 ?
"Use \".\" to terminate letter." :
"Use \"~.\" to terminate letter.");
_("Use \".\" to terminate letter.") :
_("Use \"~.\" to terminate letter."));
continue;
}
else
......@@ -275,11 +275,11 @@ mail_send0 (compose_env_t * env, int save_to)
if (entry.escfunc)
status = (*entry.escfunc) (argc, argv, env);
else
util_error ("Unknown escape %s", argv[0]);
util_error (_("Unknown escape %s"), argv[0]);
}
else
{
util_error ("can't parse escape sequence");
util_error (_("can't parse escape sequence"));
}
argcv_free (argc, argv);
......@@ -304,7 +304,7 @@ mail_send0 (compose_env_t * env, int save_to)
if (!fp)
{
util_error ("can't open file %s: %s", getenv ("DEAD"),
util_error (_("can't open file %s: %s"), getenv ("DEAD"),
strerror (errno));
}
else
......@@ -359,7 +359,7 @@ mail_send0 (compose_env_t * env, int save_to)
}
if (offset == 0)
util_error ("Null message body; hope that's ok\n");
util_error (_("Null message body; hope that's ok\n"));
if (buf)
free (buf);
}
......@@ -413,7 +413,7 @@ mail_send0 (compose_env_t * env, int save_to)
mailbox_destroy (&mbx);
}
if (status)
util_error ("can't create mailbox %s", env->outfiles[i]);
util_error (_("can't create mailbox %s"), env->outfiles[i]);
}
}
}
......@@ -449,7 +449,7 @@ mail_send0 (compose_env_t * env, int save_to)
msg_to_pipe (sendmail, msg);
}
else
util_error ("variable sendmail not set: no mailer");
util_error (_("variable sendmail not set: no mailer"));
}
message_destroy (&msg, NULL);
remove (filename);
......@@ -497,5 +497,5 @@ msg_to_pipe (const char *cmd, message_t msg)
fclose (fp);
}
else
util_error ("Piping %s failed", cmd);
util_error (_("Piping %s failed"), cmd);
}
......
/* 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"
......
/* 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 "mail.h"
......
/* 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"
......
/* 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"
......
/* 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"
......@@ -48,7 +48,7 @@ mail_source (int argc, char **argv)
if (argc != 2)
{
util_error("source requires an argument");
util_error (_("source requires an argument"));
return 1;
}
......@@ -56,7 +56,7 @@ mail_source (int argc, char **argv)
if (!fp)
{
if (errno != ENOENT)
util_error("can't open `%s': %s", argv[1], strerror(errno));
util_error(_("can't open `%s': %s"), argv[1], strerror(errno));
return 1;
}
......
/* 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"
......@@ -63,13 +63,13 @@ mail_summary (int argc, char **argv)
mailbox_get_url (mbox, &url);
printf("\"%s\": ", url_to_string (url));
}
printf("%d messages", count);
printf (_("%d messages"), count);
if (mnew > 0)
printf(" %d new", mnew);
printf (_(" %d new"), mnew);
if (mseen > 0)
printf(" %d unread", mseen);
printf (_(" %d unread"), mseen);
if (mdelete > 0)
printf(" %d deleted", mdelete);
printf (_(" %d deleted"), mdelete);
printf("\n");
/* Set the cursor. */
......
/* 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"
......
/* 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"
......
/* 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"
......
/* 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"
......
/* 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"
......@@ -26,7 +26,7 @@ mail_unalias (int argc, char **argv)
{
if (argc == 1)
{
util_error("unalias requires at least one argument");
util_error (_("unalias requires at least one argument"));
return 1;
}
while (--argc)
......
/* 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"
......
/* 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"
......
/* 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 "mail.h"
......@@ -148,7 +148,7 @@ util_do_command (const char *c, ...)
}
else
{
util_error ("Unknown command: %s", argv[0]);
util_error (_("Unknown command: %s"), argv[0]);
status = 1;
}
......@@ -390,7 +390,7 @@ util_getenv (void *ptr, const char *variable, mail_env_data_t type, int warn)
if (!mail_env_entry_is_set (env) || env->type != type)
{
if (warn)
util_error ("No value set for \"%s\"", variable);
util_error (_("No value set for \"%s\""), variable);
return 1;
}
if (ptr)
......@@ -488,7 +488,7 @@ util_printenv (int set)
break;
case Mail_env_whatever:
fprintf (ofile, "oops?");
fprintf (ofile, _("oops?"));
}
fprintf (ofile, "\n");
}
......@@ -583,7 +583,7 @@ util_get_homedir ()
if (!homedir)
{
/* Shouldn't happen, but one never knows */
util_error ("can't get homedir");
util_error (_("can't get homedir"));
exit (EXIT_FAILURE);
}
return homedir;
......@@ -646,14 +646,14 @@ util_get_sender(int msgno, int strip)
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;
}
......@@ -721,7 +721,7 @@ util_slist_add (list_t *list, char *value)
if ((p = strdup(value)) == NULL)
{
util_error("not enough memory\n");
util_error(_("not enough memory\n"));
return;
}
list_append (*list, p);
......@@ -879,7 +879,7 @@ util_save_outgoing (message_t msg, char *savefile)
outfile = fopen (filename, "a");
if (!outfile)
{
util_error("can't open save file %s: %s",
util_error(_("can't open save file %s: %s"),
filename, strerror (errno));
}
else
......@@ -896,7 +896,7 @@ util_save_outgoing (message_t msg, char *savefile)
if (!bsize)
{
util_error("not enough memory for creating save file");
util_error(_("not enough memory for creating save file"));
}
else
{
......@@ -981,7 +981,7 @@ util_help (const struct mail_command_entry *table, char *word)
else
{
status = 1;
fprintf (stdout, "Unknown command: %s\n", word);
fprintf (stdout, _("Unknown command: %s\n"), word);
}
return status;
}
......@@ -1006,7 +1006,7 @@ util_descend_subparts (message_t mesg, msgset_t *msgset, message_t *part)
{
if (message_unencapsulate (mesg, &submsg, NULL))
{
util_error ("can't unencapsulate message/part");
util_error (_("can't unencapsulate message/part"));
return 1;
}
mesg = submsg;
......@@ -1015,14 +1015,14 @@ util_descend_subparts (message_t mesg, msgset_t *msgset, message_t *part)
message_get_num_parts (mesg, &nparts);
if (nparts < msgset->msg_part[i])
{
util_error ("no such (sub)part in the message: %d",
util_error (_("no such (sub)part in the message: %d"),
msgset->msg_part[i]);
return 1;
}
if (message_get_part (mesg, msgset->msg_part[i], &submsg))
{
util_error ("can't get (sub)part from the message: %d",
util_error (_("can't get (sub)part from the message: %d"),
msgset->msg_part[i]);
return 1;
}
......@@ -1146,7 +1146,7 @@ util_header_expand (header_t *phdr)
rc = header_create (&hdr, "", 0, NULL);
if (rc)
{
util_error ("can't create temporary header: %s", mu_errstring (rc));
util_error (_("can't create temporary header: %s"), mu_errstring (rc));
return 1;
}
......@@ -1187,10 +1187,10 @@ util_header_expand (header_t *phdr)
{
errcnt++;
if (exp)
util_error ("can't parse address `%s' (while expanding `%s'): %s",
util_error (_("can't parse address `%s' (while expanding `%s'): %s"),
exp, p, mu_errstring (rc));
else
util_error ("can't parse address `%s': %s",
util_error (_("can't parse address `%s': %s"),
p, mu_errstring (rc));
}
......@@ -1243,7 +1243,7 @@ util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int flag)
status = mailbox_get_message (mbox, msgno, msg);
if (status)
{
util_error ("can't get message %lu: %s",
util_error (_("can't get message %lu: %s"),
(unsigned long) msgno, mu_errstring (status));
return status;
}
......@@ -1251,7 +1251,7 @@ util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int flag)
if ((flag & MSG_NODELETED) && util_isdeleted (*msg))
{
if (!(flag & MSG_SILENT))
util_error ("%lu: Inappropriate message (has been deleted)",
util_error (_("%lu: Inappropriate message (has been deleted)"),
(unsigned long) msgno);
return ENOENT;
}
......@@ -1261,6 +1261,6 @@ util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int flag)
int
util_error_range (size_t msgno)
{
util_error ("%d: invalid message number", msgno);
util_error (_("%d: invalid message number"), msgno);
return 1;
}
......
/* 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. */
/* Functions for handling escape variables */
......@@ -55,7 +55,7 @@ parse_headers (FILE *fp, compose_env_t *env)
if ((status = header_create (&header, NULL, 0, NULL)) != 0)
{
util_error ("can't create header: %s", mu_errstring (status));
util_error (_("can't create header: %s"), mu_errstring (status));
return 1;
}
......@@ -91,7 +91,7 @@ parse_headers (FILE *fp, compose_env_t *env)
}
else
{
util_error ("%d: not a header line", line);
util_error (_("%d: not a header line"), line);
errcnt++;
}
}
......@@ -117,7 +117,7 @@ parse_headers (FILE *fp, compose_env_t *env)
}
else
{
util_error ("%d: not a header line", line);
util_error (_("%d: not a header line"), line);
errcnt++;
}
}
......@@ -138,7 +138,7 @@ parse_headers (FILE *fp, compose_env_t *env)
char *p;
header_destroy (&header, NULL);
p = ml_readline ("Edit again?");
p = ml_readline (_("Edit again?"));
if (*p == 'y' || *p == 'Y')
return -1;
else
......@@ -153,7 +153,7 @@ parse_headers (FILE *fp, compose_env_t *env)
static void
var_continue (void)
{
fprintf (stdout, "(continue)\n");
fprintf (stdout, _("(continue)\n"));
}
static int
......@@ -163,7 +163,7 @@ var_check_args (int argc, char **argv)
{
char *escape = "~";
util_getenv (&escape, "escape", Mail_env_string, 0);
util_error ("%c%s requires an argument", escape[0], argv[0]);
util_error (_("%c%s requires an argument"), escape[0], argv[0]);
return 1;
}
return 0;
......@@ -195,12 +195,12 @@ var_command (int argc, char **argv, compose_env_t *env)
entry = util_find_entry (mail_command_table, argv[1]);
if (!entry.func)
{
util_error ("Unknown command: %s", argv[1]);
util_error (_("Unknown command: %s"), argv[1]);
return 1;
}
if (entry.flags & (EF_FLOW | EF_SEND))
{
util_error ("Command not allowed in an escape sequence\n");
util_error (_("Command not allowed in an escape sequence\n"));
return 1;
}
......@@ -251,11 +251,11 @@ var_sign (int argc, char **argv, compose_env_t *env)
if (!fp)
{
util_error ("can't open %s: %s", name, strerror (errno));
util_error (_("can't open %s: %s"), name, strerror (errno));
free (name);
}
fprintf (stdout, "Reading %s\n", name);
fprintf (stdout, _("Reading %s\n"), name);
while (getline (&buf, &n, fp) > 0)
fprintf (ofile, "%s", buf);
......@@ -455,7 +455,7 @@ var_quote (int argc, char **argv, compose_env_t *env)
if (util_get_message (mbox, cursor, &mesg, MSG_NODELETED))
return 1;
fprintf (stdout, "Interpolating: %d\n", cursor);
fprintf (stdout, _("Interpolating: %d\n"), cursor);
util_getenv (&prefix, "indentprefix", Mail_env_string, 0);
......@@ -516,7 +516,7 @@ var_type_input (int argc, char **argv, compose_env_t *env)
{
char buffer[512];
fprintf (env->ofile, "Message contains:\n");
fprintf (env->ofile, _("Message contains:\n"));
dump_headers (env->ofile, env);
......@@ -546,7 +546,7 @@ var_read (int argc, char **argv, compose_env_t *env)
inf = fopen (filename, "r");
if (!inf)
{
util_error ("can't open %s: %s\n", filename, strerror (errno));
util_error (_("can't open %s: %s\n"), filename, strerror (errno));
free (filename);
return 1;
}
......@@ -601,7 +601,7 @@ var_write (int argc, char **argv, compose_env_t *env)
if (!fp)
{
util_error ("can't open %s: %s\n", filename, strerror (errno));
util_error (_("can't open %s: %s\n"), filename, strerror (errno));
free (filename);
return 1;
}
......@@ -631,7 +631,7 @@ var_pipe (int argc, char **argv, compose_env_t *env)
if (argc == 1)
{
util_error ("pipe: no command specified");
util_error (_("pipe: no command specified"));
return 1;
}
......@@ -675,7 +675,7 @@ var_pipe (int argc, char **argv, compose_env_t *env)
xargv[i] = argv[i + 1];
xargv[i] = NULL;
execvp (xargv[0], xargv);
util_error ("cannot exec process `%s': %s", xargv[0], strerror (errno));
util_error (_("cannot exec process `%s': %s"), xargv[0], strerror (errno));
exit (1);
}
else
......@@ -708,14 +708,14 @@ var_pipe (int argc, char **argv, compose_env_t *env)
waitpid (pid, &status, 0);
if (!WIFEXITED (status))
{
util_error ("child terminated abnormally: %d", WEXITSTATUS (status));
util_error (_("child terminated abnormally: %d"), WEXITSTATUS (status));
}
else
{
struct stat st;
if (fstat (fd, &st))
{
util_error ("can't stat output file: %s", strerror (errno));
util_error (_("can't stat output file: %s"), strerror (errno));
}
else if (st.st_size > 0)
rc = 0;
......@@ -725,7 +725,7 @@ var_pipe (int argc, char **argv, compose_env_t *env)
(unsigned long) lines, (unsigned long) size);
if (rc)
{
fprintf (stdout, "no lines out\n");
fprintf (stdout, _("no lines out\n"));
}
else
{
......
/* 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"
......@@ -50,5 +50,6 @@ mail_version (int argc, char **argv)
fprintf (ofile, " )");
}
fprintf (ofile, "\n");
return 0;
}
......
/* 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"
......
/* 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"
......@@ -67,7 +67,7 @@ mail_write (int argc, char **argv)
output = fopen (filename, "a");
if (!output)
{
util_error("can't open %s: %s", filename, strerror (errno));
util_error (_("can't open %s: %s"), filename, strerror (errno));
free (filename);
fclose (output);
msgset_free (msglist);
......
/* 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 @@ z_parse_args(int argc, char **argv, unsigned int *return_count, int *return_dir)
dir = D_NONE;
break;
default:
util_error("Bad arguments for the scrolling command");
util_error (_("Bad arguments for the scrolling command"));
return 1;
}
......@@ -75,7 +75,7 @@ z_parse_args(int argc, char **argv, unsigned int *return_count, int *return_dir)
if (argc > 1)
{
util_error("Too many arguments for the scrolling command");
util_error (_("Too many arguments for the scrolling command"));
return 1;
}
......@@ -83,13 +83,13 @@ z_parse_args(int argc, char **argv, unsigned int *return_count, int *return_dir)
{
if (dir == D_NONE)
{
util_error("argument not applicable for z.");
util_error (_("argument not applicable for z."));
return 1;
}
if ((mul = strtoul (argp, NULL, 10)) == 0)
{
util_error("Bad number of pages");
util_error (_("Bad number of pages"));
return 1;
}
}
......@@ -121,7 +121,7 @@ mail_z (int argc, char **argv)
case D_BWD:
if (cursor < nlines)
{
fprintf(stdout, "On first screenful of messages\n");
fprintf (stdout, _("On first screenful of messages\n"));
return 0;
}
if (cursor < count)
......@@ -133,7 +133,7 @@ mail_z (int argc, char **argv)
case D_FWD:
if (cursor + pagelines > total)
{
fprintf(stdout, "On last screenful of messages\n");
fprintf (stdout, _("On last screenful of messages\n"));
return 0;
}
......@@ -144,7 +144,7 @@ mail_z (int argc, char **argv)
if (nlines <= 0)
{
fprintf(stdout, "On last screenful of messages\n");
fprintf (stdout, _("On last screenful of messages\n"));
return 0;
}
break;
......@@ -157,6 +157,7 @@ mail_z (int argc, char **argv)
when displaying the summary and the headers, new messages
are last but we want to display a screenful with the
real cursor set by summary() to the new message. */
/* Find the start of the last screen page. */
int lastpage = total - pagelines + 1;
if (lastpage <= 0)
......
......@@ -2,7 +2,7 @@
# Copyright (C) 2000,2001,2002 Free Software Foundation
# See file COPYING in the distribution root directory for copying conditions.
INCLUDES = -I${top_srcdir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/mailbox/include -I${top_srcdir}/include/mailutils/gnu
INCLUDES = -I${top_srcdir}/include -I$(top_srcdir)/intl -I${top_srcdir}/mailbox -I${top_srcdir}/mailbox/include -I${top_srcdir}/include/mailutils/gnu
AM_CFLAGS = -DSITE_VIRTUAL_PWDDIR=\"@SITE_VIRTUAL_PWDDIR@\"
SUBDIRS = include testsuite
......@@ -10,6 +10,9 @@ SUBDIRS = include testsuite
lib_LTLIBRARIES = libmailbox.la
bin_PROGRAMS = mailutils-config
localedir = $(datadir)/locale
DEFS = @DEFS@ -DLOCALEDIR=\"$(localedir)\"
EXTRA_DIST = mbx_mboxscan.c strtok_r.c \
strndup.c strnlen.c strchrnul.c argp-ba.c argp-eexst.c \
argp-fmtstream.c argp-fs-xinl.c argp-help.c argp-parse.c argp-pv.c \
......@@ -60,6 +63,7 @@ mu_auth.c \
mutil.c \
muerror.c \
muerrno.c \
nls.c \
observer.c \
parse822.c \
property.c \
......@@ -82,9 +86,9 @@ url_smtp.c \
wicket.c
libmailbox_la_DEPENDENCIES = @MU_LTLIBOBJS@
libmailbox_la_LIBADD = @MU_LTLIBOBJS@
libmailbox_la_LIBADD = @MU_LTLIBOBJS@ @LIBINTL@
libmailbox_la_LDFLAGS = -version-info 0:0:0
mailutils_config_SOURCES = mailutils-config.c
mailutils_config_LDADD = ./libmailbox.la ../lib/libmailutils.la
mailutils_config_CFLAGS = -DCOMPILE_FLAGS="\"-I$(includedir)\"" -DLINK_FLAGS="\"-L$(libdir)\"" -DAUTHLIBS="\"$(MYSQLLIBS)\"" -DGUILE_LIBS="\"$(GUILE_LIBS)\""
mailutils_config_CFLAGS = -DCOMPILE_FLAGS="\"-I$(includedir)\"" -I$(top_srcdir)/intl -DLINK_FLAGS="\"-L$(libdir)\"" -DAUTHLIBS="\"$(MYSQLLIBS)\"" -DGUILE_LIBS="\"$(GUILE_LIBS)\""
......
/* 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 Library 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 Library General Public License for more details.
You should have received a copy of the GNU Library 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
......@@ -31,14 +31,13 @@
static int messages_count (const char *);
const char *argp_program_version = "messages (" PACKAGE_STRING ")";
static char doc[] = "GNU messages -- count the number of messages in a mailbox";
static char args_doc[] = "[mailbox...]";
static char doc[] = N_("GNU messages -- count the number of messages in a mailbox");
static char args_doc[] = N_("[mailbox...]");
static struct argp_option options[] = {
{NULL, 0, NULL, 0,
"messages specific switches:", 0},
{"quiet", 'q', 0, 0, "Only display number of messages"},
{"silent", 's', 0, 0, "Same as -q"},
{ NULL, 0, NULL, 0, N_("messages specific switches:"), 0},
{"quiet", 'q', 0, 0, N_("Only display number of messages")},
{"silent", 's', 0, 0, N_("Same as -q")},
{ 0 }
};
......@@ -98,6 +97,9 @@ main (int argc, char **argv)
int err = 0;
struct arguments args = {0, NULL};
/* Native Language Support */
mu_init_nls ();
mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, NULL, &args);
registrar_get_list (&bookie);
......@@ -126,7 +128,7 @@ messages_count (const char *box)
if (mailbox_create_default (&mbox, box) != 0)
{
fprintf (stderr, "Couldn't create mailbox %s.\n", (box) ? box : "");
fprintf (stderr, _("Couldn't create mailbox %s.\n"), (box) ? box : "");
return -1;
}
......@@ -135,24 +137,24 @@ messages_count (const char *box)
if (mailbox_open (mbox, MU_STREAM_READ) != 0)
{
fprintf (stderr, "Couldn't open mailbox %s.\n", box);
fprintf (stderr, _("Couldn't open mailbox %s.\n"), box);
return -1;
}
if (mailbox_messages_count (mbox, &count) != 0)
{
fprintf (stderr, "Couldn't count messages in %s.\n", box);
fprintf (stderr, _("Couldn't count messages in %s.\n"), box);
return -1;
}
if (silent)
printf ("%d\n", count);
else
printf ("Number of messages in %s: %d\n", box, count);
printf (_("Number of messages in %s: %d\n"), box, count);
if (mailbox_close (mbox) != 0)
{
fprintf (stderr, "Couldn't close %s.\n", box);
fprintf (stderr, _("Couldn't close %s.\n"), box);
return -1;
}
mailbox_destroy (&mbox);
......
/* 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;
......
/* 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;
}
......
/* 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;
}
......
/* 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)
}
}
......
/* 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
......
/* 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);
}
......
/* 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);
......
/* 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;
}
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
GNU Mailutils is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "readmsg.h"
......
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
GNU Mailutils is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
......@@ -29,20 +29,21 @@ static void print_body __P ((message_t));
static int string_starts_with __P ((const char * s1, const char *s2));
const char *argp_program_version = "readmsg (" PACKAGE_STRING ")";
static char doc[] = "GNU readmsg -- print messages";
static char doc[] = N_("GNU readmsg -- print messages");
static error_t readmsg_parse_opt __P((int key, char *arg,
struct argp_state *astate));
static struct argp_option options[] =
{
{ "debug", 'd', 0, 0, "Display debugging information", 1 },
{ "header", 'h', 0, 0, "Display entire header", 1 },
{ "weedlist", 'w', "LIST", 0, "List of header names separated by whitespace or commas", 1 },
{ "folder", 'f', "FOLDER", 0, "Folder to use", 1 },
{ "no-header", 'n', 0, 0, "Exclude all headers", 1 },
{ "form-feeds", 'p', 0, 0, "Output formfeeds between messages", 1 },
{ "debug", 'd', 0, 0, N_("Display debugging information"), 1 },
{ "header", 'h', 0, 0, N_("Display entire header"), 1 },
{ "weedlist", 'w', "LIST", 0,
N_("List of header names separated by whitespace or commas"), 1 },
{ "folder", 'f', "FOLDER", 0, N_("Folder to use"), 1 },
{ "no-header", 'n', 0, 0, N_("Exclude all headers"), 1 },
{ "form-feeds", 'p', 0, 0, N_("Output formfeeds between messages"), 1 },
{ "show-all-match", 'a', NULL, 0,
"Print all messages matching pattern, not just the first", 1 },
N_("Print all messages matching pattern, not just the first"), 1 },
{0, 0, 0, 0}
};
......@@ -224,6 +225,9 @@ main (int argc, char **argv)
int index;
mailbox_t mbox = NULL;
/* Native Language Support */
mu_init_nls ();
mu_argp_parse (&argp, &argc, &argv, 0, readmsg_argp_capa, &index, NULL);
/* Registration. */
......@@ -239,7 +243,7 @@ main (int argc, char **argv)
status = mailbox_create_default (&mbox, mailbox_name);
if (status != 0)
{
fprintf (stderr, "could not create - %s\n", mu_errstring(status));
fprintf (stderr, _("could not create - %s\n"), mu_errstring(status));
exit (2);
}
......@@ -257,7 +261,7 @@ main (int argc, char **argv)
url_t url = NULL;
mailbox_get_url (mbox, &url);
fprintf (stderr, "can't open mailbox %s: %s\n",
fprintf (stderr, _("can't open mailbox %s: %s\n"),
url_to_string (url),
mu_errstring(status));
exit (2);
......
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -39,6 +39,7 @@
#include <mailutils/registrar.h>
#include <mailutils/stream.h>
#include <mailutils/url.h>
#include <mailutils/nls.h>
int msglist __P ((mailbox_t mbox, int show_all, int argc, char **argv, int **set, int *n));
......