Commit 52a37206 52a372063eba534bba595becd10d50680916deca by Wojciech Polak

Added NLS.

1 parent 62519d9d
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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
......@@ -46,7 +46,7 @@ sieve_action_keep (sieve_machine_t mach, list_t args, list_t tags)
int
sieve_action_discard (sieve_machine_t mach, list_t args, list_t tags)
{
sieve_log_action (mach, "DISCARD", "marking as deleted");
sieve_log_action (mach, "DISCARD", _("marking as deleted"));
if (sieve_is_dry_run (mach))
return 0;
sieve_mark_deleted (mach->msg, 1);
......@@ -60,17 +60,17 @@ 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, "fileinto: can't get filename!");
sieve_error (mach, _("fileinto: can't get filename!"));
sieve_abort (mach);
}
sieve_log_action (mach, "FILEINTO", "delivering into %s", val->v.string);
sieve_log_action (mach, "FILEINTO", _("delivering into %s"), val->v.string);
if (sieve_is_dry_run (mach))
return 0;
rc = message_save_to_mailbox (mach->msg, mach->ticket, mach->mu_debug,
val->v.string);
if (rc)
sieve_error (mach, "fileinto: cannot save to mailbox: %s",
sieve_error (mach, _("fileinto: cannot save to mailbox: %s"),
mu_errstring (rc));
else
sieve_mark_deleted (mach->msg, 1);
......@@ -236,7 +236,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, "reject: can't get text!");
sieve_error (mach, _("reject: can't get text!"));
sieve_abort (mach);
}
sieve_log_action (mach, "REJECT", NULL);
......@@ -252,7 +252,7 @@ sieve_action_reject (sieve_machine_t mach, list_t args, list_t tags)
if (rc)
{
sieve_error (mach,
"%d: reject - can't create to address <%s>: %s\n",
_("%d: reject - can't create to address <%s>: %s\n"),
sieve_get_message_num (mach),
addrtext, mu_errstring (rc));
free (addrtext);
......@@ -264,7 +264,7 @@ sieve_action_reject (sieve_machine_t mach, list_t args, list_t tags)
if (rc)
{
sieve_error (mach,
"%d: reject - can't create from address <%s>: %s\n",
_("%d: reject - can't create from address <%s>: %s\n"),
sieve_get_message_num (mach),
sieve_get_daemon_email (mach),
mu_errstring (rc));
......@@ -278,7 +278,7 @@ sieve_action_reject (sieve_machine_t mach, list_t args, list_t tags)
mailer_get_url (mailer, &url);
sieve_error (mach,
"%d: reject - can't open mailer %s: %s\n",
_("%d: reject - can't open mailer %s: %s\n"),
sieve_get_message_num (mach),
url_to_string (url),
mu_errstring (rc));
......@@ -353,7 +353,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)
{
sieve_error (mach, "redirect: can't get address!");
sieve_error (mach, _("redirect: can't get address!"));
sieve_abort (mach);
}
......@@ -361,20 +361,20 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
if (rc)
{
sieve_error (mach,
"%d: redirect - parsing to `%s' failed: %s\n",
_("%d: redirect - parsing to `%s' failed: %s\n"),
sieve_get_message_num (mach),
val->v.string, mu_errstring (rc));
return 1;
}
sieve_log_action (mach, "REDIRECT", "to %s", val->v.string);
sieve_log_action (mach, "REDIRECT", _("to %s"), val->v.string);
if (sieve_is_dry_run (mach))
return 0;
msg = sieve_get_message (mach);
if (check_redirect_loop (msg))
{
sieve_error (mach, "%d: Redirection loop detected",
sieve_error (mach, _("%d: Redirection loop detected"),
sieve_get_message_num (mach));
goto end;
}
......@@ -383,7 +383,7 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
if (rc)
{
sieve_error (mach,
"%d: redirect - can't get envelope sender: %s\n",
_("%d: redirect - can't get envelope sender: %s\n"),
sieve_get_message_num (mach), mu_errstring (rc));
goto end;
}
......@@ -392,7 +392,7 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
if (rc)
{
sieve_error (mach,
"%d: redirect - can't create from address <%s>: %s\n",
_("%d: redirect - can't create from address <%s>: %s\n"),
sieve_get_message_num (mach),
fromaddr, mu_errstring (rc));
free (fromaddr);
......@@ -404,7 +404,7 @@ 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: can't copy message: %s",
sieve_error (mach, _("%d: can't copy message: %s"),
sieve_get_message_num (mach),
mu_errstring (rc));
goto end;
......@@ -419,7 +419,7 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
}
else
{
sieve_error (mach, "%d: can't get my email address",
sieve_error (mach, _("%d: can't get my email address"),
sieve_get_message_num (mach));
goto end;
}
......@@ -431,7 +431,7 @@ sieve_action_redirect (sieve_machine_t mach, list_t args, list_t tags)
mailer_get_url (mailer, &url);
sieve_error (mach,
"%d: redirect - can't open mailer %s: %s\n",
_("%d: redirect - can't open mailer %s: %s\n"),
sieve_get_message_num (mach),
url_to_string (url),
mu_errstring (rc));
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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
......@@ -165,12 +165,12 @@ _regex_compile (void *item, void *data)
{
regerror (rc, preg, errbuf, size);
sieve_compile_error (sieve_filename, sieve_line_num,
"regex error: %s", errbuf);
_("regex error: %s"), errbuf);
free (errbuf);
}
else
sieve_compile_error (sieve_filename, sieve_line_num,
"regex error");
_("regex error"));
return rc;
}
......@@ -234,7 +234,7 @@ sieve_match_part_checker (const char *name, list_t tags, list_t args)
if (err)
{
sieve_compile_error (sieve_filename, sieve_line_num,
"match type specified twice in call to `%s'",
_("match type specified twice in call to `%s'"),
name);
return 1;
}
......@@ -256,8 +256,8 @@ sieve_match_part_checker (const char *name, list_t tags, list_t args)
if (!compfun)
{
sieve_compile_error (sieve_filename, sieve_line_num,
"comparator `%s' is incompatible with match type `%s' in call to `%s'",
compname, match ? match->tag : "is", name);
_("comparator `%s' is incompatible with match type `%s' in call to `%s'"),
compname, match ? match->tag : _("is"), name);
return 1;
}
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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
......@@ -35,7 +35,7 @@ sieve_code (sieve_op_t *op)
if (!newprog)
{
sieve_compile_error (sieve_filename, sieve_line_num,
"out of memory!");
_("out of memory!"));
return 1;
}
sieve_machine->prog = newprog;
......@@ -154,7 +154,7 @@ sieve_code_command (sieve_register_t *reg, list_t arglist)
if (rc)
{
sieve_compile_error (sieve_filename, sieve_line_num,
"can't create iterator: %s",
_("can't create iterator: %s"),
mu_errstring (rc));
return 1;
}
......@@ -173,7 +173,7 @@ sieve_code_command (sieve_register_t *reg, list_t arglist)
if (!tag)
{
sieve_compile_error (sieve_filename, sieve_line_num,
"invalid tag name `%s' for `%s'",
_("invalid tag name `%s' for `%s'"),
val->v.string, reg->name);
err = 1;
break;
......@@ -182,7 +182,7 @@ sieve_code_command (sieve_register_t *reg, list_t arglist)
if (!tag_list && (rc = list_create (&tag_list)))
{
sieve_compile_error (sieve_filename, sieve_line_num,
"%s:%d: can't create tag list: %s",
_("%s:%d: can't create tag list: %s"),
mu_errstring (rc));
err = 1;
break;
......@@ -206,7 +206,7 @@ sieve_code_command (sieve_register_t *reg, list_t arglist)
if (!chk_list && (rc = list_create (&chk_list)))
{
sieve_compile_error (sieve_filename, sieve_line_num,
"%s:%d: can't create check list: %s",
_("%s:%d: can't create check list: %s"),
mu_errstring (rc));
err = 1;
break;
......@@ -218,7 +218,7 @@ sieve_code_command (sieve_register_t *reg, list_t arglist)
else if (*exp_arg == SVT_VOID)
{
sieve_compile_error (sieve_filename, sieve_line_num,
"too many arguments in call to `%s'",
_("too many arguments in call to `%s'"),
reg->name);
err = 1;
break;
......@@ -239,11 +239,11 @@ sieve_code_command (sieve_register_t *reg, list_t arglist)
else
{
sieve_compile_error (sieve_filename, sieve_line_num,
"type mismatch in argument %d to `%s'",
_("type mismatch in argument %d to `%s'"),
exp_arg - reg->req_args + 1,
reg->name);
sieve_compile_error (sieve_filename, sieve_line_num,
"Expected %s but passed %s",
_("Expected %s but passed %s"),
sieve_type_str (*exp_arg),
sieve_type_str (val->type));
err = 1;
......@@ -254,7 +254,7 @@ sieve_code_command (sieve_register_t *reg, list_t arglist)
if (!arg_list && (rc = list_create (&arg_list)))
{
sieve_compile_error (sieve_filename, sieve_line_num,
"can't create arg list: %s",
_("can't create arg list: %s"),
mu_errstring (rc));
err = 1;
break;
......@@ -272,7 +272,7 @@ sieve_code_command (sieve_register_t *reg, list_t arglist)
if (*exp_arg != SVT_VOID)
{
sieve_compile_error (sieve_filename, sieve_line_num,
"too few arguments in call to `%s'",
_("too few arguments in call to `%s'"),
reg->name);
err = 1;
}
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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
......@@ -35,7 +35,7 @@ sieve_require (list_t slist)
if (status)
{
sieve_compile_error (sieve_filename, sieve_line_num,
"cannot create iterator: %s",
_("cannot create iterator: %s"),
mu_errstring (status));
return;
}
......@@ -69,7 +69,7 @@ sieve_require (list_t slist)
if (reqfn (sieve_machine, name))
{
sieve_compile_error (sieve_filename, sieve_line_num,
"source for the required %s %s is not available",
_("source for the required %s %s is not available"),
text,
name);
}
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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
......@@ -87,7 +87,7 @@ instr_push (sieve_machine_t mach)
if (!mach->stack && list_create (&mach->stack))
{
sieve_error (mach, "can't create stack");
sieve_error (mach, _("can't create stack"));
sieve_abort (mach);
}
list_prepend (mach->stack, (void*) mach->reg);
......@@ -105,7 +105,7 @@ instr_pop (sieve_machine_t mach)
if (!mach->stack || list_is_empty (mach->stack))
{
sieve_error (mach, "stack underflow");
sieve_error (mach, _("stack underflow"));
sieve_abort (mach);
}
list_get (mach->stack, 0, (void **)&mach->reg);
......@@ -314,7 +314,7 @@ sieve_mailbox (sieve_machine_t mach, mailbox_t mbox)
mach->msgno = 0;
rc = mailbox_scan (mbox, 1, &total);
if (rc)
sieve_error (mach, "mailbox_scan: %s", mu_errstring (errno));
sieve_error (mach, _("mailbox_scan: %s"), mu_errstring (errno));
observable_detach (observable, observer);
observer_destroy (&observer, mach);
......
%{
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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
......@@ -122,7 +122,7 @@ lex_set_buffer (FILE *fp)
if (!buf)
{
sieve_compile_error (sieve_filename, sieve_line_num, "not enough memory");
sieve_compile_error (sieve_filename, sieve_line_num, _("not enough memory"));
abort ();
}
......@@ -224,25 +224,25 @@ push_source (const char *name)
if (stat (name, &st))
{
sieve_compile_error (sieve_filename, sieve_line_num,
"can't stat `%s': %s", name, strerror (errno));
_("can't stat `%s': %s"), name, strerror (errno));
return 1;
}
if (sieve_filename && st.st_ino == sieve_source_inode)
{
yyerror ("recursive inclusion");
yyerror (_("recursive inclusion"));
return 1;
}
if (ctx = ctx_lookup (st.st_ino))
{
yyerror ("recursive inclusion");
yyerror (_("recursive inclusion"));
if (ctx->prev)
sieve_compile_error (ctx->prev->filename, ctx->prev->line,
"`%s' already included here",
_("`%s' already included here"),
name);
else
sieve_compile_error (sieve_filename, sieve_line_num,
"`%s' already included at top level",
_("`%s' already included at top level"),
name);
return 1;
}
......@@ -251,7 +251,7 @@ push_source (const char *name)
if (!fp)
{
sieve_compile_error (sieve_filename, sieve_line_num,
"can't open `%s': %s", name, strerror (errno));
_("can't open `%s': %s"), name, strerror (errno));
return 1;
}
......@@ -420,7 +420,7 @@ get_file_name (char *p, char *endp, int *usepath)
break;
default:
yyerror ("preprocessor syntax");
yyerror (_("preprocessor syntax"));
return NULL;
}
......@@ -429,7 +429,7 @@ get_file_name (char *p, char *endp, int *usepath)
if (*p != exp)
{
yyerror ("missing closing quote in preprocessor statement");
yyerror (_("missing closing quote in preprocessor statement"));
return NULL;
}
......@@ -582,7 +582,7 @@ multiline_add (char *s)
s = strdup (multiline_strip_tabs (yytext));
if (!s)
{
yyerror ("not enough memory");
yyerror (_("not enough memory"));
exit (1);
}
}
......@@ -622,7 +622,7 @@ multiline_begin ()
multiline_delimiter = strdup (".");
if (!multiline_delimiter)
{
yyerror ("not enough memory");
yyerror (_("not enough memory"));
exit (1);
}
}
......@@ -679,7 +679,7 @@ ident (const char *text)
yylval.string = strdup (text);
if (!yylval.string)
{
yyerror ("not enough memory");
yyerror (_("not enough memory"));
exit (1);
}
}
......
%{
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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
......@@ -226,11 +226,11 @@ test : command
if (!reg)
sieve_compile_error (sieve_filename, sieve_line_num,
"unknown test: %s",
_("unknown test: %s"),
$1.ident);
else if (!reg->required)
sieve_compile_error (sieve_filename, sieve_line_num,
"test `%s' has not been required",
_("test `%s' has not been required"),
$1.ident);
else if (sieve_code_test (reg, $1.args))
YYERROR;
......@@ -252,11 +252,11 @@ action : command
$$ = sieve_machine->pc;
if (!reg)
sieve_compile_error (sieve_filename, sieve_line_num,
"unknown action: %s",
_("unknown action: %s"),
$1.ident);
else if (!reg->required)
sieve_compile_error (sieve_filename, sieve_line_num,
"action `%s' has not been required",
_("action `%s' has not been required"),
$1.ident);
else if (sieve_code_action (reg, $1.args))
YYERROR;
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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
......@@ -101,13 +101,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, "address: can't get argument 1");
sieve_error (mach, _("address: can't get argument 1"));
sieve_abort (mach);
}
v = sieve_value_get (args, 1);
if (!v)
{
sieve_error (mach, "address: can't get argument 2");
sieve_error (mach, _("address: can't get argument 2"));
sieve_abort (mach);
}
......@@ -141,13 +141,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, "header: can't get argument 1");
sieve_error (mach, _("header: can't get argument 1"));
sieve_abort (mach);
}
v = sieve_value_get (args, 1);
if (!v)
{
sieve_error (mach, "header: can't get argument 2");
sieve_error (mach, _("header: can't get argument 2"));
sieve_abort (mach);
}
......@@ -221,13 +221,13 @@ sieve_test_envelope (sieve_machine_t mach, list_t args, list_t tags)
h = sieve_value_get (args, 0);
if (!h)
{
sieve_error (mach, "header: can't get argument 1");
sieve_error (mach, _("header: can't get argument 1"));
sieve_abort (mach);
}
v = sieve_value_get (args, 1);
if (!v)
{
sieve_error (mach, "header: can't get argument 2");
sieve_error (mach, _("header: can't get argument 2"));
sieve_abort (mach);
}
......@@ -249,7 +249,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, "size: can't get argument!");
sieve_error (mach, _("size: can't get argument!"));
sieve_abort (mach);
}
......@@ -303,7 +303,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, "exists: can't get argument!");
sieve_error (mach, _("exists: can't get argument!"));
sieve_abort (mach);
}
......
/* GNU mailutils - a suite of utilities for electronic mail
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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
......@@ -171,7 +171,7 @@ sieve_value_create (sieve_data_type type, void *data)
default:
sieve_compile_error (sieve_filename, sieve_line_num,
"Invalid data type");
_("Invalid data type"));
abort ();
}
return val;
......
/* 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 Library Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
GNU Mailutils is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this program; if not, write to the Free Software
along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
......@@ -48,6 +48,7 @@
#include <mailutils/observer.h>
#include <mailutils/stream.h>
#include <mailutils/mu_auth.h>
#include <mailutils/nls.h>
#define MESSAGE_MODIFIED 0x10000;
......@@ -1064,7 +1065,7 @@ message_save_to_mailbox (message_t msg, ticket_t ticket, mu_debug_t debug,
if ((rc = mailbox_create_default (&to, toname)))
{
mu_debug_print (debug, MU_DEBUG_TRACE,
"mailbox_create_default (%s) failed: %s\n", toname,
_("mailbox_create_default (%s) failed: %s\n"), toname,
mu_errstring (rc));
goto end;
}
......@@ -1095,7 +1096,7 @@ message_save_to_mailbox (message_t msg, ticket_t ticket, mu_debug_t debug,
if ((rc = mailbox_open (to, MU_STREAM_WRITE | MU_STREAM_CREAT)))
{
mu_debug_print (debug, MU_DEBUG_TRACE,
"mailbox_open (%s) failed: %s\n", toname,
_("mailbox_open (%s) failed: %s\n"), toname,
mu_errstring (rc));
goto end;
}
......@@ -1103,7 +1104,7 @@ message_save_to_mailbox (message_t msg, ticket_t ticket, mu_debug_t debug,
if ((rc = mailbox_append_message (to, msg)))
{
mu_debug_print (debug, MU_DEBUG_TRACE,
"mailbox_append_message (%s) failed: %s\n", toname,
_("mailbox_append_message (%s) failed: %s\n"), toname,
mu_errstring (rc));
goto end;
}
......@@ -1115,7 +1116,7 @@ end:
if ((rc = mailbox_close (to)))
{
mu_debug_print (debug, MU_DEBUG_TRACE,
"mailbox_close (%s) failed: %s\n", toname,
_("mailbox_close (%s) failed: %s\n"), toname,
mu_errstring (rc));
}
}
......
/* GNU mailutils - a suite of utilities for electronic mail
Copyright (C) 1999, 2001 Free Software Foundation, Inc.
/* GNU Mailutils -- a suite of utilities for electronic mail
Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
GNU Mailutils is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser 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
......@@ -41,7 +41,7 @@
#include <mailutils/locker.h>
#include <mailutils/mailer.h>
#include <mailutils/mailbox.h>
#include <mailutils/nls.h>
#include <mailutils/argcv.h>
#define ARG_LOG_FACILITY 1
......@@ -53,47 +53,47 @@ const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">";
static struct argp_option mu_common_argp_options[] =
{
{ NULL, 0, NULL, 0, "Common options", 0},
{ NULL, 0, NULL, 0, N_("Common options"), 0},
{ "show-config-options", ARG_SHOW_OPTIONS, NULL, OPTION_HIDDEN,
"Show compilation options", 0 },
N_("Show compilation options"), 0 },
{ NULL, 0, NULL, 0, NULL, 0 }
};
/* Option to print the license. */
static struct argp_option mu_license_argp_option[] = {
{ "license", ARG_LICENSE, NULL, 0, "Print license and exit", -2 },
{ "license", ARG_LICENSE, NULL, 0, N_("Print license and exit"), -2 },
{ NULL, 0, NULL, 0, NULL, 0 }
};
/* Options used by programs that access mailboxes. */
static struct argp_option mu_mailbox_argp_option[] = {
{"mail-spool", 'm', "URL", 0,
"Use specified URL as a mailspool directory", 0},
N_("Use specified URL as a mailspool directory"), 0},
{"lock-flags", ARG_LOCK_FLAGS, "FLAGS", 0,
"Default locker flags (E=external, R=retry, T=time, P=pid)", 0},
N_("Default locker flags (E=external, R=retry, T=time, P=pid)"), 0},
{ NULL, 0, NULL, 0, NULL, 0 }
};
/* Options used by programs that do address mapping. */
static struct argp_option mu_address_argp_option[] = {
{"email-addr", 'E', "EMAIL", 0,
"Set current user's email address (default is loginname@defaultdomain)", 0},
N_("Set current user's email address (default is loginname@defaultdomain)"), 0},
{"email-domain", 'D', "DOMAIN", 0,
"Set domain for unqualified user names (default is this host)", 0},
N_("Set domain for unqualified user names (default is this host)"), 0},
{ NULL, 0, NULL, 0, NULL, 0 }
};
/* Options used by programs that send mail. */
static struct argp_option mu_mailer_argp_option[] = {
{"mailer", 'M', "MAILER", 0,
"Use specified URL as the default mailer", 0},
N_("Use specified URL as the default mailer"), 0},
{ NULL, 0, NULL, 0, NULL, 0 }
};
/* Options used by programs that log to syslog. */
static struct argp_option mu_logging_argp_option[] = {
{"log-facility", ARG_LOG_FACILITY, "FACILITY", 0,
"Output logs to syslog FACILITY", 0},
N_("Output logs to syslog FACILITY"), 0},
{ NULL, 0, NULL, 0, NULL, 0 }
};
......@@ -101,15 +101,15 @@ static struct argp_option mu_logging_argp_option[] = {
/* Options used by programs that become daemons. */
static struct argp_option mu_daemon_argp_option[] = {
{"daemon", 'd', "NUMBER", OPTION_ARG_OPTIONAL,
"Runs in daemon mode with a maximum of NUMBER children"},
N_("Runs in daemon mode with a maximum of NUMBER children")},
{"inetd", 'i', 0, 0,
"Run in inetd mode", 0},
N_("Run in inetd mode"), 0},
{"port", 'p', "PORT", 0,
"Listen on specified port number", 0},
N_("Listen on specified port number"), 0},
{"timeout", 't', "NUMBER", 0,
"Set idle timeout value to NUMBER seconds", 0},
N_("Set idle timeout value to NUMBER seconds"), 0},
{"transcript", 'x', NULL, 0,
"output session transcript via syslog", 0},
N_("output session transcript via syslog"), 0},
{ NULL, 0, NULL, 0, NULL, 0 }
};
......@@ -198,7 +198,7 @@ struct argp mu_daemon_argp = {
struct argp_child mu_daemon_argp_child = {
&mu_daemon_argp,
0,
"Daemon configuration options",
N_("Daemon configuration options"),
0
};
......@@ -233,24 +233,24 @@ parse_log_facility (const char *str)
for (i = 0; i < sizeof (syslog_kw) / sizeof (syslog_kw[0]); i++)
if (strcasecmp (syslog_kw[i].name, str) == 0)
return syslog_kw[i].facility;
fprintf (stderr, "unknown facility `%s'\n", str);
fprintf (stderr, _("unknown facility `%s'\n"), str);
return LOG_FACILITY;
}
char *mu_license_text =
" This program is free software; you can redistribute it and/or modify\n"
N_(" 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"
" This program is distributed in the hope that it will be useful,\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 this program; if not, write to the Free Software\n"
" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n";
" along with GNU Mailutils; if not, write to the Free Software\n"
" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n\n");
static char *mu_conf_option[] = {
"VERSION=" VERSION,
......@@ -353,7 +353,7 @@ mu_common_argp_parser (int key, char *arg, struct argp_state *state)
{
/* common */
case ARG_LICENSE:
printf ("License for %s:\n\n", argp_program_version);
printf (_("License for %s:\n\n"), argp_program_version);
printf ("%s", mu_license_text);
exit (0);
......@@ -390,7 +390,7 @@ mu_common_argp_parser (int key, char *arg, struct argp_state *state)
break;
default:
argp_error (state, "invalid lock flag '%c'", *arg);
argp_error (state, _("invalid lock flag '%c'"), *arg);
}
}
locker_set_default_flags(flags);
......@@ -401,7 +401,7 @@ mu_common_argp_parser (int key, char *arg, struct argp_state *state)
case 'E':
if ((err = mu_set_user_email(arg)) != 0)
{
argp_error (state, "invalid email-addr '%s': %s",
argp_error (state, _("invalid email-addr '%s': %s"),
arg, mu_errstring(err));
}
break;
......@@ -409,7 +409,7 @@ mu_common_argp_parser (int key, char *arg, struct argp_state *state)
case 'D':
if ((err = mu_set_user_email_domain(arg)) != 0)
{
argp_error (state, "invalid email-domain '%s': %s",
argp_error (state, _("invalid email-domain '%s': %s"),
arg, mu_errstring(err));
}
break;
......@@ -418,7 +418,7 @@ mu_common_argp_parser (int key, char *arg, struct argp_state *state)
case 'M':
if ((err = mailer_set_url_default (arg)) != 0)
{
argp_error (state, "invalid mailer url '%s': %s",
argp_error (state, _("invalid mailer url '%s': %s"),
arg, mu_errstring(err));
}
break;
......@@ -432,7 +432,7 @@ mu_common_argp_parser (int key, char *arg, struct argp_state *state)
p = mu_normalize_maildir (mu_path_maildir);
if (!p)
{
argp_error (state, "badly formed maildir: %s", mu_path_maildir);
argp_error (state, _("badly formed maildir: %s"), mu_path_maildir);
}
mu_path_maildir = p;
break;
......@@ -522,7 +522,7 @@ read_rc (const char *progname, const char *name, const char *capa[],
if (!rcfile)
{
fprintf (stderr, "%s: not enough memory\n", progname);
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
......@@ -567,7 +567,7 @@ read_rc (const char *progname, const char *name, const char *capa[],
if (!linebuf)
{
fprintf (stderr, "%s: not enough memory\n", progname);
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
......@@ -606,7 +606,7 @@ read_rc (const char *progname, const char *name, const char *capa[],
(x_argc + n_argc) * sizeof (x_argv[0]));
if (!x_argv)
{
fprintf (stderr, "%s: not enough memory\n", progname);
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
......@@ -646,7 +646,7 @@ mu_create_argcv (const char *capa[],
x_argv = malloc (sizeof (x_argv[0]));
if (!x_argv)
{
fprintf (stderr, "%s: not enough memory\n", progname);
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
......@@ -668,7 +668,7 @@ mu_create_argcv (const char *capa[],
if (!rcdirname)
{
fprintf (stderr, "%s: not enough memory\n", progname);
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
if(stat(rcdirname, &s) == 0 && S_ISDIR(s.st_mode))
......@@ -693,7 +693,7 @@ mu_create_argcv (const char *capa[],
if (!userrc)
{
fprintf (stderr, "%s: not enough memory\n", progname);
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
......@@ -722,7 +722,7 @@ mu_create_argcv (const char *capa[],
if (!progrc)
{
fprintf (stderr, "%s: not enough memory\n", progname);
fprintf (stderr, _("%s: not enough memory\n"), progname);
exit (1);
}
......@@ -808,7 +808,7 @@ mu_build_argp (const struct argp *template, const char *capa[])
ap = calloc (n + 1, sizeof (*ap));
if (!ap)
{
mu_error ("out of memory");
mu_error (_("out of memory"));
abort ();
}
......@@ -832,7 +832,7 @@ mu_build_argp (const struct argp *template, const char *capa[])
struct argp_child *child = find_argp_child (capa[n]);
if (!child)
{
mu_error ("INTERNAL ERROR: requested unknown argp capability %s",
mu_error (_("INTERNAL ERROR: requested unknown argp capability %s"),
capa[n]);
abort ();
}
......@@ -846,7 +846,7 @@ mu_build_argp (const struct argp *template, const char *capa[])
argp = malloc (sizeof (*argp));
if (!argp)
{
mu_error ("out of memory");
mu_error (_("out of memory"));
abort ();
}
......@@ -885,7 +885,7 @@ mu_auth_init ()
extern struct argp_child mu_auth_argp_child;
if (mu_register_capa ("auth", &mu_auth_argp_child))
{
mu_error ("INTERNAL ERROR: cannot register argp capability auth");
mu_error (_("INTERNAL ERROR: cannot register argp capability auth"));
abort ();
}
}
......
/* 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 Library Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
GNU Mailutils is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this program; if not, write to the Free Software
along with GNU Mailutils; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
#ifdef HAVE_CONFIG_H
......@@ -23,6 +23,7 @@
#include <string.h>
#include <mailutils/errno.h>
#include <mailutils/nls.h>
#ifndef EOK
# define EOK 0
......@@ -85,39 +86,39 @@ const char* mu_errstring (int e)
switch(e)
{
#define ES(x, d) case x: return d;
ES(EOK, "Success")
ES(MU_ERR_NO_HANDLER, "No registered handler")
ES(MU_ERR_EMPTY_VFN, "Empty virtual function")
ES(MU_ERR_OUT_NULL, "Pointer to output null")
ES(MU_ERR_OUT_PTR_NULL, "Pointer to output pointer null")
ES(MU_ERR_MBX_NULL, "Mailbox null")
ES(MU_ERR_BAD_822_FORMAT, "Format of RFC822 object is bad")
ES(MU_ERR_EMPTY_ADDRESS, "Address contains no addr specs")
ES(MU_ERR_LOCKER_NULL, "Locker null")
ES(MU_ERR_LOCK_CONFLICT, "Conflict with previous locker")
ES(MU_ERR_LOCK_BAD_LOCK, "Lock file check failed")
ES(MU_ERR_LOCK_BAD_FILE, "File check failed")
ES(MU_ERR_LOCK_NOT_HELD, "Lock not held on file")
ES(MU_ERR_LOCK_EXT_FAIL, "Failed to exec external locker")
ES(MU_ERR_LOCK_EXT_ERR, "External locker failed")
ES(MU_ERR_LOCK_EXT_KILLED, "External locker killed")
ES(MU_ERR_NO_SUCH_USER, "No such user name")
ES(MU_ERR_GETHOSTBYNAME, "DNS name resolution failed")
ES(MU_ERR_BAD_RESUMPTION, "State busy, must resume operation")
ES(MU_ERR_MAILER_BAD_FROM, "Not a valid mailer from address")
ES(MU_ERR_MAILER_BAD_TO, "Not a valid mailer to address")
ES(MU_ERR_MAILER_NO_RCPT_TO,"No receipt addresses found")
ES(MU_ERR_MAILER_BAD_URL, "Malformed or unsupported mailer URL")
ES(MU_ERR_SMTP_RCPT_FAILED, "SMTP rcpt to command failed")
ES(MU_ERR_TCP_NO_HOST, "Tcp connections need a host")
ES(MU_ERR_TCP_NO_PORT, "Tcp connections need a postive port")
ES(EOK, _("Success"))
ES(MU_ERR_NO_HANDLER, _("No registered handler"))
ES(MU_ERR_EMPTY_VFN, _("Empty virtual function"))
ES(MU_ERR_OUT_NULL, _("Pointer to output null"))
ES(MU_ERR_OUT_PTR_NULL, _("Pointer to output pointer null"))
ES(MU_ERR_MBX_NULL, _("Mailbox null"))
ES(MU_ERR_BAD_822_FORMAT, _("Format of RFC822 object is bad"))
ES(MU_ERR_EMPTY_ADDRESS, _("Address contains no addr specs"))
ES(MU_ERR_LOCKER_NULL, _("Locker null"))
ES(MU_ERR_LOCK_CONFLICT, _("Conflict with previous locker"))
ES(MU_ERR_LOCK_BAD_LOCK, _("Lock file check failed"))
ES(MU_ERR_LOCK_BAD_FILE, _("File check failed"))
ES(MU_ERR_LOCK_NOT_HELD, _("Lock not held on file"))
ES(MU_ERR_LOCK_EXT_FAIL, _("Failed to exec external locker"))
ES(MU_ERR_LOCK_EXT_ERR, _("External locker failed"))
ES(MU_ERR_LOCK_EXT_KILLED, _("External locker killed"))
ES(MU_ERR_NO_SUCH_USER, _("No such user name"))
ES(MU_ERR_GETHOSTBYNAME, _("DNS name resolution failed"))
ES(MU_ERR_BAD_RESUMPTION, _("State busy, must resume operation"))
ES(MU_ERR_MAILER_BAD_FROM, _("Not a valid mailer from address"))
ES(MU_ERR_MAILER_BAD_TO, _("Not a valid mailer to address"))
ES(MU_ERR_MAILER_NO_RCPT_TO,_("No receipt addresses found"))
ES(MU_ERR_MAILER_BAD_URL, _("Malformed or unsupported mailer URL"))
ES(MU_ERR_SMTP_RCPT_FAILED, _("SMTP rcpt to command failed"))
ES(MU_ERR_TCP_NO_HOST, _("Tcp connections need a host"))
ES(MU_ERR_TCP_NO_PORT, _("Tcp connections need a postive port"))
}
return strerror(e);
......