diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-08-25 10:31:59 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-08-25 10:31:59 +0300 |
commit | 8619a1cb3b5a4b84b365571b711cf792e12ab620 (patch) | |
tree | 2932c275c7d31826f79d5fef7ab962a4101819ff | |
parent | 0c606c74e0195d00bb1410114e7b871c08c2a7f0 (diff) | |
download | mailutils-8619a1cb3b5a4b84b365571b711cf792e12ab620.tar.gz mailutils-8619a1cb3b5a4b84b365571b711cf792e12ab620.tar.bz2 |
Change error messages to comply with the GNU standards.
The string MESSAGE should not begin with a capital letter when it
follows a program name and/or file name, because that isn't the
beginning of a sentence. (The sentence conceptually starts at the
beginning of the line.) Also, it should not end with a period.
* include/mailutils/diag.h (mu_diag_funcall): New prototype.
* mailbox/diag.c: New function.
* comsat/action.c, comsat/comsat.c, comsat/oldcfg.c,
config/mailutils-config.c, configure.ac, dotlock/dotlock.c,
frm/common.c, frm/from.c, guimb/collect.c, guimb/main.c,
guimb/util.c, imap4d/auth_gsasl.c, imap4d/auth_gss.c, imap4d/bye.c,
imap4d/close.c, imap4d/imap4d.c, imap4d/login.c, imap4d/preauth.c,
imap4d/signal.c, imap4d/starttls.c, imap4d/util.c, lib/mailcap.c,
lib/tcpwrap.c, libmu_argp/mu_argp.c, libmu_auth/ldap.c,
libmu_auth/radius.c, libmu_auth/sql.c, libmu_auth/tls.c,
libmu_cfg/acl.c, libmu_cfg/common.c, libmu_cfg/init.c,
libmu_cfg/ldap.c, libmu_cfg/sql.c, libmu_sieve/actions.c,
libmu_sieve/comparator.c, libmu_sieve/extensions/moderator.c,
libmu_sieve/prog.c, libmu_sieve/sieve.l, libproto/imap/folder.c,
libproto/mbox/mbox.c, maidag/deliver.c, maidag/lmtp.c,
maidag/maidag.c, maidag/mailquota.c, maidag/mailtmp.c,
maidag/script.c, mail/alias.c, mail/cd.c, mailbox/cfg_lexer.l,
mailbox/cfg_parser.y, mailbox/file_stream.c, mailbox/gocs.c,
mailbox/msrv.c, mailbox/mutil.c, mailbox/registrar.c,
messages/messages.c, mh/folder.c, mh/forw.c, mh/inc.c, mh/mark.c,
mh/mh_ctx.c, mh/mh_fmtgram.y, mh/mh_format.c, mh/mh_init.c,
mh/mh_list.c, mh/mh_msgset.c, mh/mh_whatnow.c, mh/mh_whom.c,
mh/mhl.c, mh/mhn.c, mh/pick.c, mh/refile.c, mh/repl.c, mh/rmf.c,
mh/scan.c, mh/send.c, mimeview/mimetypes.l, mimeview/mimeview.c,
movemail/movemail.c, pop3d/apop.c, pop3d/bulletin.c, pop3d/extra.c,
pop3d/lock.c, pop3d/logindelay.c, pop3d/pop3d.c, pop3d/popauth.c,
pop3d/quit.c, pop3d/signal.c, pop3d/user.c, readmsg/readmsg.c,
sieve/sieve.c: Fix error messages.
93 files changed, 576 insertions, 548 deletions
diff --git a/comsat/action.c b/comsat/action.c index 727870c83..74baf181e 100644 --- a/comsat/action.c +++ b/comsat/action.c @@ -1,6 +1,6 @@ /* GNU Mailutils -- a suite of utilities for electronic mail Copyright (C) 1999, 2000, 2001, 2002, 2005, - 2007 Free Software Foundation, Inc. + 2007, 2009 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 @@ -294,13 +294,13 @@ action_exec (FILE *tty, int line, int argc, char **argv) if (argc == 0) { - mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: No arguments for exec"), username, line); + mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: no arguments for exec"), username, line); return; } if (argv[0][0] != '/') { - mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: Not an absolute pathname"), + mu_diag_output (MU_DIAG_ERROR, _("%s:.biffrc:%d: not an absolute pathname"), username, line); return; } @@ -328,7 +328,7 @@ action_exec (FILE *tty, int line, int argc, char **argv) dup2 (fileno (tty), 2); fclose (tty); execv (argv[0], argv); - mu_diag_output (MU_DIAG_ERROR, _("Cannot execute %s: %s"), argv[0], strerror (errno)); + mu_diag_output (MU_DIAG_ERROR, _("cannot execute %s: %s"), argv[0], strerror (errno)); exit (0); } } diff --git a/comsat/comsat.c b/comsat/comsat.c index 1bdbc98db..1353eb10f 100644 --- a/comsat/comsat.c +++ b/comsat/comsat.c @@ -1,6 +1,6 @@ /* GNU Mailutils -- a suite of utilities for electronic mail Copyright (C) 1999, 2000, 2001, 2002, 2005, - 2007, 2008 Free Software Foundation, Inc. + 2007, 2008, 2009 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 @@ -247,7 +247,7 @@ comsat_process (char *buffer, size_t rdlen) p = strchr (buffer, '@'); if (!p) { - mu_diag_output (MU_DIAG_ERROR, _("Malformed input: %s"), buffer); + mu_diag_output (MU_DIAG_ERROR, _("malformed input: %s"), buffer); return; } *p++ = 0; @@ -321,8 +321,8 @@ comsat_prefork (int fd, void *data, struct sockaddr *s, int size) delay = overflow_delay_time << (overflow_count + 1); mu_diag_output (MU_DIAG_NOTICE, - ngettext ("Too many requests: pausing for %u second", - "Too many requests: pausing for %u seconds", + ngettext ("too many requests: pausing for %u second", + "too many requests: pausing for %u seconds", delay), delay); /* FIXME: drain the socket? */ @@ -365,8 +365,8 @@ comsat_connection (int fd, struct sockaddr *sa, int salen, { char *p = mu_sockaddr_to_astr (sa, salen); mu_diag_output (MU_DIAG_INFO, - ngettext ("Received %d byte from %s", - "Received %d bytes from %s", rdlen), + ngettext ("received %d byte from %s", + "received %d bytes from %s", rdlen), rdlen, p); mu_diag_output (MU_DIAG_INFO, "string: %s", buffer); free (p); @@ -377,7 +377,7 @@ comsat_connection (int fd, struct sockaddr *sa, int salen, int rc = mu_udp_server_set_bufsize (srv, rdlen + 1); if (rc) { - mu_error (_("Cannot resize buffer: %s"), mu_strerror (rc)); + mu_error (_("cannot resize buffer: %s"), mu_strerror (rc)); return 0; } } @@ -418,7 +418,7 @@ notify_user (const char *user, const char *device, const char *path, return; if ((fp = fopen (device, "w")) == NULL) { - mu_error (_("Cannot open device %s: %m"), device); + mu_error (_("cannot open device %s: %s"), device, mu_strerror (errno)); return; } @@ -434,7 +434,7 @@ notify_user (const char *user, const char *device, const char *path, if ((status = mu_mailbox_create (&mbox, path)) != 0 || (status = mu_mailbox_open (mbox, MU_STREAM_READ|MU_STREAM_QACCESS)) != 0) { - mu_error (_("Cannot open mailbox %s: %s"), + mu_error (_("cannot open mailbox %s: %s"), path, mu_strerror (status)); return; } @@ -442,7 +442,7 @@ notify_user (const char *user, const char *device, const char *path, status = mu_mailbox_quick_get_message (mbox, qid, &msg); if (status) { - mu_error (_("Cannot get message (mailbox %s, qid %s): %s"), + mu_error (_("cannot get message (mailbox %s, qid %s): %s"), path, qid, mu_strerror (status)); return; /* FIXME: Notify the user, anyway */ } @@ -484,7 +484,8 @@ find_user (const char *name, char *tty) if (strncmp (ftty, PATH_TTY_PFX, strlen (PATH_TTY_PFX))) { /* An attempt to break security... */ - mu_diag_output (MU_DIAG_ALERT, _("Bad line name in utmp record: %s"), ftty); + mu_diag_output (MU_DIAG_ALERT, + _("bad line name in utmp record: %s"), ftty); return NOT_HERE; } @@ -492,7 +493,8 @@ find_user (const char *name, char *tty) { if (!S_ISCHR (statb.st_mode)) { - mu_diag_output (MU_DIAG_ALERT, _("Not a character device: %s"), ftty); + mu_diag_output (MU_DIAG_ALERT, + _("not a character device: %s"), ftty); return NOT_HERE; } @@ -525,7 +527,7 @@ change_user (const char *user) pw = getpwnam (user); if (!pw) { - mu_diag_output (MU_DIAG_CRIT, _("No such user: %s"), user); + mu_diag_output (MU_DIAG_CRIT, _("no such user: %s"), user); return 1; } @@ -546,7 +548,7 @@ mailbox_path (const char *user) if (!auth) { - mu_diag_output (MU_DIAG_ALERT, _("User nonexistent: %s"), user); + mu_diag_output (MU_DIAG_ALERT, _("user nonexistent: %s"), user); return NULL; } @@ -592,7 +594,7 @@ main (int argc, char **argv) if (argc < 2 || argc > 2) { - mu_error (_("Mailbox URL and message QID are required in test mode")); + mu_error (_("mailbox URL and message QID are required in test mode")); exit (EXIT_FAILURE); } @@ -605,7 +607,7 @@ main (int argc, char **argv) struct passwd *pw = getpwuid (getuid ()); if (!pw) { - mu_error (_("Cannot determine user name")); + mu_error (_("cannot determine user name")); exit (EXIT_FAILURE); } user = pw->pw_name; @@ -632,7 +634,7 @@ main (int argc, char **argv) { if (argv[0][0] != '/') mu_diag_output (MU_DIAG_NOTICE, - _("Program name is not absolute; reloading will not " + _("program name is not absolute; reloading will not " "be possible")); else { @@ -650,7 +652,7 @@ main (int argc, char **argv) mu_m_server_destroy (&server); if (reload) { - mu_diag_output (MU_DIAG_NOTICE, _("Restarting")); + mu_diag_output (MU_DIAG_NOTICE, _("restarting")); execvp (argv[0], argv); } } diff --git a/comsat/oldcfg.c b/comsat/oldcfg.c index b4f235f0a..b59ae72f7 100644 --- a/comsat/oldcfg.c +++ b/comsat/oldcfg.c @@ -45,7 +45,7 @@ convert_config (const char *config_file, FILE *outfile) fp = fopen (config_file, "r"); if (!fp) { - mu_error (_("Cannot open config file %s: %s"), config_file, + mu_error (_("cannot open config file %s: %s"), config_file, mu_strerror (errno)); return; } diff --git a/config/mailutils-config.c b/config/mailutils-config.c index 99689b963..e4037d42c 100644 --- a/config/mailutils-config.c +++ b/config/mailutils-config.c @@ -134,7 +134,7 @@ add_entry (int level, char *ptr) int i; if (nentry >= sizeof(lib_entry)/sizeof(lib_entry[0])) { - mu_error (_("Too many arguments")); + mu_error (_("too many arguments")); exit (1); } diff --git a/configure.ac b/configure.ac index f852b9269..513a373cb 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([m4]) # Enable silent rules by default: -test -z "$enable_silent_rules" && AM_DEFAULT_VERBOSITY=0 +AM_SILENT_RULES([yes]) dnl Autobuild stuff AB_INIT diff --git a/dotlock/dotlock.c b/dotlock/dotlock.c index 882b1de02..8d9098b56 100644 --- a/dotlock/dotlock.c +++ b/dotlock/dotlock.c @@ -1,6 +1,6 @@ /* GNU Mailutils -- a suite of utilities for electronic mail Copyright (C) 1999, 2000, 2001, 2002, 2005, - 2007, 2008 Free Software Foundation, Inc. + 2007, 2008, 2009 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 @@ -100,7 +100,7 @@ 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; @@ -178,7 +178,7 @@ main (int argc, char *argv[]) if ((err = mu_locker_create (&locker, file, flags))) { if (debug) - fprintf (stderr, _("Creating locker failed: %s\n"), mu_strerror (err)); + mu_diag_funcall (MU_DIAG_ERROR, "mu_locker_create", NULL, err); return MU_DL_EX_ERROR; } @@ -201,10 +201,9 @@ main (int argc, char *argv[]) mu_locker_destroy (&locker); if (debug && err) - fprintf (stderr, - unlock ? _("Unlocking the file %s failed: %s\n") : - _("Locking the file %s failed: %s\n"), - file, mu_strerror (err)); + mu_error (unlock ? _("unlocking the file %s failed: %s") : + _("locking the file %s failed: %s"), + file, mu_strerror (err)); switch (err) { diff --git a/frm/common.c b/frm/common.c index 4cd4f7152..7e0ed3ec2 100644 --- a/frm/common.c +++ b/frm/common.c @@ -1,6 +1,6 @@ /* GNU Mailutils -- a suite of utilities for electronic mail Copyright (C) 1999, 2000, 2001, 2002, 2003, - 2004, 2005, 2006, 2007 Free Software Foundation, Inc. + 2004, 2005, 2006, 2007, 2009 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 @@ -385,7 +385,7 @@ rfc2047_decode_wrapper (const char *buf, size_t buflen) if (rc) { if (frm_debug) - mu_error (_("Cannot decode line `%s': %s"), + mu_error (_("cannot decode line `%s': %s"), buf, mu_strerror (rc)); return strdup (buf); } @@ -528,7 +528,7 @@ frm_abort (mu_mailbox_t *mbox) { mu_url_t url; - mu_error (_("Could not close mailbox `%s': %s"), + mu_error (_("could not close mailbox `%s': %s"), mu_url_to_string (url), mu_strerror (status)); exit (3); } @@ -556,10 +556,10 @@ frm_scan (char *mailbox_name, frm_select_t fun, size_t *total) if (status != 0) { if (mailbox_name) - mu_error (_("Could not create mailbox `%s': %s"), + mu_error (_("could not create mailbox `%s': %s"), mailbox_name, mu_strerror (status)); else - mu_error (_("Could not create default mailbox: %s"), + mu_error (_("could not create default mailbox: %s"), mu_strerror (status)); exit (3); } @@ -578,7 +578,7 @@ frm_scan (char *mailbox_name, frm_select_t fun, size_t *total) *total = 0; else if (status != 0) { - mu_error (_("Could not open mailbox `%s': %s"), + mu_error (_("could not open mailbox `%s': %s"), mu_url_to_string (url), mu_strerror (status)); frm_abort (&mbox); } @@ -598,7 +598,7 @@ frm_scan (char *mailbox_name, frm_select_t fun, size_t *total) status = mu_mailbox_scan (mbox, 1, total); if (status != 0) { - mu_error (_("Could not scan mailbox `%s': %s."), + mu_error (_("could not scan mailbox `%s': %s."), mu_url_to_string (url), mu_strerror (status)); frm_abort (&mbox); } @@ -608,7 +608,7 @@ frm_scan (char *mailbox_name, frm_select_t fun, size_t *total) if ((status = mu_mailbox_close (mbox)) != 0) { - mu_error (_("Could not close mailbox `%s': %s"), + mu_error (_("could not close mailbox `%s': %s"), |