Commit d981545a d981545ad0215e57ac8f40ceb3c117f3b83f80cf by Sergey Poznyakoff

Removed spurions indications of action

names in diagnostic messages. Sieve_error prepends them
automatically now.
1 parent 8a1a497d
......@@ -60,10 +60,7 @@ sieve_action_fileinto (sieve_machine_t mach, list_t args, list_t tags)
sieve_value_t *val = sieve_value_get (args, 0);
if (!val)
{
sieve_error (mach,
/* TRANSLATORS: 'fileinto' is the name of a Sieve action.
Do not translate it! */
_("fileinto: cannot get filename!"));
sieve_error (mach, _("cannot get filename!"));
sieve_abort (mach);
}
sieve_log_action (mach, "FILEINTO", _("delivering into %s"), val->v.string);
......@@ -73,10 +70,7 @@ sieve_action_fileinto (sieve_machine_t mach, list_t args, list_t tags)
rc = message_save_to_mailbox (mach->msg, mach->ticket, mach->mu_debug,
val->v.string);
if (rc)
sieve_error (mach,
/* TRANSLATORS: 'fileinto' is the name of a Sieve action.
Do not translate it! */
_("fileinto: cannot save to mailbox: %s"),
sieve_error (mach, _("cannot save to mailbox: %s"),
mu_strerror (rc));
else
sieve_mark_deleted (mach->msg, 1);
......@@ -245,10 +239,7 @@ sieve_action_reject (sieve_machine_t mach, list_t args, list_t tags)
sieve_value_t *val = sieve_value_get (args, 0);
if (!val)
{
sieve_error (mach,
/* TRANSLATORS: 'reject' is the name of a Sieve action.
Do not translate it! */
_("reject: cannot get text!"));
sieve_error (mach, _("reject: cannot get text!"));
sieve_abort (mach);
}
sieve_log_action (mach, "REJECT", NULL);
......@@ -264,9 +255,7 @@ sieve_action_reject (sieve_machine_t mach, list_t args, list_t tags)
if (rc)
{
sieve_error (mach,
/* TRANSLATORS: 'reject' is the name of a Sieve action.
Do not translate it! */
_("%d: reject - cannot create to address <%s>: %s\n"),
_("%d: cannot create recipient address <%s>: %s\n"),
sieve_get_message_num (mach),
addrtext, mu_strerror (rc));
free (addrtext);
......@@ -278,9 +267,7 @@ sieve_action_reject (sieve_machine_t mach, list_t args, list_t tags)
if (rc)
{
sieve_error (mach,
/* TRANSLATORS: 'reject' is the name of a Sieve action.
Do not translate it! */
_("%d: reject - cannot create from address <%s>: %s\n"),
_("%d: cannot create sender address <%s>: %s\n"),
sieve_get_message_num (mach),
sieve_get_daemon_email (mach),
mu_strerror (rc));
......@@ -294,9 +281,7 @@ sieve_action_reject (sieve_machine_t mach, list_t args, list_t tags)
mailer_get_url (mailer, &url);
sieve_error (mach,
/* TRANSLATORS: 'reject' is the name of a Sieve action.
Do not translate it! */
_("%d: reject - cannot open mailer %s: %s\n"),
_("%d: cannot open mailer %s: %s\n"),
sieve_get_message_num (mach),
url_to_string (url),
mu_strerror (rc));
......@@ -371,9 +356,7 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
sieve_value_t *val = sieve_value_get (args, 0);
if (!val)
{
/* TRANSLATORS: 'redirect' is the name of a Sieve action.
Do not translate it! */
sieve_error (mach, _("redirect: cannot get address!"));
sieve_error (mach, _("cannot get address!"));
sieve_abort (mach);
}
......@@ -381,9 +364,7 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
if (rc)
{
sieve_error (mach,
/* TRANSLATORS: 'redirect' is the name of a Sieve action.
Do not translate it! */
_("%d: redirect - parsing to `%s' failed: %s\n"),
_("%d: parsing recipient address `%s' failed: %s\n"),
sieve_get_message_num (mach),
val->v.string, mu_strerror (rc));
return 1;
......@@ -405,9 +386,7 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
if (rc)
{
sieve_error (mach,
/* TRANSLATORS: 'redirect' is the name of a Sieve action.
Do not translate it! */
_("%d: redirect - cannot get envelope sender: %s\n"),
_("%d: cannot get envelope sender: %s\n"),
sieve_get_message_num (mach), mu_strerror (rc));
goto end;
}
......@@ -416,9 +395,8 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
if (rc)
{
sieve_error (mach,
/* TRANSLATORS: 'redirect' is the name of a Sieve action.
Do not translate it! */
_("%d: redirect - cannot create sender address <%s>: %s\n"),
"redirect",
_("%d: cannot create sender address <%s>: %s\n"),
sieve_get_message_num (mach),
fromaddr, mu_strerror (rc));
free (fromaddr);
......@@ -430,7 +408,8 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
rc = message_create_copy (&newmsg, msg);
if (rc)
{
sieve_error (mach, _("%d: cannot copy message: %s"),
sieve_error (mach,
_("%d: cannot copy message: %s"),
sieve_get_message_num (mach),
mu_strerror (rc));
goto end;
......@@ -457,9 +436,7 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
mailer_get_url (mailer, &url);
sieve_error (mach,
/* TRANSLATORS: 'redirect' is the name of a Sieve action.
Do not translate it! */
_("%d: redirect - cannot open mailer %s: %s\n"),
_("%d: cannot open mailer %s: %s\n"),
sieve_get_message_num (mach),
url_to_string (url),
mu_strerror (rc));
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2003 Free Software Foundation, Inc.
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
......@@ -151,13 +151,13 @@ list_test (sieve_machine_t mach, list_t args, list_t tags)
h = sieve_value_get (args, 0);
if (!h)
{
sieve_error (mach, _("list: can't get argument 1"));
sieve_arg_error (mach, 1);
sieve_abort (mach);
}
v = sieve_value_get (args, 1);
if (!v)
{
sieve_error (mach, _("list: can't get argument 2"));
sieve_arg_error (mach, 2);
sieve_abort (mach);
}
......
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 2003 Free Software Foundation, Inc.
Copyright (C) 2003, 2005 Free Software Foundation, Inc.
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
......@@ -70,20 +70,20 @@ timestamp_test (sieve_machine_t mach, list_t args, list_t tags)
h = sieve_value_get (args, 0);
if (!h)
{
sieve_error (mach, "timestamp: can't get argument 1");
sieve_arg_error (mach, 1);
sieve_abort (mach);
}
/* Second argument: date displacement */
v = sieve_value_get (args, 1);
if (!v)
{
sieve_error (mach, "timestamp: can't get argument 2");
sieve_arg_error (mach, 2);
sieve_abort (mach);
}
if (mu_parse_date (v->v.string, &tlimit, &now))
{
sieve_error (mach, "timestamp: can't parse date specification (%s)",
sieve_error (mach, _("cannot parse date specification (%s)"),
v->v.string);
sieve_abort (mach);
}
......@@ -101,7 +101,7 @@ timestamp_test (sieve_machine_t mach, list_t args, list_t tags)
if (mu_parse_date (val, &tval, &now))
{
sieve_error (mach,
"timestamp: can't parse header date specification (%s)",
"cannot parse header date specification (%s)",
val);
free (val);
sieve_abort (mach);
......
......@@ -162,10 +162,7 @@ regex_comparator (void *item, void *data)
REG_EXTENDED | REG_NOSUB | REG_NEWLINE | REG_ICASE))
{
sieve_error (d->mach,
/* TRANSLATORS: 'vacation' is the name of a Sieve action.
Do not translate it! */
_
("%d: vacation - cannot compile regular expression \"%s\"\n"),
("%d: cannot compile regular expression \"%s\"\n"),
sieve_get_message_num (d->mach),
item);
return 0;
......@@ -256,10 +253,7 @@ check_db (sieve_machine_t mach, list_t tags, char *from)
if (asprintf (&file, "%s/.vacation", (home ? home : ".")) == -1)
{
sieve_error (mach,
/* TRANSLATORS: 'vacation' is the name of a Sieve action.
Do not translate it! */
_("%d: vacation - cannot build db filename\n"),
sieve_error (mach, _("%d: cannot build db file name\n"),
sieve_get_message_num (mach));
free (home);
sieve_abort (mach);
......@@ -270,9 +264,7 @@ check_db (sieve_machine_t mach, list_t tags, char *from)
if (rc)
{
sieve_error (mach,
/* TRANSLATORS: 'vacation' is the name of a Sieve action.
Do not translate it! */
_("%d: vacation - cannot open \"%s\": %s"),
_("%d: cannot open \"%s\": %s"),
sieve_get_message_num (mach), file,
mu_strerror (rc));
free (file);
......@@ -343,7 +335,7 @@ re_subject (sieve_machine_t mach, list_t tags, char **psubject)
if (!subject)
{
sieve_error (mach,
("%d: vacation - not enough memory"),
("%d: not enough memory"),
sieve_get_message_num (mach));
return;
}
......@@ -449,10 +441,7 @@ vacation_reply (sieve_machine_t mach, list_t tags, message_t msg,
if (rc)
{
sieve_error (mach,
/* TRANSLATORS: 'vacation' is the name of a Sieve action.
Do not translate it! */
_
("%d: vacation - cannot create recipient address <%s>: %s\n"),
_("%d: cannot create recipient address <%s>: %s\n"),
sieve_get_message_num (mach), from, mu_strerror (rc));
return -1;
}
......@@ -487,9 +476,7 @@ vacation_reply (sieve_machine_t mach, list_t tags, message_t msg,
mailer_get_url (mailer, &url);
sieve_error (mach,
/* TRANSLATORS: 'vacation' is the name of a Sieve action.
Do not translate it! */
_("%d: vacation - cannot open mailer %s: %s\n"),
_("%d: cannot open mailer %s: %s\n"),
sieve_get_message_num (mach),
url_to_string (url), mu_strerror (rc));
return -1;
......@@ -516,10 +503,7 @@ sieve_action_vacation (sieve_machine_t mach, list_t args, list_t tags)
val = sieve_value_get (args, 0);
if (!val)
{
sieve_error (mach,
/* TRANSLATORS: 'vacation' is the name of a Sieve action.
Do not translate it! */
_("vacation: cannot get text!"));
sieve_error (mach, _("cannot get text!"));
sieve_abort (mach);
}
else
......@@ -536,9 +520,7 @@ sieve_action_vacation (sieve_machine_t mach, list_t args, list_t tags)
else if (sieve_get_message_sender (msg, &from))
{
sieve_error (mach,
/* TRANSLATORS: 'vacation' is the name of a Sieve action.
Do not translate it! */
_("%d: vacation - cannot get sender address\n"),
_("%d: cannot get sender address\n"),
sieve_get_message_num (mach));
sieve_abort (mach);
}
......
......@@ -127,19 +127,13 @@ sieve_test_address (sieve_machine_t mach, list_t args, list_t tags)
h = sieve_value_get (args, 0);
if (!h)
{
sieve_error (mach,
/* TRANSLATORS: 'address' is the name of a Sieve test.
Do not translate it! */
_("address: cannot get argument 1"));
sieve_arg_error (mach, 1);
sieve_abort (mach);
}
v = sieve_value_get (args, 1);
if (!v)
{
sieve_error (mach,
/* TRANSLATORS: 'address' is the name of a Sieve test.
Do not translate it! */
_("address: cannot get argument 2"));
sieve_arg_error (mach, 2);
sieve_abort (mach);
}
......@@ -199,19 +193,13 @@ sieve_test_header (sieve_machine_t mach, list_t args, list_t tags)
h = sieve_value_get (args, 0);
if (!h)
{
sieve_error (mach,
/* TRANSLATORS: 'header' is the name of a Sieve test.
Do not translate it! */
_("header: cannot get argument 1"));
sieve_arg_error (mach, 1);
sieve_abort (mach);
}
v = sieve_value_get (args, 1);
if (!v)
{
sieve_error (mach,
/* TRANSLATORS: 'header' is the name of a Sieve test.
Do not translate it! */
_("header: cannot get argument 2"));
sieve_arg_error (mach, 2);
sieve_abort (mach);
}
......@@ -292,17 +280,13 @@ sieve_test_envelope (sieve_machine_t mach, list_t args, list_t tags)
h = sieve_value_get (args, 0);
if (!h)
{
/* TRANSLATORS: 'header' is the name of a Sieve test. Do not translate it! */
sieve_error (mach, _("header: cannot get argument 1"));
sieve_arg_error (mach, 1);
sieve_abort (mach);
}
v = sieve_value_get (args, 1);
if (!v)
{
sieve_error (mach,
/* TRANSLATORS: 'header' is the name of a Sieve test.
Do not translate it! */
_("header: cannot get argument 2"));
sieve_arg_error (mach, 2);
sieve_abort (mach);
}
......@@ -325,10 +309,7 @@ sieve_test_size (sieve_machine_t mach, list_t args, list_t tags)
sieve_value_t *val = sieve_value_get (args, 0);
if (!val)
{
sieve_error (mach,
/* TRANSLATORS: 'size' is the name of a Sieve test.
Do not translate it! */
_("size: cannot get argument!"));
sieve_arg_error (mach, 1);
sieve_abort (mach);
}
......@@ -385,10 +366,7 @@ sieve_test_exists (sieve_machine_t mach, list_t args, list_t tags)
val = sieve_value_get (args, 0);
if (!val)
{
sieve_error (mach,
/* TRANSLATORS: 'size' is the name of a Sieve test.
Do not translate it! */
_("exists: cannot get argument!"));
sieve_arg_error (mach, 1);
sieve_abort (mach);
}
......