Commit fa01b9cb fa01b9cbb9debb399266d8784b850bdba576b086 by Wojciech Polak

Added NLS.

1 parent 6d06fd60
/* 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
......@@ -28,32 +28,33 @@
#include <mailutils/argp.h>
#include <mailutils/errno.h>
#include <mailutils/locker.h>
#include <mailutils/nls.h>
const char *argp_program_version = "GNU dotlock (" PACKAGE_STRING ")";
static char doc[] =
"GNU dotlock -- lock mail spool files"
N_("GNU dotlock -- lock mail spool files"
"\v"
"Returns 0 on success, 3 if the locking the file fails because"
" it's already locked, and 1 if some other kind of error occurred."
;
static char args_doc[] = "FILE";
" it's already locked, and 1 if some other kind of error occurred.");
static char args_doc[] = N_("FILE");
error_t argp_err_exit_status = MU_DL_EX_ERROR;
static struct argp_option options[] = {
{"unlock", 'u', NULL, 0,
"Unlock", 0},
N_("Unlock"), 0},
{"force", 'f', "MINUTES", OPTION_ARG_OPTIONAL,
"Forcibly break an existing lock older than a certain time", 0},
N_("Forcibly break an existing lock older than a certain time"), 0},
{"retry", 'r', "RETRIES", OPTION_ARG_OPTIONAL,
"Retry the lock a few times", 0},
N_("Retry the lock a few times"), 0},
{"debug", 'd', NULL, 0,
"Print details of failure reasons to stderr", 0},
N_("Print details of failure reasons to stderr"), 0},
{"test", 'T', "PROGRAM", OPTION_HIDDEN,
"Test external dotlocker", 0},
N_("Test external dotlocker"), 0},
{NULL, 0, NULL, 0, NULL, 0}
};
......@@ -100,7 +101,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
{
retries = atoi (arg);
if (retries <= 0)
argp_error (state, "RETRIES must be greater than 0");
argp_error (state, _("RETRIES must be greater than 0"));
}
flags |= MU_LOCKER_RETRY;
break;
......@@ -110,7 +111,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
{
force = atoi (arg);
if (force <= 0)
argp_error (state, "MINUTES must be greater than 0");
argp_error (state, _("MINUTES must be greater than 0"));
force *= 60;
}
flags |= MU_LOCKER_TIME;
......@@ -118,12 +119,12 @@ parse_opt (int key, char *arg, struct argp_state *state)
case ARGP_KEY_ARG:
if (file)
argp_error (state, "only one FILE can be specified");
argp_error (state, _("only one FILE can be specified"));
file = arg;
break;
case ARGP_KEY_NO_ARGS:
argp_error (state, "FILE must be specified");
argp_error (state, _("FILE must be specified"));
default:
return ARGP_ERR_UNKNOWN;
......@@ -139,6 +140,9 @@ main (int argc, char *argv[])
pid_t usergid = getgid();
pid_t mailgid = getegid();
/* Native Language Support */
mu_init_nls ();
/* Drop permissions during argument parsing. */
if(setegid(usergid) < 0)
......@@ -149,7 +153,7 @@ main (int argc, char *argv[])
if ((err = locker_create (&locker, file, flags)))
{
if (debug)
fprintf (stderr, "locker create failed: %s\n", mu_errstring (err));
fprintf (stderr, _("locker create failed: %s\n"), mu_errstring (err));
return MU_DL_EX_ERROR;
}
......@@ -177,8 +181,8 @@ main (int argc, char *argv[])
locker_destroy (&locker);
if (debug && err)
fprintf (stderr, "%slocking %s failed: %s\n",
unlock ? "un" : "", file, mu_errstring (err));
fprintf (stderr, _("%s %s failed: %s\n"),
unlock ? _("unlocking") : _("locking"), file, mu_errstring (err));
switch (err)
{
......
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 1999, 2000 Free Software Foundation, Inc.
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 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. */
/**
......@@ -20,6 +20,7 @@
* Created as an example for using mailutils API
* Sean 'Shaleh' Perry <shaleh@debian.org>, 1999
* Alain Magloire alainm@gnu.org
* NLS: Wojciech Polak <polak@gnu.org>
*
**/
......@@ -43,12 +44,13 @@
#include <mailutils/message.h>
#include <mailutils/registrar.h>
#include <mailutils/stream.h>
#include <mailutils/nls.h>
const char *argp_program_version = "from (" PACKAGE_STRING ")";
static char doc[] = "GNU from -- display from and subject";
static char doc[] = N_("GNU from -- display from and subject");
static struct argp_option options[] = {
{"debug", 'd', NULL, 0, "Enable debugging output", 0},
{"debug", 'd', NULL, 0, N_("Enable debugging output"), 0},
{0, 0, 0, 0}
};
......@@ -96,6 +98,9 @@ main(int argc, char **argv)
char personal[128];
int status;
/* Native Language Support */
mu_init_nls ();
{
int opt;
mu_argp_parse (&argp, &argc, &argv, 0, capa, &opt, NULL);
......@@ -114,7 +119,7 @@ main(int argc, char **argv)
if ((status = mailbox_create_default (&mbox, mailbox_name)) != 0)
{
fprintf (stderr, "opening %s failed: %s\n",
fprintf (stderr, _("opening %s failed: %s\n"),
mailbox_name,
mu_errstring (status)
);
......@@ -131,7 +136,7 @@ main(int argc, char **argv)
if ((status = mailbox_open (mbox, MU_STREAM_READ)) != 0)
{
fprintf (stderr, "opening %s failed: %s\n",
fprintf (stderr, _("opening %s failed: %s\n"),
mailbox_name,
mu_errstring (status)
);
......@@ -147,7 +152,7 @@ main(int argc, char **argv)
if ((status = mailbox_get_message (mbox, i, &msg)) != 0
|| (status = message_get_header (msg, &hdr)) != 0)
{
fprintf (stderr, "msg %d : %s\n", i, mu_errstring(status));
fprintf (stderr, _("msg %d : %s\n"), i, 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
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,10 +38,11 @@
#include <mailutils/message.h>
#include <mailutils/registrar.h>
#include <mailutils/stream.h>
#include <mailutils/nls.h>
const char *argp_program_version = "mail.remote (" PACKAGE_STRING ")";
static char doc[] =
"GNU mail.remote -- pseudo-sendmail interface for mail delivery\n"
N_("GNU mail.remote -- pseudo-sendmail interface for mail delivery\n"
"\v"
"\n"
"An RFC2822 formatted message is read from stdin and delivered using\n"
......@@ -68,13 +69,12 @@ static char doc[] =
"\n"
"If --debug is specified, the envelope commands in the SMTP protocol\n"
"transaction will be printed to stdout. If specified more than once,\n"
"the data part of the protocol transaction will also be printed to stdout.\n"
;
"the data part of the protocol transaction will also be printed to stdout.\n");
static struct argp_option options[] = {
{"from", 'f', "ADDR", 0, "Override the default from address\n"},
{"debug", 'd', NULL, 0, "Enable debugging output"},
{ 0, 'o', "OPT", OPTION_HIDDEN, "Ignored for sendmail compatibility"},
{"from", 'f', "ADDR", 0, N_("Override the default from address\n")},
{"debug", 'd', NULL, 0, N_("Enable debugging output")},
{ 0, 'o', "OPT", OPTION_HIDDEN, N_("Ignored for sendmail compatibility")},
{0}
};
......@@ -106,7 +106,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
static struct argp argp = {
options,
parse_opt,
"[TO-ADDR]...",
N_("[TO-ADDR]..."),
doc,
};
......@@ -132,6 +132,9 @@ main (int argc, char **argv)
int mailer_flags = 0;
/* Native Language Support */
mu_init_nls ();
/* Register mailers. */
{
list_t bookie;
......@@ -145,7 +148,7 @@ main (int argc, char **argv)
{
if ((status = address_create (&from, optfrom)))
{
fprintf (stderr, "Parsing from addresses failed: %s\n",
fprintf (stderr, _("Parsing from addresses failed: %s\n"),
mu_errstring (status));
goto end;
}
......@@ -157,7 +160,7 @@ main (int argc, char **argv)
if ((status = address_createv (&to, (const char **) av, -1)))
{
fprintf (stderr, "Parsing to addresses failed: %s\n",
fprintf (stderr, _("Parsing to addresses failed: %s\n"),
mu_errstring (status));
goto end;
}
......@@ -165,25 +168,25 @@ main (int argc, char **argv)
if ((status = stdio_stream_create (&in, stdin, 0)))
{
fprintf (stderr, "Failed: %s\n", mu_errstring (status));
fprintf (stderr, _("Failed: %s\n"), mu_errstring (status));
goto end;
}
if ((status = stream_open (in)))
{
fprintf (stderr, "Opening stdin failed: %s\n", mu_errstring (status));
fprintf (stderr, _("Opening stdin failed: %s\n"), mu_errstring (status));
goto end;
}
if ((status = message_create (&msg, NULL)))
{
fprintf (stderr, "Failed: %s\n", mu_errstring (status));
fprintf (stderr, _("Failed: %s\n"), mu_errstring (status));
goto end;
}
if ((status = message_set_stream (msg, in, NULL)))
{
fprintf (stderr, "Failed: %s\n",
fprintf (stderr, _("Failed: %s\n"),
mu_errstring (status));
goto end;
}
......@@ -192,7 +195,7 @@ main (int argc, char **argv)
{
const char *url = NULL;
mailer_get_url_default (&url);
fprintf (stderr, "Creating mailer '%s' failed: %s\n",
fprintf (stderr, _("Creating mailer '%s' failed: %s\n"),
url, mu_errstring (status));
goto end;
}
......@@ -211,20 +214,20 @@ main (int argc, char **argv)
{
const char *url = NULL;
mailer_get_url_default (&url);
fprintf (stderr, "Opening mailer '%s' failed: %s\n",
fprintf (stderr, _("Opening mailer '%s' failed: %s\n"),
url, mu_errstring (status));
goto end;
}
if ((status = mailer_send_message (mailer, msg, from, to)))
{
fprintf (stderr, "Sending message failed: %s\n", mu_errstring (status));
fprintf (stderr, _("Sending message failed: %s\n"), mu_errstring (status));
goto end;
}
if ((status = mailer_close (mailer)))
{
fprintf (stderr, "Closing mailer failed: %s\n", mu_errstring (status));
fprintf (stderr, _("Closing mailer failed: %s\n"), mu_errstring (status));
goto end;
}
......
......@@ -520,16 +520,20 @@ mail_warranty (int argc, char **argv)
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);
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"
" 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"
" 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\n"), ofile);
return 0;
}
......
/* 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. */
/* fmtcheck */
......@@ -25,10 +25,10 @@ static char args_doc[] = "";
/* GNU options */
static struct argp_option options[] = {
{"form", 'F', "FILE", 0, "Read format from given file"},
{"format", 't', "FORMAT", 0, "Use this format string"},
{"dump", 'd', NULL, 0, "Dump the listing of compiled format code"},
{ "\nUse -help switch to obtain the list of traditional MH options. ", 0, 0, OPTION_DOC, "" },
{"form", 'F', "FILE", 0, N_("Read format from given file")},
{"format", 't', "FORMAT", 0, N_("Use this format string")},
{"dump", 'd', NULL, 0, N_("Dump the listing of compiled format code")},
{ N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
{ 0 }
};
......@@ -50,7 +50,7 @@ action_dump ()
{
if (!format_str)
{
mh_error ("format string not specified");
mh_error (_("format string not specified"));
return 1;
}
mh_format_dump (&format);
......@@ -85,12 +85,15 @@ opt_handler (int key, char *arg, void *unused)
int
main (int argc, char **argv)
{
/* Native Language Support */
mu_init_nls ();
mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
if (format_str && mh_format_parse (format_str, &format))
{
mh_error ("Bad format string");
mh_error (_("Bad format string"));
exit (1);
}
return (*action) ();
......
/* 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. */
/* MH folder command */
......@@ -34,27 +34,31 @@
const char *argp_program_version = "folder (" PACKAGE_STRING ")";
static char doc[] = "GNU MH folder";
static char args_doc[] = "[action] [msg]";
static char args_doc[] = N_("[action] [msg]");
#define ARG_PUSH 1
#define ARG_POP 2
static struct argp_option options[] = {
{"Actions are:", 0, 0, OPTION_DOC, "", 0 },
{"print", 'p', NULL, 0, "List the folders (default)", 1 },
{"list", 'l', NULL, 0, "List the contents of the folder stack", 1},
{"push", ARG_PUSH, "FOLDER", OPTION_ARG_OPTIONAL, "Push the folder on the folder stack. If FOLDER is specified, it is pushed. Otherwise, if a folder is given in the command line (via + or --folder), it is pushed on stack. Otherwise, the current folder and the top of the folder stack are exchanged", 1},
{"pop", ARG_POP, NULL, 0, "Pop the folder off the folder stack", 1},
{N_("Actions are:"), 0, 0, OPTION_DOC, "", 0 },
{"print", 'p', NULL, 0, N_("List the folders (default)"), 1 },
{"list", 'l', NULL, 0, N_("List the contents of the folder stack"), 1},
{"push", ARG_PUSH, "FOLDER", OPTION_ARG_OPTIONAL,
N_("Push the folder on the folder stack. If FOLDER is specified, it is pushed. "
"Otherwise, if a folder is given in the command line (via + or --folder), "
"it is pushed on stack. Otherwise, the current folder and the top of the folder "
"stack are exchanged"), 1},
{"pop", ARG_POP, NULL, 0, N_("Pop the folder off the folder stack"), 1},
{"Options are:", 0, 0, OPTION_DOC, "", 2 },
{"folder", 'f', "FOLDER", 0, "Specify folder to operate upon", 3},
{"all", 'a', NULL, 0, "List all folders", 3},
{"create", 'c', "BOOL", OPTION_ARG_OPTIONAL, "Create non-existing folders", 3},
{"fast", 'F', "BOOL", OPTION_ARG_OPTIONAL, "List only the folder names", 3},
{"header", 'h', "BOOL", OPTION_ARG_OPTIONAL, "Print the header line", 3},
{"recurse", 'r', "BOOL", OPTION_ARG_OPTIONAL, "Scan folders recursively", 3},
{"total", 't', "BOOL", OPTION_ARG_OPTIONAL, "Output the total statistics", 3},
{ "\nUse -help switch to obtain the list of traditional MH options. ", 0, 0, OPTION_DOC, "", 4 },
{N_("Options are:"), 0, 0, OPTION_DOC, "", 2 },
{"folder", 'f', "FOLDER", 0, N_("Specify folder to operate upon"), 3},
{"all", 'a', NULL, 0, N_("List all folders"), 3},
{"create", 'c', "BOOL", OPTION_ARG_OPTIONAL, N_("Create non-existing folders"), 3},
{"fast", 'F', "BOOL", OPTION_ARG_OPTIONAL, N_("List only the folder names"), 3},
{"header", 'h', "BOOL", OPTION_ARG_OPTIONAL, N_("Print the header line"), 3},
{"recurse", 'r', "BOOL", OPTION_ARG_OPTIONAL, N_("Scan folders recursively"), 3},
{"total", 't', "BOOL", OPTION_ARG_OPTIONAL, N_("Output the total statistics"), 3},
{ N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "", 4 },
{NULL},
};
......@@ -246,7 +250,7 @@ _scan (const char *name, int depth)
if (!dir)
{
mh_error ("can't scan folder %s: %s", name, strerror (errno));
mh_error (_("can't scan folder %s: %s"), name, strerror (errno));
return;
}
......@@ -263,7 +267,7 @@ _scan (const char *name, int depth)
{
asprintf (&p, "%s/%s", name, entry->d_name);
if (stat (p, &st) < 0)
mh_error ("can't stat %s: %s", p, strerror (errno));
mh_error (_("can't stat %s: %s"), p, strerror (errno));
else if (S_ISDIR (st.st_mode))
{
info.others++;
......@@ -320,8 +324,8 @@ print_all ()
if (info->message_count)
{
printf (info->message_count == 1 ?
" has %4lu message (%4lu-%4lu)" :
" has %4lu messages (%4lu-%4lu)",
_(" has %4lu message (%4lu-%4lu)") :
_(" has %4lu messages (%4lu-%4lu)"),
(unsigned long) info->message_count,
(unsigned long) info->min,
(unsigned long) info->max);
......@@ -330,7 +334,7 @@ print_all ()
}
else
{
printf (" has no messages");
printf (_(" has no messages"));
}
if (info->others)
......@@ -339,7 +343,7 @@ print_all ()
printf ("; ");
else
printf ("; ");
printf ("(others)");
printf (_("(others)"));
}
printf (".\n");
}
......@@ -397,8 +401,8 @@ action_print ()
print_all ();
if (print_total)
printf ("\n%24.24s=%4lu messages in %4lu folders\n",
"TOTAL",
printf (_("\n%24.24s=%4lu messages in %4lu folders\n"),
_("TOTAL"),
(unsigned long) message_count,
(unsigned long) folder_info_count);
}
......@@ -481,7 +485,10 @@ main (int argc, char **argv)
{
int index = 0;
mh_msgset_t msgset;
/* Native Language Support */
mu_init_nls ();
mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......@@ -501,7 +508,7 @@ main (int argc, char **argv)
}
else if (argc - index > 1)
{
mh_error ("too many arguments");
mh_error (_("too many arguments"));
exit (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. */
/* MH inc command */
......@@ -21,25 +21,25 @@
const char *argp_program_version = "inc (" PACKAGE_STRING ")";
static char doc[] = "GNU MH inc";
static char args_doc[] = "[+folder]";
static char args_doc[] = N_("[+folder]");
/* GNU options */
static struct argp_option options[] = {
{"file", 'i', "FILE", 0, "Inorporate mail from named file"},
{"folder", 'f', "FOLDER", 0, "Specify folder to incorporate mail to"},
{"audit", 'a', "FILE", 0, "Enable audit"},
{"noaudit", 'n', 0, 0, "Disable audit"},
{"changecur", 'c', "BOOL", OPTION_ARG_OPTIONAL, "Mark first incorporated message as current (default)"},
{"form", 'F', "FILE", 0, "Read format from given file"},
{"format", 't', "FORMAT", 0, "Use this format string"},
{"truncate", 'T', "BOOL", OPTION_ARG_OPTIONAL, "Truncate source mailbox after incorporating (default)"},
{"width", 'w', "NUMBER", 0, "Set output width"},
{"quiet", 'q', 0, 0, "Be quiet"},
{"license", 'l', 0, 0, "Display software license", -1},
{ "\nUse -help switch to obtain the list of traditional MH options. ", 0, 0, OPTION_DOC, "" },
{"file", 'i', "FILE", 0, N_("Inorporate mail from named file")},
{"folder", 'f', "FOLDER", 0, N_("Specify folder to incorporate mail to")},
{"audit", 'a', "FILE", 0, N_("Enable audit")},
{"noaudit", 'n', 0, 0, N_("Disable audit")},
{"changecur", 'c', "BOOL", OPTION_ARG_OPTIONAL,
N_("Mark first incorporated message as current (default)")},
{"form", 'F', "FILE", 0, N_("Read format from given file")},
{"format", 't', "FORMAT", 0, N_("Use this format string")},
{"truncate", 'T', "BOOL", OPTION_ARG_OPTIONAL,
N_("Truncate source mailbox after incorporating (default)")},
{"width", 'w', "NUMBER", 0, N_("Set output width")},
{"quiet", 'q', 0, 0, N_("Be quiet")},
{"license", 'l', 0, 0, N_("Display software license"), -1},
{ N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
{ 0 }
};
......@@ -106,12 +106,12 @@ opt_handler (int key, char *arg, void *unused)
case 'T':
truncate_source = is_true(arg);
break;
case 'w':
width = strtoul (arg, NULL, 0);
if (!width)
{
mh_error ("Invalid width");
mh_error (_("Invalid width"));
exit (1);
}
break;
......@@ -119,7 +119,11 @@ opt_handler (int key, char *arg, void *unused)
case 'q':
quiet = 1;
break;
case 'l':
mh_license (argp_program_version);
break;
default:
return 1;
}
......@@ -152,13 +156,16 @@ main (int argc, char **argv)
char *buffer;
mh_format_t format;
int rc;
/* Native Language Support */
mu_init_nls ();
mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
if (!quiet && mh_format_parse (format_str, &format))
{
mh_error ("Bad format string");
mh_error (_("Bad format string"));
exit (1);
}
......@@ -167,7 +174,7 @@ main (int argc, char **argv)
{
if ((rc = mailbox_create_default (&input, NULL)) != 0)
{
mh_error ("Can not create default mailbox",
mh_error (_("Can not create default mailbox"),
mu_errstring (rc));
exit (1);
}
......@@ -176,7 +183,7 @@ main (int argc, char **argv)
}
else if ((rc = mailbox_create_default (&input, input_file)) != 0)
{
mh_error ("Can not create mailbox %s: %s",
mh_error (_("Can not create mailbox %s: %s"),
input_file, mu_errstring (rc));
exit (1);
}
......@@ -185,7 +192,7 @@ main (int argc, char **argv)
{
url_t url;
mailbox_get_url (input, &url);
mh_error ("Can not open mailbox %s: %s",
mh_error (_("Can not open mailbox %s: %s"),
url_to_string (url),
mu_errstring (errno));
exit (1);
......@@ -193,14 +200,14 @@ main (int argc, char **argv)
if ((rc = mailbox_messages_count (input, &total)) != 0)
{
mh_error ("Can not read input mailbox: %s", mu_errstring (errno));
mh_error (_("Can not read input mailbox: %s"), mu_errstring (errno));
exit (1);
}
output = mh_open_folder (append_folder, 1);
if ((rc = mailbox_messages_count (output, &lastmsg)) != 0)
{
mh_error ("Can not read output mailbox: %s",
mh_error (_("Can not read output mailbox: %s"),
mu_errstring (errno));
exit (1);
}
......@@ -223,14 +230,14 @@ main (int argc, char **argv)
if ((rc = mailbox_get_message (input, n, &imsg)) != 0)
{
mh_error ("%d: can't get message: %s",
mh_error (_("%d: can't get message: %s"),
n, mu_errstring (errno));
continue;
}
if ((rc = mailbox_append_message (output, imsg)) != 0)
{
mh_error ("%d: error appending message: %s",
mh_error (_("%d: error appending message: %s"),
n, mu_errstring (errno));
continue;
}
......
/* 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
......@@ -40,6 +40,7 @@
#include <mailutils/attribute.h>
#include <mailutils/error.h>
#include <mailutils/errno.h>
#include <mailutils/nls.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. */
/* Coexistence between GNU long options, traditional UNIX-style short
......@@ -114,7 +114,7 @@ mh_argp_parse (int argc, char **argv,
_argv = calloc (_argc+1, sizeof *_argv);
if (!_argv)
{
mh_error ("not enough memory");
mh_error (_("not enough memory"));
abort ();
}
for (i = 0; i < argc; i++)
......@@ -135,7 +135,7 @@ mh_argp_parse (int argc, char **argv,
*pindex = index;
else if (extra)
{
mh_error ("extra arguments");
mh_error (_("extra arguments"));
exit (1);
}
mh_init2 ();
......@@ -145,21 +145,22 @@ mh_argp_parse (int argc, char **argv,
void
mh_license (const char *name)
{
static char license_text[] =
" 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";
printf ("This is %s\n%s", name, license_text);
printf (_("This is %s\n\n"), name);
printf (
_(" 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"
" 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"
" 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\n"));
exit (0);
}
......
/* 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. */
/* MH context functions. */
......@@ -28,7 +28,7 @@ mh_context_create (char *name, int copy)
ctx = malloc (sizeof (*ctx));
if (!ctx)
{
mu_error ("not enough memory");
mu_error (_("not enough memory"));
abort ();
}
if (copy)
......@@ -38,7 +38,7 @@ mh_context_create (char *name, int copy)
ctx->name = strdup (name);
if (!ctx->name)
{
mu_error ("not enough memory");
mu_error (_("not enough memory"));
abort ();
}
}
......@@ -88,7 +88,7 @@ mh_context_write (mh_context_t *ctx)
fp = fopen (ctx->name, "w");
if (!fp)
{
mh_error ("can't write context file %s: %s",
mh_error (_("can't write context file %s: %s"),
ctx->name, strerror (errno));
return 1;
}
......@@ -130,7 +130,7 @@ mh_context_set_value (mh_context_t *ctx, const char *name, const char *value)
int rc;
if ((rc = header_create (&ctx->header, NULL, 0, NULL)) != 0)
{
mh_error ("Can't create context %s: %s",
mh_error (_("Can't create context %s: %s"),
ctx->name,
mu_errstring (rc));
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 <mh.h>
......@@ -94,7 +94,7 @@ pitem : item
break;
default:
yyerror ("UNEXPECTED item TYPE");
yyerror (_("UNEXPECTED item TYPE"));
abort ();
}
$$ = pc;
......@@ -200,7 +200,7 @@ function : FUNCTION
}
else
{
yyerror ("undefined function");
yyerror (_("undefined function"));
mh_error ($1);
YYERROR;
}
......@@ -615,13 +615,13 @@ mh_code_builtin (mh_builtin_t *bp, int argtype)
break;
default:
yyerror ("UNKNOWN ARGTYPE");
yyerror (_("UNKNOWN ARGTYPE"));
abort ();
}
}
else
{
mh_error ("missing argument for %s", bp->name);
mh_error (_("missing argument for %s"), bp->name);
return 0;
}
}
......@@ -630,7 +630,7 @@ mh_code_builtin (mh_builtin_t *bp, int argtype)
switch (bp->argtype)
{
case mhtype_none:
mh_error ("extra arguments to %s", bp->name);
mh_error (_("extra arguments to %s"), bp->name);
return 0;
case mhtype_num:
......
/* 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. */
/* Parse traditional MH options. */
......@@ -96,9 +96,9 @@ mh_help (struct mh_option *mh_opt, const char *doc)
{
struct mh_option *p;
printf ("Compatibility syntax:\n");
printf ("%s [switches] %s\n", program_invocation_short_name, doc);
printf (" switches are:\n");
printf (_("Compatibility syntax:\n"));
printf (_("%s [switches] %s\n"), program_invocation_short_name, doc);
printf (_(" switches are:\n"));
for (p = mh_opt; p->opt; p++)
{
......@@ -119,5 +119,7 @@ mh_help (struct mh_option *mh_opt, const char *doc)
printf ("\n");
}
printf (" -help\n");
printf ("\nPlease use GNU long options instead. Run %s --help for more info on these.\n", program_invocation_short_name);
printf (_("\nPlease use GNU long options instead.\n"
"Run %s --help for more info on these.\n"),
program_invocation_short_name);
}
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2002 Free Software Foundation, Inc.
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.
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 GNU Mailutils; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <mailutils/argp.h>
#include <mailutils/nls.h>
#define MH_OPT_BOOL 1
#define MH_OPT_ARG 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
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. */
/* Initialize MH applications. */
......@@ -70,14 +70,14 @@ mh_read_formfile (char *name, char **pformat)
if (stat (name, &st))
{
mh_error ("can't stat format file %s: %s", name, strerror (errno));
mh_error (_("can't stat format file %s: %s"), name, strerror (errno));
return -1;
}
fp = fopen (name, "r");
if (!fp)
{
mh_error ("can't open format file %s: %s", name, strerror (errno));
mh_error (_("can't open format file %s: %s"), name, strerror (errno));
return -1;
}
......@@ -120,7 +120,7 @@ mh_get_my_name (char *name)
struct passwd *pw = getpwuid (getuid ());
if (!pw)
{
mh_error ("can't determine my username");
mh_error (_("can't determine my username"));
return;
}
name = pw->pw_name;
......@@ -161,7 +161,7 @@ mh_check_folder (char *pathname, int confirm)
{
if (errno == ENOENT)
{
if (!confirm || mh_getyn ("Create folder \"%s\"", p))
if (!confirm || mh_getyn (_("Create folder \"%s\""), p))
{
int perm = 0711;
char *pb = mh_global_profile_get ("Folder-Protect", NULL);
......@@ -169,7 +169,7 @@ mh_check_folder (char *pathname, int confirm)
perm = strtoul (pb, NULL, 8);
if (mkdir (p, perm))
{
mh_error ("Can't create directory %s: %s",
mh_error (_("Can't create directory %s: %s"),
p, strerror (errno));
return 1;
}
......@@ -180,7 +180,7 @@ mh_check_folder (char *pathname, int confirm)
}
else
{
mh_error ("can't stat %s: %s", p, strerror (errno));
mh_error (_("can't stat %s: %s"), p, strerror (errno));
return 1;
}
}
......@@ -221,7 +221,7 @@ mh_getyn (const char *fmt, ...)
return 0;
}
fprintf (stdout, "Please answer yes or no: ");
fprintf (stdout, _("Please answer yes or no: "));
}
return 0; /* to pacify gcc */
}
......@@ -246,7 +246,7 @@ mh_audit_open (char *name, mailbox_t mbox)
free (home);
if (!p)
{
mh_error ("low memory");
mh_error (_("low memory"));
exit (1);
}
free (namep);
......@@ -256,7 +256,7 @@ mh_audit_open (char *name, mailbox_t mbox)
fp = fopen (namep, "a");
if (!fp)
{
mh_error ("Can't open audit file %s: %s", namep, strerror (errno));
mh_error (_("Can't open audit file %s: %s"), namep, strerror (errno));
free (namep);
return NULL;
}
......@@ -299,7 +299,7 @@ mh_open_folder (const char *folder, int create)
if (mailbox_create_default (&mbox, name))
{
mh_error ("Can't create mailbox %s: %s",
mh_error (_("Can't create mailbox %s: %s"),
name, strerror (errno));
exit (1);
}
......@@ -309,7 +309,7 @@ mh_open_folder (const char *folder, int create)
if (mailbox_open (mbox, flags))
{
mh_error ("Can't open mailbox %s: %s", name, strerror (errno));
mh_error (_("Can't open mailbox %s: %s"), name, strerror (errno));
exit (1);
}
......@@ -368,7 +368,7 @@ mh_iterate (mailbox_t mbox, mh_msgset_t *msgset,
num = msgset->list[i];
if ((rc = mailbox_get_message (mbox, num, &msg)) != 0)
{
mh_error ("can't get message %d: %s", num, mu_errstring (rc));
mh_error (_("can't get message %d: %s"), num, mu_errstring (rc));
return 1;
}
......
......@@ -32,7 +32,7 @@ _expand (size_t *msgcnt, size_t **msglist, size_t inc)
*msglist = realloc (*msglist, (*msgcnt)*sizeof(**msglist));
if (!*msglist)
{
mh_error ("not enough memory");
mh_error (_("not enough memory"));
abort ();
}
}
......@@ -41,7 +41,7 @@ _expand (size_t *msgcnt, size_t **msglist, size_t inc)
static void
msgset_abort (const char *arg)
{
mh_error ("bad message list `%s'", arg);
mh_error (_("bad message list `%s'"), arg);
exit (1);
}
......@@ -63,7 +63,7 @@ msgset_last (mailbox_t mbox, size_t *pnum)
rc = mailbox_messages_count (mbox, &count);
if (rc)
{
mh_error ("can't get last message: %s", mu_errstring (rc));
mh_error (_("can't get last message: %s"), mu_errstring (rc));
exit (1);
}
*pnum = count;
......@@ -96,7 +96,7 @@ msgset_cur (mailbox_t mbox, size_t *pnum)
return 0;
}
}
mh_error ("no cur message");
mh_error (_("no cur message"));
exit (1);
}
......@@ -107,7 +107,7 @@ msgset_prev (mailbox_t mbox, size_t *pnum)
msgset_cur (mbox, &cur_n);
if (cur_n < 1)
{
mh_error ("mo prev message");
mh_error (_("no prev message"));
exit (1);
}
*pnum = cur_n - 1;
......@@ -122,7 +122,7 @@ msgset_next (mailbox_t mbox, size_t *pnum)
mailbox_messages_count (mbox, &total);
if (cur_n + 1 > total)
{
mh_error ("mo next message");
mh_error (_("no next message"));
exit (1);
}
*pnum = cur_n + 1;
......@@ -164,7 +164,7 @@ msgset_preproc_part (mailbox_t mbox, char *arg, char **rest)
rc = mailbox_get_message (mbox, num, &msg);
if (rc)
{
mh_error ("can't get message %d: %s", num, mu_errstring (rc));
mh_error (_("can't get message %d: %s"), num, mu_errstring (rc));
exit (1);
}
message_get_uid (msg, &uid);
......@@ -334,7 +334,7 @@ _mh_msgset_parse (mailbox_t mbox, mh_msgset_t *msgset, int argc, char **argv)
if (expand_user_seq (mbox, &m, arg))
{
mh_error ("message set %s does not exist", arg);
mh_error (_("message set %s does not exist"), arg);
exit (1);
}
_expand (&msgcnt, &msglist, m.count);
......@@ -351,7 +351,7 @@ _mh_msgset_parse (mailbox_t mbox, mh_msgset_t *msgset, int argc, char **argv)
n = mh_get_message (mbox, start, NULL);
if (!n)
{
mh_error ("message %d does not exist", start);
mh_error (_("message %d does not exist"), start);
exit (1);
}
msglist[msgno++] = n;
......@@ -377,7 +377,7 @@ _mh_msgset_parse (mailbox_t mbox, mh_msgset_t *msgset, int argc, char **argv)
}
if (msgno == msg_first)
{
mh_error ("no messages in range %s", argv[i]);
mh_error (_("no messages in range %s"), argv[i]);
exit (1);
}
break;
......@@ -405,7 +405,7 @@ _mh_msgset_parse (mailbox_t mbox, mh_msgset_t *msgset, int argc, char **argv)
}
if (msgno == msg_first)
{
mh_error ("no messages in range %s", argv[i]);
mh_error (_("no messages in range %s"), argv[i]);
exit (1);
}
break;
......@@ -590,7 +590,7 @@ mh_msgset_negate (mailbox_t mbox, mh_msgset_t *msgset)
list = calloc (total, sizeof (list[0]));
if (!list)
{
mh_error ("not enough memory");
mh_error (_("not enough memory"));
abort ();
}
......@@ -603,7 +603,7 @@ mh_msgset_negate (mailbox_t mbox, mh_msgset_t *msgset)
list = realloc (list, sizeof (list[0]) * msgno);
if (!list)
{
mh_error ("not enough memory");
mh_error (_("not enough memory"));
abort ();
}
mh_msgset_free (msgset);
......@@ -611,6 +611,3 @@ mh_msgset_negate (mailbox_t mbox, mh_msgset_t *msgset)
msgset->list = list;
}
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 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. */
/* MH mhpath command */
......@@ -21,12 +21,12 @@
const char *argp_program_version = "mhpath (" PACKAGE_STRING ")";
static char doc[] = "GNU MH mhpath";
static char args_doc[] = "[+folder] [msgs]";
static char args_doc[] = N_("[+folder] [msgs]");
/* GNU options */
static struct argp_option options[] = {
{"folder", 'f', "FOLDER", 0, "Specify folder to operate upon"},
{ "\nUse -help switch to obtain the list of traditional MH options. ", 0, 0, OPTION_DOC, "" },
{"folder", 'f', "FOLDER", 0, N_("Specify folder to operate upon")},
{ N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
{ 0 }
};
......@@ -70,7 +70,10 @@ main (int argc, char **argv)
size_t total;
mh_msgset_t msgset;
int status;
/* Native Language Support */
mu_init_nls ();
mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 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. */
/* MH refile command */
......@@ -26,18 +26,21 @@
const char *argp_program_version = "refile (" PACKAGE_STRING ")";
static char doc[] = "GNU MH refile";
static char args_doc[] = "messages folder [folder...]";
static char args_doc[] = N_("messages folder [folder...]");
/* GNU options */
static struct argp_option options[] = {
{"folder", 'f', "FOLDER", 0, "Specify folder to operate upon"},
{"draft", 'd', NULL, 0, "Use <mh-dir>/draft as the source message"},
{"link", 'l', "BOOL", OPTION_ARG_OPTIONAL, "(not implemented) Preserve the source folder copy"},
{"preserve", 'p', "BOOL", OPTION_ARG_OPTIONAL, "(not implemented) Try to preserve message sequence numbers"},
{"source", 's', "FOLDER", 0, "Specify source folder. FOLDER will became the current folder after the program exits."},
{"folder", 'f', "FOLDER", 0, N_("Specify folder to operate upon")},
{"draft", 'd', NULL, 0, N_("Use <mh-dir>/draft as the source message")},
{"link", 'l', "BOOL", OPTION_ARG_OPTIONAL,
N_("(not implemented) Preserve the source folder copy")},
{"preserve", 'p', "BOOL", OPTION_ARG_OPTIONAL,
N_("(not implemented) Try to preserve message sequence numbers")},
{"source", 's', "FOLDER", 0,
N_("Specify source folder. FOLDER will became the current folder after the program exits.")},
{"src", 0, NULL, OPTION_ALIAS, NULL},
{"file", 'F', "FILE", 0, "Use FILE as the source message"},
{ "\nUse -help switch to obtain the list of traditional MH options. ", 0, 0, OPTION_DOC, "" },
{"file", 'F', "FILE", 0, N_("Use FILE as the source message")},
{ N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
{ 0 }
};
......@@ -62,7 +65,7 @@ add_folder (const char *folder)
{
if (!folder_name_list && list_create (&folder_name_list))
{
mh_error ("can't create folder list");
mh_error (_("can't create folder list"));
exit (1);
}
list_append (folder_name_list, strdup (folder));
......@@ -75,19 +78,19 @@ open_folders ()
if (!folder_name_list)
{
mh_error ("no folder specified");
mh_error (_("no folder specified"));
exit (1);
}
if (list_create (&folder_mbox_list))
{
mh_error ("can't create folder list");
mh_error (_("can't create folder list"));
exit (1);
}
if (iterator_create (&itr, folder_name_list))
{
mh_error ("can't create iterator");
mh_error (_("can't create iterator"));
exit (1);
}
......@@ -112,7 +115,7 @@ enumerate_folders (void (*f) __P((void *, mailbox_t)), void *data)
if (iterator_create (&itr, folder_mbox_list))
{
mh_error ("can't create iterator");
mh_error (_("can't create iterator"));
exit (1);
}
......@@ -178,7 +181,7 @@ refile_folder (void *data, mailbox_t mbox)
rc = mailbox_append_message (mbox, msg);
if (rc)
{
mh_error ("error appending message: %s", mu_errstring (rc));
mh_error (_("error appending message: %s"), mu_errstring (rc));
exit (1);
}
}
......@@ -208,7 +211,7 @@ open_source (char *file_name)
if (stat (file_name, &st) < 0)
{
mh_error ("can't stat file %s: %s", file_name, strerror (errno));
mh_error (_("can't stat file %s: %s"), file_name, strerror (errno));
return NULL;
}
......@@ -216,13 +219,13 @@ open_source (char *file_name)
fd = open (file_name, O_RDONLY);
if (fd == -1)
{
mh_error ("can't open file %s: %s", file_name, strerror (errno));
mh_error (_("can't open file %s: %s"), file_name, strerror (errno));
return NULL;
}
if (read (fd, buffer, st.st_size) != st.st_size)
{
mh_error ("error reading file %s: %s", file_name, strerror (errno));
mh_error (_("error reading file %s: %s"), file_name, strerror (errno));
return NULL;
}
......@@ -232,7 +235,7 @@ open_source (char *file_name)
if (mailbox_create (&tmp, "/dev/null")
|| mailbox_open (tmp, MU_STREAM_READ) != 0)
{
mh_error ("can't create temporary mailbox");
mh_error (_("can't create temporary mailbox"));
return NULL;
}
......@@ -240,7 +243,7 @@ open_source (char *file_name)
|| stream_open (stream))
{
mailbox_close (tmp);
mh_error ("can't create temporary stream");
mh_error (_("can't create temporary stream"));
return NULL;
}
......@@ -266,12 +269,12 @@ open_source (char *file_name)
if (mailbox_messages_count (tmp, &len)
|| len < 1)
{
mh_error ("input file %s is not a valid message file", file_name);
mh_error (_("input file %s is not a valid message file"), file_name);
return NULL;
}
else if (len > 1)
{
mh_error ("input file %s contains %lu messages",
mh_error (_("input file %s contains %lu messages"),
(unsigned long) len);
return NULL;
}
......@@ -286,7 +289,10 @@ main (int argc, char **argv)
mh_msgset_t msgset;
mailbox_t mbox;
int status;
/* Native Language Support */
mu_init_nls ();
mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......@@ -294,7 +300,7 @@ main (int argc, char **argv)
{
if (index < argc)
{
mh_error ("both message set and source file given");
mh_error (_("both message set and source file given"));
exit (1);
}
mbox = open_source (source_file);
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 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. */
/* MH reply command */
......@@ -21,7 +21,7 @@
const char *argp_program_version = "reply (" PACKAGE_STRING ")";
static char doc[] = "GNU MH reply";
static char args_doc[] = "[+folder] [msg]";
static char args_doc[] = N_("[+folder] [msg]");
#define ARG_NOEDIT 1
#define ARG_FCC 2
......@@ -35,28 +35,28 @@ static char args_doc[] = "[+folder] [msg]";
/* GNU options */
static struct argp_option options[] = {
{"annotate", 'a', "BOOL", OPTION_ARG_OPTIONAL,
"Add Replied: header to the message being replied to"},
N_("Add Replied: header to the message being replied to")},
{"draftfolder", 'd', "FOLDER", 0,
"Invoke the draftfolder facility"},
N_("Invoke the draftfolder facility")},
{"draftmessage" , 'm', "MSG", 0,
"Invoke the draftmessage facility"},
N_("Invoke the draftmessage facility")},
{"cc", 'c', "{all|to|cc|me}", 0,
"Specify whom to place on the Cc: list of the reply"},
N_("Specify whom to place on the Cc: list of the reply")},
{"nocc", 'n', "{all|to|cc|me}", 0,
"Specify whom to remove from the Cc: list of the reply"},
{"folder", 'f', "FOLDER", 0, "Specify folder to operate upon"},
{"editor", 'e', "PROG", 0, "Set the editor program to use"},
{"noedit", ARG_NOEDIT, 0, 0, "Suppress the initial edit"},
{"fcc", ARG_FCC, "FOLDER", 0, "Set the folder to receive Fcc's."},
N_("Specify whom to remove from the Cc: list of the reply")},
{"folder", 'f', "FOLDER", 0, N_("Specify folder to operate upon")},
{"editor", 'e', "PROG", 0, N_("Set the editor program to use")},
{"noedit", ARG_NOEDIT, 0, 0, N_("Suppress the initial edit")},
{"fcc", ARG_FCC, "FOLDER", 0, N_("Set the folder to receive Fcc's.")},
{"filter", ARG_FILTER, "PROG", 0,
"Set the filter program to preprocess the body of the message being replied"},
{"form", 'F', "FILE", 0, "Read format from given file"},
{"inplace", ARG_INPLACE, "BOOL", 0, "Annotate the message in place"},
{"query", ARG_QUERY, "BOOL", 0, "Query for addresses to place in To: and Cc: lists"},
{"width", 'w', "NUMBER", 0, "Set output width"},
N_("Set the filter program to preprocess the body of the message being replied")},
{"form", 'F', "FILE", 0, N_("Read format from given file")},
{"inplace", ARG_INPLACE, "BOOL", 0, N_("Annotate the message in place")},
{"query", ARG_QUERY, "BOOL", 0, N_("Query for addresses to place in To: and Cc: lists")},
{"width", 'w', "NUMBER", 0, N_("Set output width")},
{"whatnowproc", ARG_WHATNOWPROC, "PROG", 0,
"Set the relacement for whatnow program"},
{ "\nUse -help switch to obtain the list of traditional MH options. ", 0, 0, OPTION_DOC, "" },
N_("Set the relacement for whatnow program")},
{ N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
{ 0 }
};
......@@ -116,7 +116,7 @@ opt_handler (int key, char *arg, void *unused)
width = strtoul (arg, NULL, 0);
if (!width)
{
mh_error ("Invalid width");
mh_error (_("Invalid width"));
exit (1);
}
break;
......@@ -133,7 +133,7 @@ opt_handler (int key, char *arg, void *unused)
case ARG_INPLACE:
case ARG_QUERY:
case ARG_WHATNOWPROC:
mh_error ("option is not yet implemented");
mh_error (_("option is not yet implemented"));
exit (1);
default:
......@@ -155,7 +155,7 @@ make_draft ()
fp = fopen (draft_file, "w+");
if (!fp)
{
mh_error ("cannot open draft file %s: %s",
mh_error (_("cannot open draft file %s: %s"),
draft_file, strerror (errno));
exit (1);
}
......@@ -163,7 +163,7 @@ make_draft ()
rc = mailbox_get_message (mbox, msgset.list[0], &msg);
if (rc)
{
mh_error ("cannot read message %lu: %s",
mh_error (_("cannot read message %lu: %s"),
(unsigned long) msgset.list[0],
mu_errstring (rc));
exit (1);
......@@ -178,12 +178,15 @@ int
main (int argc, char **argv)
{
int index;
/* Native Language Support */
mu_init_nls ();
mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
if (mh_format_parse (format_str, &format))
{
mh_error ("Bad format string");
mh_error (_("Bad format string"));
exit (1);
}
......@@ -191,7 +194,7 @@ main (int argc, char **argv)
mh_msgset_parse (mbox, &msgset, argc - index, argv + index, "cur");
if (msgset.count != 1)
{
mh_error ("only one message at a time!");
mh_error (_("only one message at a time!"));
return 1;
}
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 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. */
/* MH rmf command */
......@@ -30,14 +30,15 @@
const char *argp_program_version = "rmf (" PACKAGE_STRING ")";
static char doc[] = "GNU MH rmf";
static char args_doc[] = "[+folder]";
static char args_doc[] = N_("[+folder]");
/* GNU options */
static struct argp_option options[] = {
{"folder", 'f', "FOLDER", 0, "Specify the folder to delete"},
{"interactive", 'i', "BOOL", OPTION_ARG_OPTIONAL, "Interactive mode: ask for confirmation before removing each folder"},
{"recursive", 'r', NULL, 0, "Recursively delete all subfolders"},
{ "\nUse -help switch to obtain the list of traditional MH options. ", 0, 0, OPTION_DOC, "" },
{"folder", 'f', "FOLDER", 0, N_("Specify the folder to delete")},
{"interactive", 'i', "BOOL", OPTION_ARG_OPTIONAL,
N_("Interactive mode: ask for confirmation before removing each folder")},
{"recursive", 'r', NULL, 0, N_("Recursively delete all subfolders")},
{ N_("\nUse -help switch to obtain the list of traditional MH options. "), 0, 0, OPTION_DOC, "" },
{ 0 }
};
......@@ -86,11 +87,11 @@ rmf (const char *name)
if (!dir)
{
mh_error ("can't scan folder %s: %s", name, strerror (errno));
mh_error (_("can't scan folder %s: %s"), name, strerror (errno));
return;
}
if (interactive && !mh_getyn ("Remove folder %s", name))
if (interactive && !mh_getyn (_("Remove folder %s"), name))
exit (0);
while ((entry = readdir (dir)))
......@@ -105,7 +106,7 @@ rmf (const char *name)
asprintf (&p, "%s/%s", name, entry->d_name);
if (stat (p, &st) < 0)
{
mh_error ("can't stat %s: %s", p, strerror (errno));
mh_error (_("can't stat %s: %s"), p, strerror (errno));
}
else if (S_ISDIR (st.st_mode))
{
......@@ -115,7 +116,7 @@ rmf (const char *name)
else
{
if (unlink (p))
mh_error ("can't unlink %s: %s", p, strerror (errno));
mh_error (_("can't unlink %s: %s"), p, strerror (errno));
}
free (p);
}
......@@ -127,6 +128,10 @@ int
main (int argc, char **argv)
{
char *name;
/* Native Language Support */
mu_init_nls ();
mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
opt_handler, NULL, NULL);
if (!explicit_folder)
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 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. */
/* MH rmm command */
......@@ -21,13 +21,13 @@
const char *argp_program_version = "rmm (" PACKAGE_STRING ")";
static char doc[] = "GNU MH rmm";
static char args_doc[] = "[+folder] [msgs]";
static char args_doc[] = N_("[+folder] [msgs]");
/* GNU options */
static struct argp_option options[] = {
{"folder", 'f', "FOLDER", 0, "Specify folder to operate upon"},
{ "\nUse -help switch to obtain the list of traditional MH options. ", 0, 0, OPTION_DOC, "" },
{"folder", 'f', "FOLDER", 0, N_("Specify folder to operate upon")},
{ N_("\nUse -help switch to obtain the list of traditional MH options. "),
0, 0, OPTION_DOC, "" },
{ 0 }
};
......@@ -67,7 +67,10 @@ main (int argc, char **argv)
mailbox_t mbox;
mh_msgset_t msgset;
int status;
/* Native Language Support */
mu_init_nls ();
mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
......@@ -83,5 +86,3 @@ main (int argc, char **argv)
return status;
}
......
/* 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. */
/* MH scan command */
......@@ -27,22 +27,24 @@
const char *argp_program_version = "scan (" PACKAGE_STRING ")";
static char doc[] = "GNU MH scan";
static char args_doc[] = "[+folder] [msgs]";
static char args_doc[] = N_("[+folder] [msgs]");
/* GNU options */
static struct argp_option options[] = {
{"folder", 'f', "FOLDER", 0, "Specify folder to scan"},
{"clear", 'c', "BOOL", OPTION_ARG_OPTIONAL, "Clear screen after displaying the list"},
{"form", 'F', "FILE", 0, "Read format from given file"},
{"format", 't', "FORMAT", 0, "Use this format string"},
{"header", 'H', "BOOL", OPTION_ARG_OPTIONAL, "Display header"},
{"width", 'w', "NUMBER", 0, "Set output width"},
{"reverse", 'r', "BOOL", OPTION_ARG_OPTIONAL, "List messages in reverse order"},
{"file", 'i', "FILE", 0, "[Not yet implemented]"},
{"folder", 'f', "FOLDER", 0, N_("Specify folder to scan")},
{"clear", 'c', "BOOL", OPTION_ARG_OPTIONAL,
N_("Clear screen after displaying the list")},
{"form", 'F', "FILE", 0, N_("Read format from given file")},
{"format", 't', "FORMAT", 0, N_("Use this format string")},
{"header", 'H', "BOOL", OPTION_ARG_OPTIONAL, N_("Display header")},
{"width", 'w', "NUMBER", 0, N_("Set output width")},
{"reverse", 'r', "BOOL", OPTION_ARG_OPTIONAL, N_("List messages in reverse order")},
{"file", 'i', "FILE", 0, N_("[Not yet implemented]")},
{"license", 'l', 0, 0, "Display software license", -1},
{"license", 'l', 0, 0, N_("Display software license"), -1},
{ "\nUse -help switch to obtain the list of traditional MH options. ", 0, 0, OPTION_DOC, "" },
{ N_("\nUse -help switch to obtain the list of traditional MH options. "),
0, 0, OPTION_DOC, "" },
{ 0 }
};
......@@ -103,7 +105,7 @@ opt_handler (int key, char *arg, void *unused)
width = strtoul (arg, NULL, 0);
if (!width)
{
mh_error ("Invalid width");
mh_error (_("Invalid width"));
exit (1);
}
break;
......@@ -113,7 +115,7 @@ opt_handler (int key, char *arg, void *unused)
break;
case 'i':
mh_error ("'i' is not yet implemented.");
mh_error (_("'i' is not yet implemented."));
break;
case 'l':
......@@ -132,13 +134,16 @@ main (int argc, char **argv)
{
int index;
mailbox_t mbox;
/* Native Language Support */
mu_init_nls ();
mh_argp_parse (argc, argv, options, mh_option, args_doc, doc,
opt_handler, NULL, &index);
if (mh_format_parse (format_str, &format))
{
mh_error ("Bad format string");
mh_error (_("Bad format string"));
exit (1);
}
......@@ -214,7 +219,7 @@ scan (mailbox_t mbox)
mailbox_get_url (mbox, &url);
time (&t);
strftime (datestr, sizeof datestr, "%c", localtime (&t));
printf ("Folder %s %s\n", url_to_string (url), datestr);
printf (_("Folder %s %s\n"), url_to_string (url), datestr);
}
mh_iterate (mbox, &msgset, list_message, &list_data);
......