Commit e7e50f76 e7e50f768f6cb99795f2252255d6b92154481804 by Wojciech Polak

Added initial NLS support

1 parent 348d388c
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
5 AUTOMAKE_OPTIONS = gnu 1.7.1 readme-alpha std-options 5 AUTOMAKE_OPTIONS = gnu 1.7.1 readme-alpha std-options
6 ACLOCAL_AMFLAGS = -I m4 6 ACLOCAL_AMFLAGS = -I m4
7 7
8 SUBDIRS = include m4 lib testsuite mailbox libsieve examples doc \ 8 SUBDIRS = include m4 intl po lib testsuite mailbox libsieve examples doc \
9 auth frm from pop3d imap4d \ 9 auth frm from pop3d imap4d \
10 mail sieve scripts libmu_scm guimb messages comsat readmsg \ 10 mail sieve scripts libmu_scm guimb messages comsat readmsg \
11 mail.local mail.remote dotlock mh 11 mail.local mail.remote dotlock mh
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "comsat.h" 18 #include "comsat.h"
...@@ -277,27 +277,27 @@ action_exec (FILE *tty, int line, int argc, char **argv) ...@@ -277,27 +277,27 @@ action_exec (FILE *tty, int line, int argc, char **argv)
277 277
278 if (argc == 0) 278 if (argc == 0)
279 { 279 {
280 syslog (LOG_ERR, "%s:.biffrc:%d: No arguments for exec", username, line); 280 syslog (LOG_ERR, _("%s:.biffrc:%d: No arguments for exec"), username, line);
281 return; 281 return;
282 } 282 }
283 283
284 if (argv[0][0] != '/') 284 if (argv[0][0] != '/')
285 { 285 {
286 syslog (LOG_ERR, "%s:.biffrc:%d: Not an absolute pathname", 286 syslog (LOG_ERR, _("%s:.biffrc:%d: Not an absolute pathname"),
287 username, line); 287 username, line);
288 return; 288 return;
289 } 289 }
290 290
291 if (stat (argv[0], &stb)) 291 if (stat (argv[0], &stb))
292 { 292 {
293 syslog (LOG_ERR, "%s:.biffrc:%d: can't stat %s: %s", 293 syslog (LOG_ERR, _("%s:.biffrc:%d: can't stat %s: %s"),
294 username, line, argv[0], strerror (errno)); 294 username, line, argv[0], strerror (errno));
295 return; 295 return;
296 } 296 }
297 297
298 if (stb.st_mode & (S_ISUID|S_ISGID)) 298 if (stb.st_mode & (S_ISUID|S_ISGID))
299 { 299 {
300 syslog (LOG_ERR, "%s:.biffrc:%d: won't execute set[ug]id programs", 300 syslog (LOG_ERR, _("%s:.biffrc:%d: won't execute set[ug]id programs"),
301 username, line); 301 username, line);
302 return; 302 return;
303 } 303 }
...@@ -311,7 +311,7 @@ action_exec (FILE *tty, int line, int argc, char **argv) ...@@ -311,7 +311,7 @@ action_exec (FILE *tty, int line, int argc, char **argv)
311 dup2 (fileno (tty), 2); 311 dup2 (fileno (tty), 2);
312 fclose (tty); 312 fclose (tty);
313 execv (argv[0], argv); 313 execv (argv[0], argv);
314 syslog (LOG_ERR, "can't execute %s: %s", argv[0], strerror (errno)); 314 syslog (LOG_ERR, _("can't execute %s: %s"), argv[0], strerror (errno));
315 exit (0); 315 exit (0);
316 } 316 }
317 } 317 }
...@@ -329,14 +329,14 @@ open_rc (const char *filename, FILE *tty) ...@@ -329,14 +329,14 @@ open_rc (const char *filename, FILE *tty)
329 { 329 {
330 if (stb.st_uid != pw->pw_uid) 330 if (stb.st_uid != pw->pw_uid)
331 { 331 {
332 syslog (LOG_NOTICE, "%s's %s is not owned by %s", 332 syslog (LOG_NOTICE, _("%s's %s is not owned by %s"),
333 username, filename, username); 333 username, filename, username);
334 return NULL; 334 return NULL;
335 } 335 }
336 if ((stb.st_mode & 0777) != 0600) 336 if ((stb.st_mode & 0777) != 0600)
337 { 337 {
338 fprintf (tty, "Warning: your .biffrc has wrong permissions\r\n"); 338 fprintf (tty, _("Warning: your .biffrc has wrong permissions\r\n"));
339 syslog (LOG_NOTICE, "%s's %s has wrong permissions", 339 syslog (LOG_NOTICE, _("%s's %s has wrong permissions"),
340 username, filename); 340 username, filename);
341 return NULL; 341 return NULL;
342 } 342 }
...@@ -393,8 +393,8 @@ run_user_action (FILE *tty, const char *cr, message_t msg) ...@@ -393,8 +393,8 @@ run_user_action (FILE *tty, const char *cr, message_t msg)
393 } 393 }
394 else 394 else
395 { 395 {
396 fprintf (tty, ".biffrc:%d: unknown keyword\r\n", line); 396 fprintf (tty, _(".biffrc:%d: unknown keyword\r\n"), line);
397 syslog (LOG_ERR, "%s:.biffrc:%d: unknown keyword %s", 397 syslog (LOG_ERR, _("%s:.biffrc:%d: unknown keyword %s"),
398 username, line, argv[0]); 398 username, line, argv[0]);
399 break; 399 break;
400 } 400 }
......
1 /* Copyright (C) 1998,2001 Free Software Foundation, Inc. 1 /* Copyright (C) 1998, 2001, 2002 Free Software Foundation, Inc.
2 2
3 This file is part of GNU Inetutils. 3 This file is part of GNU Inetutils.
4 4
...@@ -111,7 +111,7 @@ netdef_parse (char *str) ...@@ -111,7 +111,7 @@ netdef_parse (char *str)
111 netdef = malloc (sizeof *netdef); 111 netdef = malloc (sizeof *netdef);
112 if (!netdef) 112 if (!netdef)
113 { 113 {
114 syslog (LOG_ERR, "out of memory"); 114 syslog (LOG_ERR, _("out of memory"));
115 exit (1); 115 exit (1);
116 } 116 }
117 117
...@@ -136,7 +136,7 @@ read_config (const char *config_file) ...@@ -136,7 +136,7 @@ read_config (const char *config_file)
136 fp = fopen (config_file, "r"); 136 fp = fopen (config_file, "r");
137 if (!fp) 137 if (!fp)
138 { 138 {
139 syslog (LOG_ERR, "can't open config file %s: %m", config_file); 139 syslog (LOG_ERR, _("can't open config file %s: %m"), config_file);
140 return; 140 return;
141 } 141 }
142 142
...@@ -163,7 +163,7 @@ read_config (const char *config_file) ...@@ -163,7 +163,7 @@ read_config (const char *config_file)
163 argcv_get (ptr, "", NULL, &argc, &argv); 163 argcv_get (ptr, "", NULL, &argc, &argv);
164 if (argc < 2) 164 if (argc < 2)
165 { 165 {
166 syslog (LOG_ERR, "%s:%d: too few fields", config_file, line); 166 syslog (LOG_ERR, _("%s:%d: too few fields"), config_file, line);
167 argcv_free (argc, argv); 167 argcv_free (argc, argv);
168 continue; 168 continue;
169 } 169 }
...@@ -175,7 +175,7 @@ read_config (const char *config_file) ...@@ -175,7 +175,7 @@ read_config (const char *config_file)
175 else if (strcmp (argv[1], "no") == 0) 175 else if (strcmp (argv[1], "no") == 0)
176 allow_biffrc = 0; 176 allow_biffrc = 0;
177 else 177 else
178 syslog (LOG_ERR, "%s:%d: yes or no expected", config_file, line); 178 syslog (LOG_ERR, _("%s:%d: yes or no expected"), config_file, line);
179 } 179 }
180 else if (strcmp (argv[0], "max-requests") == 0) 180 else if (strcmp (argv[0], "max-requests") == 0)
181 maxrequests = strtoul (argv[1], NULL, 0); 181 maxrequests = strtoul (argv[1], NULL, 0);
...@@ -195,7 +195,7 @@ read_config (const char *config_file) ...@@ -195,7 +195,7 @@ read_config (const char *config_file)
195 action = ACT_DENY; 195 action = ACT_DENY;
196 else 196 else
197 { 197 {
198 syslog (LOG_ERR, "%s:%d: unknown keyword", config_file, line); 198 syslog (LOG_ERR, _("%s:%d: unknown keyword"), config_file, line);
199 argcv_free (argc, argv); 199 argcv_free (argc, argv);
200 continue; 200 continue;
201 } 201 }
...@@ -206,7 +206,7 @@ read_config (const char *config_file) ...@@ -206,7 +206,7 @@ read_config (const char *config_file)
206 netdef_t *cur = netdef_parse (argv[i]); 206 netdef_t *cur = netdef_parse (argv[i]);
207 if (!cur) 207 if (!cur)
208 { 208 {
209 syslog (LOG_ERR, "%s:%d: can't parse netdef: %s", 209 syslog (LOG_ERR, _("%s:%d: can't parse netdef: %s"),
210 config_file, line, argv[i]); 210 config_file, line, argv[i]);
211 continue; 211 continue;
212 } 212 }
...@@ -222,7 +222,7 @@ read_config (const char *config_file) ...@@ -222,7 +222,7 @@ read_config (const char *config_file)
222 acl = malloc (sizeof *acl); 222 acl = malloc (sizeof *acl);
223 if (!acl) 223 if (!acl)
224 { 224 {
225 syslog (LOG_CRIT, "out of memory"); 225 syslog (LOG_CRIT, _("out of memory"));
226 exit (1); 226 exit (1);
227 } 227 }
228 acl->next = NULL; 228 acl->next = NULL;
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "comsat.h" 18 #include "comsat.h"
...@@ -55,7 +55,7 @@ static char doc[] = "GNU comsatd"; ...@@ -55,7 +55,7 @@ static char doc[] = "GNU comsatd";
55 55
56 static struct argp_option options[] = 56 static struct argp_option options[] =
57 { 57 {
58 {"config", 'c', "FILE", 0, "Read configuration from FILE", 0}, 58 {"config", 'c', "FILE", 0, N_("Read configuration from FILE"), 0},
59 { NULL, 0, NULL, 0, NULL, 0 } 59 { NULL, 0, NULL, 0, NULL, 0 }
60 }; 60 };
61 61
...@@ -136,12 +136,15 @@ main(int argc, char **argv) ...@@ -136,12 +136,15 @@ main(int argc, char **argv)
136 { 136 {
137 int c; 137 int c;
138 138
139 /* Native Language Support */
140 mu_init_nls ();
141
139 mu_argp_parse (&argp, &argc, &argv, 0, comsat_argp_capa, 142 mu_argp_parse (&argp, &argc, &argv, 0, comsat_argp_capa,
140 NULL, &daemon_param); 143 NULL, &daemon_param);
141 144
142 if (daemon_param.timeout > 0 && daemon_param.mode == MODE_DAEMON) 145 if (daemon_param.timeout > 0 && daemon_param.mode == MODE_DAEMON)
143 { 146 {
144 fprintf (stderr, "--timeout and --daemon are incompatible\n"); 147 fprintf (stderr, _("--timeout and --daemon are incompatible\n"));
145 exit (EXIT_FAILURE); 148 exit (EXIT_FAILURE);
146 } 149 }
147 150
...@@ -175,10 +178,10 @@ main(int argc, char **argv) ...@@ -175,10 +178,10 @@ main(int argc, char **argv)
175 static RETSIGTYPE 178 static RETSIGTYPE
176 sig_hup (int sig) 179 sig_hup (int sig)
177 { 180 {
178 syslog (LOG_NOTICE, "restarting"); 181 syslog (LOG_NOTICE, _("restarting"));
179 182
180 if (xargv[0][0] != '/') 183 if (xargv[0][0] != '/')
181 syslog (LOG_ERR, "can't restart: not started with absolute pathname"); 184 syslog (LOG_ERR, _("can't restart: not started with absolute pathname"));
182 else 185 else
183 execvp (xargv[0], xargv); 186 execvp (xargv[0], xargv);
184 187
...@@ -212,7 +215,7 @@ comsat_daemon_init (void) ...@@ -212,7 +215,7 @@ comsat_daemon_init (void)
212 first three one, in, out, err. Do not do the chdir("/"). */ 215 first three one, in, out, err. Do not do the chdir("/"). */
213 if (daemon (1, 0) < 0) 216 if (daemon (1, 0) < 0)
214 { 217 {
215 perror ("failed to become a daemon:"); 218 perror (_("failed to become a daemon:"));
216 exit (EXIT_FAILURE); 219 exit (EXIT_FAILURE);
217 } 220 }
218 } 221 }
...@@ -256,7 +259,7 @@ comsat_daemon (int port) ...@@ -256,7 +259,7 @@ comsat_daemon (int port)
256 exit (1); 259 exit (1);
257 } 260 }
258 261
259 syslog (LOG_NOTICE, "GNU comsat started"); 262 syslog (LOG_NOTICE, _("GNU comsat started"));
260 263
261 last_request_time = last_overflow_time = time (NULL); 264 last_request_time = last_overflow_time = time (NULL);
262 while (1) 265 while (1)
...@@ -283,7 +286,7 @@ comsat_daemon (int port) ...@@ -283,7 +286,7 @@ comsat_daemon (int port)
283 unsigned delay; 286 unsigned delay;
284 287
285 delay = overflow_delay_time << (overflow_count + 1); 288 delay = overflow_delay_time << (overflow_count + 1);
286 syslog (LOG_NOTICE, "too many requests: pausing for %u seconds", 289 syslog (LOG_NOTICE, _("too many requests: pausing for %u seconds"),
287 delay); 290 delay);
288 sleep (delay); 291 sleep (delay);
289 reqcount = 0; 292 reqcount = 0;
...@@ -336,12 +339,12 @@ comsat_main (int fd) ...@@ -336,12 +339,12 @@ comsat_main (int fd)
336 339
337 if (acl_match (&sin_from)) 340 if (acl_match (&sin_from))
338 { 341 {
339 syslog (LOG_ALERT, "DENIED attempt to connect from %s", 342 syslog (LOG_ALERT, _("DENIED attempt to connect from %s"),
340 inet_ntoa (sin_from.sin_addr)); 343 inet_ntoa (sin_from.sin_addr));
341 return 1; 344 return 1;
342 } 345 }
343 346
344 syslog (LOG_INFO, "%d bytes from %s", rdlen, inet_ntoa (sin_from.sin_addr)); 347 syslog (LOG_INFO, _("%d bytes from %s"), rdlen, inet_ntoa (sin_from.sin_addr));
345 348
346 buffer[rdlen] = 0; 349 buffer[rdlen] = 0;
347 350
...@@ -349,7 +352,7 @@ comsat_main (int fd) ...@@ -349,7 +352,7 @@ comsat_main (int fd)
349 p = strchr (buffer, '@'); 352 p = strchr (buffer, '@');
350 if (!p) 353 if (!p)
351 { 354 {
352 syslog (LOG_ERR, "malformed input: %s", buffer); 355 syslog (LOG_ERR, _("malformed input: %s"), buffer);
353 return 1; 356 return 1;
354 } 357 }
355 *p++ = 0; 358 *p++ = 0;
...@@ -364,7 +367,7 @@ comsat_main (int fd) ...@@ -364,7 +367,7 @@ comsat_main (int fd)
364 break; 367 break;
365 default: 368 default:
366 if (!isspace (*endp)) 369 if (!isspace (*endp))
367 syslog (LOG_ERR, "malformed input: %s@%s (near %s)", buffer, p, endp); 370 syslog (LOG_ERR, _("malformed input: %s@%s (near %s)"), buffer, p, endp);
368 } 371 }
369 372
370 if (find_user (buffer, tty) != SUCCESS) 373 if (find_user (buffer, tty) != SUCCESS)
...@@ -429,7 +432,7 @@ notify_user (const char *user, const char *device, const char *path, off_t offse ...@@ -429,7 +432,7 @@ notify_user (const char *user, const char *device, const char *path, off_t offse
429 change_user (user); 432 change_user (user);
430 if ((fp = fopen (device, "w")) == NULL) 433 if ((fp = fopen (device, "w")) == NULL)
431 { 434 {
432 syslog (LOG_ERR, "can't open device %s: %m", device); 435 syslog (LOG_ERR, _("can't open device %s: %m"), device);
433 exit (0); 436 exit (0);
434 } 437 }
435 438
...@@ -445,21 +448,21 @@ notify_user (const char *user, const char *device, const char *path, off_t offse ...@@ -445,21 +448,21 @@ notify_user (const char *user, const char *device, const char *path, off_t offse
445 if ((status = mailbox_create (&mbox, path)) != 0 448 if ((status = mailbox_create (&mbox, path)) != 0
446 || (status = mailbox_open (mbox, MU_STREAM_READ)) != 0) 449 || (status = mailbox_open (mbox, MU_STREAM_READ)) != 0)
447 { 450 {
448 syslog (LOG_ERR, "can't open mailbox %s: %s", 451 syslog (LOG_ERR, _("can't open mailbox %s: %s"),
449 path, mu_errstring (status)); 452 path, mu_errstring (status));
450 return; 453 return;
451 } 454 }
452 455
453 if ((status = mailbox_get_stream (mbox, &stream))) 456 if ((status = mailbox_get_stream (mbox, &stream)))
454 { 457 {
455 syslog (LOG_ERR, "can't get stream for mailbox %s: %s", 458 syslog (LOG_ERR, _("can't get stream for mailbox %s: %s"),
456 path, mu_errstring (status)); 459 path, mu_errstring (status));
457 return; 460 return;
458 } 461 }
459 462
460 if ((status = stream_size (stream, (off_t *) &size))) 463 if ((status = stream_size (stream, (off_t *) &size)))
461 { 464 {
462 syslog (LOG_ERR, "can't get stream size (mailbox %s): %s", 465 syslog (LOG_ERR, _("can't get stream size (mailbox %s): %s"),
463 path, mu_errstring (status)); 466 path, mu_errstring (status));
464 return; 467 return;
465 } 468 }
...@@ -476,14 +479,14 @@ notify_user (const char *user, const char *device, const char *path, off_t offse ...@@ -476,14 +479,14 @@ notify_user (const char *user, const char *device, const char *path, off_t offse
476 if ((status = mailbox_create (&tmp, "/dev/null")) != 0 479 if ((status = mailbox_create (&tmp, "/dev/null")) != 0
477 || (status = mailbox_open (tmp, MU_STREAM_READ)) != 0) 480 || (status = mailbox_open (tmp, MU_STREAM_READ)) != 0)
478 { 481 {
479 syslog (LOG_ERR, "can't create temporary mailbox: %s", 482 syslog (LOG_ERR, _("can't create temporary mailbox: %s"),
480 mu_errstring (status)); 483 mu_errstring (status));
481 return; 484 return;
482 } 485 }
483 486
484 if ((status = memory_stream_create (&stream, 0, 0))) 487 if ((status = memory_stream_create (&stream, 0, 0)))
485 { 488 {
486 syslog (LOG_ERR, "can't create temporary stream: %s", 489 syslog (LOG_ERR, _("can't create temporary stream: %s"),
487 mu_errstring (status)); 490 mu_errstring (status));
488 return; 491 return;
489 } 492 }
...@@ -530,7 +533,7 @@ find_user (const char *name, char *tty) ...@@ -530,7 +533,7 @@ find_user (const char *name, char *tty)
530 if (strncmp (ftty, PATH_TTY_PFX, strlen (PATH_TTY_PFX))) 533 if (strncmp (ftty, PATH_TTY_PFX, strlen (PATH_TTY_PFX)))
531 { 534 {
532 /* An attempt to break security... */ 535 /* An attempt to break security... */
533 syslog (LOG_ALERT, "bad line name in utmp record: %s", ftty); 536 syslog (LOG_ALERT, _("bad line name in utmp record: %s"), ftty);
534 return NOT_HERE; 537 return NOT_HERE;
535 } 538 }
536 539
...@@ -538,7 +541,7 @@ find_user (const char *name, char *tty) ...@@ -538,7 +541,7 @@ find_user (const char *name, char *tty)
538 { 541 {
539 if (!S_ISCHR (statb.st_mode)) 542 if (!S_ISCHR (statb.st_mode))
540 { 543 {
541 syslog (LOG_ALERT, "not a character device: %s", ftty); 544 syslog (LOG_ALERT, _("not a character device: %s"), ftty);
542 return NOT_HERE; 545 return NOT_HERE;
543 } 546 }
544 547
...@@ -571,7 +574,7 @@ change_user (const char *user) ...@@ -571,7 +574,7 @@ change_user (const char *user)
571 pw = getpwnam (user); 574 pw = getpwnam (user);
572 if (!pw) 575 if (!pw)
573 { 576 {
574 syslog (LOG_CRIT, "no such user: %s", user); 577 syslog (LOG_CRIT, _("no such user: %s"), user);
575 exit (1); 578 exit (1);
576 } 579 }
577 580
...@@ -591,7 +594,7 @@ mailbox_path (const char *user) ...@@ -591,7 +594,7 @@ mailbox_path (const char *user)
591 594
592 if (!auth) 595 if (!auth)
593 { 596 {
594 syslog (LOG_ALERT, "user nonexistent: %s", user); 597 syslog (LOG_ALERT, _("user nonexistent: %s"), user);
595 return NULL; 598 return NULL;
596 } 599 }
597 600
...@@ -606,7 +609,7 @@ volatile int _st=0; ...@@ -606,7 +609,7 @@ volatile int _st=0;
606 void 609 void
607 stop() 610 stop()
608 { 611 {
609 syslog (LOG_ALERT, "waiting for debug"); 612 syslog (LOG_ALERT, _("waiting for debug"));
610 while (!_st) 613 while (!_st)
611 _st=_st; 614 _st=_st;
612 } 615 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #ifdef HAVE_CONFIG_H 18 #ifdef HAVE_CONFIG_H
...@@ -58,6 +58,7 @@ ...@@ -58,6 +58,7 @@
58 #include <mailutils/stream.h> 58 #include <mailutils/stream.h>
59 #include <mailutils/mu_auth.h> 59 #include <mailutils/mu_auth.h>
60 #include <mailutils/argcv.h> 60 #include <mailutils/argcv.h>
61 #include <mailutils/nls.h>
61 62
62 #ifndef INADDR_NONE 63 #ifndef INADDR_NONE
63 # define INADDR_NONE -1 64 # define INADDR_NONE -1
......
...@@ -2,23 +2,24 @@ ...@@ -2,23 +2,24 @@
2 # 2 #
3 # Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 3 # Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4 # 4 #
5 # This program is free software; you can redistribute it and/or modify 5 # GNU Mailutils is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by 6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option) 7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version. 8 # any later version.
9 # 9 #
10 # This program is distributed in the hope that it will be useful, 10 # GNU Mailutils is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of 11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details. 13 # GNU General Public License for more details.
14 # 14 #
15 # You should have received a copy of the GNU General Public License 15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software 16 # along with GNU Mailutils; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 # 18 #
19 19
20 AC_INIT([GNU Mailutils],[0.2],[bug-mailutils@gnu.org]) 20 AC_INIT([GNU Mailutils], [0.2], [bug-mailutils@gnu.org], [mailutils])
21 AC_CONFIG_SRCDIR([mailbox/mailbox.c]) 21 AC_CONFIG_SRCDIR([mailbox/mailbox.c])
22 AC_CONFIG_AUX_DIR([scripts])
22 AC_CANONICAL_TARGET([]) 23 AC_CANONICAL_TARGET([])
23 AM_INIT_AUTOMAKE 24 AM_INIT_AUTOMAKE
24 AC_CONFIG_HEADERS([config.h]) 25 AC_CONFIG_HEADERS([config.h])
...@@ -34,6 +35,10 @@ AM_PROG_LIBTOOL ...@@ -34,6 +35,10 @@ AM_PROG_LIBTOOL
34 AC_PROG_YACC 35 AC_PROG_YACC
35 AM_PROG_LEX 36 AM_PROG_LEX
36 37
38 dnl Internationalization macros.
39 AM_GNU_GETTEXT
40 AM_GNU_GETTEXT_VERSION(0.11.5)
41
37 dnl Check for libraries 42 dnl Check for libraries
38 AC_CHECK_LIB(resolv, res_query) 43 AC_CHECK_LIB(resolv, res_query)
39 LTDL_LIB= 44 LTDL_LIB=
...@@ -588,6 +593,7 @@ dnl Output Makefiles ...@@ -588,6 +593,7 @@ dnl Output Makefiles
588 AC_CONFIG_FILES([Makefile mailutils.spec 593 AC_CONFIG_FILES([Makefile mailutils.spec
589 include/Makefile include/mailutils/Makefile include/mailutils/gnu/Makefile 594 include/Makefile include/mailutils/Makefile include/mailutils/gnu/Makefile
590 m4/Makefile 595 m4/Makefile
596 intl/Makefile po/Makefile.in
591 doc/Makefile doc/man/Makefile doc/rfc/Makefile doc/texinfo/Makefile 597 doc/Makefile doc/man/Makefile doc/rfc/Makefile doc/texinfo/Makefile
592 lib/Makefile lib/posix/Makefile 598 lib/Makefile lib/posix/Makefile
593 testsuite/Makefile 599 testsuite/Makefile
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #ifdef HAVE_CONFIG_H 18 #ifdef HAVE_CONFIG_H
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
38 #include <mailutils/registrar.h> 38 #include <mailutils/registrar.h>
39 #include <mailutils/stream.h> 39 #include <mailutils/stream.h>
40 #include <mailutils/url.h> 40 #include <mailutils/url.h>
41 #include <mailutils/nls.h>
41 42
42 static char* show_field; 43 static char* show_field;
43 static int show_to; 44 static int show_to;
...@@ -60,19 +61,19 @@ static int selected; ...@@ -60,19 +61,19 @@ static int selected;
60 static int action (observer_t, size_t); 61 static int action (observer_t, size_t);
61 62
62 const char *argp_program_version = "frm (" PACKAGE_STRING ")"; 63 const char *argp_program_version = "frm (" PACKAGE_STRING ")";
63 static char doc[] = "GNU frm -- display From: lines"; 64 static char doc[] = N_("GNU frm -- display From: lines");
64 65
65 static struct argp_option options[] = { 66 static struct argp_option options[] = {
66 {"debug", 'd', NULL, 0, "Enable debugging output", 0}, 67 {"debug", 'd', NULL, 0, N_("Enable debugging output"), 0},
67 {"field", 'f', "NAME", 0, "Header field to display", 0}, 68 {"field", 'f', "NAME", 0, N_("Header field to display"), 0},
68 {"to", 'l', NULL, 0, "Include the To: information", 0}, 69 {"to", 'l', NULL, 0, N_("Include the To: information"), 0},
69 {"number", 'n', NULL, 0, "Display message numbers", 0}, 70 {"number", 'n', NULL, 0, N_("Display message numbers"), 0},
70 {"Quiet", 'Q', NULL, 0, "Very quiet", 0}, 71 {"Quiet", 'Q', NULL, 0, N_("Very quiet"), 0},
71 {"query", 'q', NULL, 0, "Print a message if unread mail", 0}, 72 {"query", 'q', NULL, 0, N_("Print a message if unread mail"), 0},
72 {"summary",'S', NULL, 0, "Print a summary of messages", 0}, 73 {"summary",'S', NULL, 0, N_("Print a summary of messages"), 0},
73 {"status", 's', "[nor]",0, 74 {"status", 's', "[nor]",0,
74 "Select message with the specific attribute: [n]ew, [r]ead, [u]nread.", 0 }, 75 N_("Select message with the specific attribute: [n]ew, [r]ead, [u]nread."), 0 },
75 {"align", 't', NULL, 0, "Try to align", 0}, 76 {"align", 't', NULL, 0, N_("Try to align"), 0},
76 {0, 0, 0, 0} 77 {0, 0, 0, 0}
77 }; 78 };
78 79
...@@ -105,7 +106,7 @@ parse_opt (int key, char *arg, struct argp_state *state) ...@@ -105,7 +106,7 @@ parse_opt (int key, char *arg, struct argp_state *state)
105 be_quiet += 2; 106 be_quiet += 2;
106 if (freopen("/dev/null", "w", stdout) == NULL) 107 if (freopen("/dev/null", "w", stdout) == NULL)
107 { 108 {
108 perror ("Can not be very quiet"); 109 perror (_("Can not be very quiet"));
109 exit (3); 110 exit (3);
110 } 111 }
111 break; 112 break;
...@@ -301,7 +302,10 @@ main(int argc, char **argv) ...@@ -301,7 +302,10 @@ main(int argc, char **argv)
301 size_t total = 0; 302 size_t total = 0;
302 int c; 303 int c;
303 int status = 0; 304 int status = 0;
304 305
306 /* Native Language Support */
307 mu_init_nls ();
308
305 mu_argp_parse (&argp, &argc, &argv, 0, frm_argp_capa, &c, NULL); 309 mu_argp_parse (&argp, &argc, &argv, 0, frm_argp_capa, &c, NULL);
306 310
307 /* have an argument */ 311 /* have an argument */
...@@ -331,8 +335,8 @@ main(int argc, char **argv) ...@@ -331,8 +335,8 @@ main(int argc, char **argv)
331 335
332 if (status != 0) 336 if (status != 0)
333 { 337 {
334 fprintf (stderr, "could not create mailbox <%s>: %s\n", 338 fprintf (stderr, _("could not create mailbox <%s>: %s\n"),
335 mailbox_name ? mailbox_name : "default", 339 mailbox_name ? mailbox_name : _("default"),
336 mu_errstring(status)); 340 mu_errstring(status));
337 exit (3); 341 exit (3);
338 } 342 }
...@@ -355,7 +359,7 @@ main(int argc, char **argv) ...@@ -355,7 +359,7 @@ main(int argc, char **argv)
355 goto cleanup1; 359 goto cleanup1;
356 else 360 else
357 { 361 {
358 fprintf (stderr, "could not open mailbox %s: %s\n", 362 fprintf (stderr, _("could not open mailbox %s: %s\n"),
359 url_to_string (url), 363 url_to_string (url),
360 mu_errstring(status)); 364 mu_errstring(status));
361 365
...@@ -378,7 +382,7 @@ main(int argc, char **argv) ...@@ -378,7 +382,7 @@ main(int argc, char **argv)
378 url_t url = NULL; 382 url_t url = NULL;
379 383
380 mailbox_get_url (mbox, &url); 384 mailbox_get_url (mbox, &url);
381 fprintf (stderr, "could not scan mailbox <%s>: %s\n", 385 fprintf (stderr, _("could not scan mailbox <%s>: %s\n"),
382 url_to_string (url), 386 url_to_string (url),
383 mu_errstring(status)); 387 mu_errstring(status));
384 goto cleanup; 388 goto cleanup;
...@@ -399,9 +403,9 @@ cleanup: ...@@ -399,9 +403,9 @@ cleanup:
399 403
400 cleanup1: 404 cleanup1:
401 if (show_summary) 405 if (show_summary)
402 printf ("You have %d messages\n", total); 406 printf (_("You have %d messages\n"), total);
403 if (show_query && have_new_mail) 407 if (show_query && have_new_mail)
404 printf ("You have new mail\n"); 408 printf (_("You have new mail\n"));
405 409
406 /* 0 - selected messages discover. 410 /* 0 - selected messages discover.
407 1 - have messages. 411 1 - have messages.
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -191,7 +191,7 @@ alias_print(char *name) ...@@ -191,7 +191,7 @@ alias_print(char *name)
191 191
192 if (!alias_lookup(name, &list)) 192 if (!alias_lookup(name, &list))
193 { 193 {
194 util_error("\"%s\": not a group", name); 194 util_error(_("\"%s\": not a group"), name);
195 return; 195 return;
196 } 196 }
197 alias_print_group(name, list); 197 alias_print_group(name, list);
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -60,7 +60,7 @@ mail_set_my_name (char *name) ...@@ -60,7 +60,7 @@ mail_set_my_name (char *name)
60 struct passwd *pw = getpwuid (getuid ()); 60 struct passwd *pw = getpwuid (getuid ());
61 if (!pw) 61 if (!pw)
62 { 62 {
63 util_error ("can't determine my username"); 63 util_error (_("can't determine my username"));
64 exit (1); 64 exit (1);
65 } 65 }
66 name = pw->pw_name; 66 name = pw->pw_name;
...@@ -69,7 +69,7 @@ mail_set_my_name (char *name) ...@@ -69,7 +69,7 @@ mail_set_my_name (char *name)
69 my_email = mu_get_user_email (name); 69 my_email = mu_get_user_email (name);
70 if (!my_email) 70 if (!my_email)
71 { 71 {
72 util_error("can't determine my email address: %s", mu_errstring (errno)); 72 util_error(_("can't determine my email address: %s"), mu_errstring (errno));
73 exit (1); 73 exit (1);
74 } 74 }
75 } 75 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999 Free Software Foundation, Inc. 2 Copyright (C) 1999 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -64,7 +64,7 @@ mail_copy0 (int argc, char **argv, int mark) ...@@ -64,7 +64,7 @@ mail_copy0 (int argc, char **argv, int mark)
64 if (mailbox_create_default (&mbx, filename) 64 if (mailbox_create_default (&mbx, filename)
65 || mailbox_open (mbx, MU_STREAM_WRITE | MU_STREAM_CREAT)) 65 || mailbox_open (mbx, MU_STREAM_WRITE | MU_STREAM_CREAT))
66 { 66 {
67 util_error ("can't create mailbox %s", filename); 67 util_error (_("can't create mailbox %s"), filename);
68 free (filename); 68 free (filename);
69 msgset_free (msglist); 69 msgset_free (msglist);
70 return 1; 70 return 1;
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -133,15 +133,15 @@ display_part_header (FILE *out, const msgset_t *msgset, ...@@ -133,15 +133,15 @@ display_part_header (FILE *out, const msgset_t *msgset,
133 fputc ('-', out); 133 fputc ('-', out);
134 fputc ('+', out); 134 fputc ('+', out);
135 fputc ('\n', out); 135 fputc ('\n', out);
136 fprintf (out, "| Message=%d", msgset->msg_part[0]); 136 fprintf (out, _("| Message=%d"), msgset->msg_part[0]);
137 for (i = 1; i < msgset->npart; i++) 137 for (i = 1; i < msgset->npart; i++)
138 fprintf (out, "[%d", msgset->msg_part[i]); 138 fprintf (out, "[%d", msgset->msg_part[i]);
139 for (i = 1; i < msgset->npart; i++) 139 for (i = 1; i < msgset->npart; i++)
140 fprintf (out, "]"); 140 fprintf (out, "]");
141 fprintf (out, "\n"); 141 fprintf (out, "\n");
142 142
143 fprintf (out, "| Type=%s\n", type); 143 fprintf (out, _("| Type=%s\n"), type);
144 fprintf (out, "| encoding=%s\n", encoding); 144 fprintf (out, _("| encoding=%s\n"), encoding);
145 fputc ('+', out); 145 fputc ('+', out);
146 for (i = 0; (int)i <= size; i++) 146 for (i = 0; (int)i <= size; i++)
147 fputc ('-', out); 147 fputc ('-', out);
...@@ -242,7 +242,7 @@ print_stream (stream_t stream, FILE *out) ...@@ -242,7 +242,7 @@ print_stream (stream_t stream, FILE *out)
242 { 242 {
243 if (ml_got_interrupt()) 243 if (ml_got_interrupt())
244 { 244 {
245 util_error("\nInterrupt"); 245 util_error(_("\nInterrupt"));
246 break; 246 break;
247 } 247 }
248 buffer[n] = '\0'; 248 buffer[n] = '\0';
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -27,7 +27,7 @@ mail_delete0 (void) ...@@ -27,7 +27,7 @@ mail_delete0 (void)
27 message_t msg; 27 message_t msg;
28 attribute_t attr; 28 attribute_t attr;
29 29
30 if (util_get_message (mbox, cursor, &msg, MSG_ALL)) 30 if (util_get_message (mbox, cursor, &msg, MSG_NODELETED))
31 return 1; 31 return 1;
32 message_get_attribute (msg, &attr); 32 message_get_attribute (msg, &attr);
33 attribute_set_deleted (attr); 33 attribute_set_deleted (attr);
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -36,7 +36,7 @@ mail_expand_name (const char *name) ...@@ -36,7 +36,7 @@ mail_expand_name (const char *name)
36 { 36 {
37 case '#': 37 case '#':
38 if (!prev_name) 38 if (!prev_name)
39 util_error ("No previous file"); 39 util_error (_("No previous file"));
40 else 40 else
41 name = xstrdup (prev_name); 41 name = xstrdup (prev_name);
42 break; 42 break;
...@@ -44,7 +44,7 @@ mail_expand_name (const char *name) ...@@ -44,7 +44,7 @@ mail_expand_name (const char *name)
44 case '&': 44 case '&':
45 name = getenv ("MBOX"); 45 name = getenv ("MBOX");
46 if (!name) 46 if (!name)
47 util_error ("MBOX environment variable not set"); 47 util_error (_("MBOX environment variable not set"));
48 else 48 else
49 name = xstrdup (name); 49 name = xstrdup (name);
50 break; 50 break;
...@@ -87,7 +87,7 @@ mail_file (int argc, char **argv) ...@@ -87,7 +87,7 @@ mail_file (int argc, char **argv)
87 || mailbox_open (newbox, MU_STREAM_RDWR) != 0) 87 || mailbox_open (newbox, MU_STREAM_RDWR) != 0)
88 { 88 {
89 mailbox_destroy (&newbox); 89 mailbox_destroy (&newbox);
90 util_error("can't open mailbox %s: %s", name, mu_errstring (errno)); 90 util_error(_("can't open mailbox %s: %s"), name, mu_errstring (errno));
91 free (name); 91 free (name);
92 return 1; 92 return 1;
93 } 93 }
...@@ -121,7 +121,7 @@ mail_file (int argc, char **argv) ...@@ -121,7 +121,7 @@ mail_file (int argc, char **argv)
121 } 121 }
122 else 122 else
123 { 123 {
124 util_error("%s takes only one arg", argv[0]); 124 util_error(_("%s takes only one arg"), argv[0]);
125 } 125 }
126 return 1; 126 return 1;
127 } 127 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -36,7 +36,7 @@ mail_folders (int argc, char **argv) ...@@ -36,7 +36,7 @@ mail_folders (int argc, char **argv)
36 char *tmp = alloca (strlen (path) + 3); 36 char *tmp = alloca (strlen (path) + 3);
37 if (!tmp) 37 if (!tmp)
38 { 38 {
39 util_error ("Not enough memory"); 39 util_error (_("Not enough memory"));
40 return 1; 40 return 1;
41 } 41 }
42 42
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -69,8 +69,8 @@ mail_followup (int argc, char **argv) ...@@ -69,8 +69,8 @@ mail_followup (int argc, char **argv)
69 69
70 msgset_free (msglist); 70 msgset_free (msglist);
71 71
72 fprintf (ofile, "To: %s\n", compose_header_get (&env, MU_HEADER_TO, "")); 72 fprintf (ofile, _("To: %s\n"), compose_header_get (&env, MU_HEADER_TO, ""));
73 fprintf (ofile, "Subject: %s\n\n", 73 fprintf (ofile, _("Subject: %s\n\n"),
74 compose_header_get (&env, MU_HEADER_SUBJECT, "")); 74 compose_header_get (&env, MU_HEADER_SUBJECT, ""));
75 75
76 status = mail_send0 (&env, isupper (argv[0][0])); 76 status = mail_send0 (&env, isupper (argv[0][0]));
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -52,7 +52,7 @@ _cond_push(int val) ...@@ -52,7 +52,7 @@ _cond_push(int val)
52 52
53 if (!_cond_stack) 53 if (!_cond_stack)
54 { 54 {
55 util_error("not enough memory"); 55 util_error(_("not enough memory"));
56 exit (EXIT_FAILURE); 56 exit (EXIT_FAILURE);
57 } 57 }
58 _cond_stack[_cond_level++] = val; 58 _cond_stack[_cond_level++] = val;
...@@ -63,7 +63,7 @@ _cond_pop() ...@@ -63,7 +63,7 @@ _cond_pop()
63 { 63 {
64 if (_cond_level == 0) 64 if (_cond_level == 0)
65 { 65 {
66 util_error("internal error: condition stack underflow"); 66 util_error(_("internal error: condition stack underflow"));
67 abort(); 67 abort();
68 } 68 }
69 return _cond_stack[--_cond_level]; 69 return _cond_stack[--_cond_level];
...@@ -85,13 +85,13 @@ mail_if (int argc, char **argv) ...@@ -85,13 +85,13 @@ mail_if (int argc, char **argv)
85 85
86 if (argc != 2) 86 if (argc != 2)
87 { 87 {
88 util_error("if requires an argument: s | r | t"); 88 util_error(_("if requires an argument: s | r | t"));
89 return 1; 89 return 1;
90 } 90 }
91 91
92 if (argv[1][1] != 0) 92 if (argv[1][1] != 0)
93 { 93 {
94 util_error("valid if arguments are: s | r | t"); 94 util_error(_("valid if arguments are: s | r | t"));
95 return 1; 95 return 1;
96 } 96 }
97 97
...@@ -115,7 +115,7 @@ mail_if (int argc, char **argv) ...@@ -115,7 +115,7 @@ mail_if (int argc, char **argv)
115 cond = interactive; 115 cond = interactive;
116 break; 116 break;
117 default: 117 default:
118 util_error("valid if arguments are: s | r | t"); 118 util_error(_("valid if arguments are: s | r | t"));
119 return 1; 119 return 1;
120 } 120 }
121 } 121 }
...@@ -131,7 +131,7 @@ mail_else (int argc, char **argv) ...@@ -131,7 +131,7 @@ mail_else (int argc, char **argv)
131 (void)argc; (void)argv; 131 (void)argc; (void)argv;
132 if (_cond_level == 0) 132 if (_cond_level == 0)
133 { 133 {
134 util_error("else without matching if"); 134 util_error(_("else without matching if"));
135 return 1; 135 return 1;
136 } 136 }
137 cond = _cond_pop(); 137 cond = _cond_pop();
...@@ -147,11 +147,10 @@ mail_endif (int argc, char **argv) ...@@ -147,11 +147,10 @@ mail_endif (int argc, char **argv)
147 (void)argc; (void)argv; 147 (void)argc; (void)argv;
148 if (_cond_level == 0) 148 if (_cond_level == 0)
149 { 149 {
150 util_error("endif without matching if"); 150 util_error(_("endif without matching if"));
151 return 1; 151 return 1;
152 } 152 }
153 _cond_pop(); 153 _cond_pop();
154 return 1; 154 return 1;
155 } 155 }
156 156
157
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -28,10 +28,10 @@ mail_inc (int argc, char **argv) ...@@ -28,10 +28,10 @@ mail_inc (int argc, char **argv)
28 if (!mailbox_is_updated (mbox)) 28 if (!mailbox_is_updated (mbox))
29 { 29 {
30 mailbox_messages_count (mbox, &total); 30 mailbox_messages_count (mbox, &total);
31 fprintf (ofile, "New mail has arrived\n"); 31 fprintf (ofile, _("New mail has arrived.\n"));
32 } 32 }
33 else 33 else
34 fprintf (ofile, "No new mail for %s\n", mail_whoami()); 34 fprintf (ofile, _("No new mail for %s\n"), mail_whoami());
35 35
36 return 0; 36 return 0;
37 } 37 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -26,29 +26,29 @@ FILE *ofile; ...@@ -26,29 +26,29 @@ FILE *ofile;
26 int interactive; 26 int interactive;
27 27
28 const char *argp_program_version = "mail (" PACKAGE_STRING ")"; 28 const char *argp_program_version = "mail (" PACKAGE_STRING ")";
29 static char doc[] = "GNU mail -- the standard /bin/mail interface"; 29 static char doc[] = N_("GNU mail -- the standard /bin/mail interface");
30 static char args_doc[] = "[address...]"; 30 static char args_doc[] = N_("[address...]");
31 31
32 static struct argp_option options[] = { 32 static struct argp_option options[] = {
33 {"exist", 'e', 0, 0, "Return true if mail exists", 0}, 33 {"exist", 'e', 0, 0, N_("Return true if mail exists"), 0},
34 {"file", 'f', "FILE", OPTION_ARG_OPTIONAL, 34 {"file", 'f', "FILE", OPTION_ARG_OPTIONAL,
35 "Operate on mailbox FILE (default ~/mbox)", 0}, 35 N_("Operate on mailbox FILE (default ~/mbox)"), 0},
36 {"byname", 'F', 0, 0, "Save messages according to sender", 0}, 36 {"byname", 'F', 0, 0, N_("Save messages according to sender"), 0},
37 {"headers", 'H', 0, 0, "Write a header summary and exit", 0}, 37 {"headers", 'H', 0, 0, N_("Write a header summary and exit"), 0},
38 {"ignore", 'i', 0, 0, "Ignore interrupts", 0}, 38 {"ignore", 'i', 0, 0, N_("Ignore interrupts"), 0},
39 {"norc", 'n', 0, 0, "Do not read the system mailrc file", 0}, 39 {"norc", 'n', 0, 0, N_("Do not read the system mailrc file"), 0},
40 {"nosum", 'N', 0, 0, "Do not display initial header summary", 0}, 40 {"nosum", 'N', 0, 0, N_("Do not display initial header summary"), 0},
41 {"print", 'p', 0, 0, "Print all mail to standard output", 0}, 41 {"print", 'p', 0, 0, N_("Print all mail to standard output"), 0},
42 {"quit", 'q', 0, 0, "Cause interrupts to terminate program", 0}, 42 {"quit", 'q', 0, 0, N_("Cause interrupts to terminate program"), 0},
43 {"read", 'r', 0, 0, "Same as -p", 0}, 43 {"read", 'r', 0, 0, N_("Same as -p"), 0},
44 {"subject", 's', "SUBJ", 0, "Send a message with a Subject of SUBJ", 0}, 44 {"subject", 's', "SUBJ", 0, N_("Send a message with a Subject of SUBJ"), 0},
45 {"to", 't', 0, 0, "Precede message by a list of addresses", 0}, 45 {"to", 't', 0, 0, N_("Precede message by a list of addresses"), 0},
46 {"user", 'u', "USER", 0, "Operate on USER's mailbox", 0}, 46 {"user", 'u', "USER", 0, N_("Operate on USER's mailbox"), 0},
47 {NULL, 0, NULL, OPTION_DOC, 47 {NULL, 0, NULL, OPTION_DOC,
48 "Note: Argument to --file (-f) option is optional. If it is present, " 48 N_("Note: Argument to --file (-f) option is optional. If it is present, "
49 "it must follow the short option immediately, without any intervening " 49 "it must follow the short option immediately, without any intervening "
50 "whitespace. If it is used with the long option, it must be separated " 50 "whitespace. If it is used with the long option, it must be separated "
51 "from it by an equal sign, with no intervening whitespace.", 0}, 51 "from it by an equal sign, with no intervening whitespace."), 0},
52 { NULL, 0, NULL, 0, NULL, 0 } 52 { NULL, 0, NULL, 0, NULL, 0 }
53 }; 53 };
54 54
...@@ -135,9 +135,10 @@ parse_opt (int key, char *arg, struct argp_state *state) ...@@ -135,9 +135,10 @@ parse_opt (int key, char *arg, struct argp_state *state)
135 135
136 if (args->file) 136 if (args->file)
137 { 137 {
138 util_error ("Usage error: --file takes an optional argument, it must follow the option\n" 138 util_error (_("Usage error: --file takes an optional argument, "
139 "without any intervening whitespace."); 139 "it must follow the option\n"
140 util_error ("Run mail --help for more info."); 140 "without any intervening whitespace."));
141 util_error (_("Run mail --help for more info."));
141 util_do_command ("set quiet"); 142 util_do_command ("set quiet");
142 args->file = arg; 143 args->file = arg;
143 } 144 }
...@@ -187,20 +188,20 @@ mail_cmdline(void *closure, int cont) ...@@ -187,20 +188,20 @@ mail_cmdline(void *closure, int cont)
187 && !mailbox_is_updated (mbox)) 188 && !mailbox_is_updated (mbox))
188 { 189 {
189 mailbox_messages_count (mbox, &total); 190 mailbox_messages_count (mbox, &total);
190 fprintf (ofile, "New mail has arrived\n"); 191 fprintf (ofile, _("New mail has arrived.\n"));
191 } 192 }
192 193
193 rc = ml_readline (prompt); 194 rc = ml_readline (prompt);
194 195
195 if (ml_got_interrupt()) 196 if (ml_got_interrupt())
196 { 197 {
197 util_error("Interrupt"); 198 util_error(_("Interrupt"));
198 continue; 199 continue;
199 } 200 }
200 201
201 if (!rc && util_getenv (NULL, "ignoreeof", Mail_env_boolean, 0) == 0) 202 if (!rc && util_getenv (NULL, "ignoreeof", Mail_env_boolean, 0) == 0)
202 { 203 {
203 util_error ("Use \"quit\" to quit."); 204 util_error (_("Use \"quit\" to quit."));
204 continue; 205 continue;
205 } 206 }
206 207
...@@ -221,6 +222,9 @@ main (int argc, char **argv) ...@@ -221,6 +222,9 @@ main (int argc, char **argv)
221 cursor = 1; 222 cursor = 1;
222 realcursor = cursor; 223 realcursor = cursor;
223 224
225 /* Native Language Support */
226 mu_init_nls ();
227
224 /* Register the desire formats. */ 228 /* Register the desire formats. */
225 { 229 {
226 list_t bookie; 230 list_t bookie;
...@@ -350,10 +354,10 @@ main (int argc, char **argv) ...@@ -350,10 +354,10 @@ main (int argc, char **argv)
350 if (util_getenv (NULL, "quiet", Mail_env_boolean, 0)) 354 if (util_getenv (NULL, "quiet", Mail_env_boolean, 0))
351 { 355 {
352 fprintf (ofile, 356 fprintf (ofile,
353 "%s, Copyright (C) 2001 Free Software Foundation, Inc.\n" 357 _("%s, Copyright (C) 2001 Free Software Foundation, Inc.\n"
354 "mail is free software with ABSOLUTELY NO WARRANTY.\n" 358 "mail is free software with ABSOLUTELY NO WARRANTY.\n"
355 "For details type `warranty'.\n" 359 "For details type `warranty'.\n"
356 "Send bug reports to %s.\n", 360 "Send bug reports to %s.\n"),
357 argp_program_version, 361 argp_program_version,
358 argp_program_bug_address); 362 argp_program_bug_address);
359 } 363 }
...@@ -391,14 +395,14 @@ main (int argc, char **argv) ...@@ -391,14 +395,14 @@ main (int argc, char **argv)
391 rc = mailbox_create_default (&mbox, NULL); 395 rc = mailbox_create_default (&mbox, NULL);
392 if (rc != 0) 396 if (rc != 0)
393 { 397 {
394 util_error ("Can not create mailbox for %s: %s", args.user, 398 util_error (_("Can not create mailbox for %s: %s"), args.user,
395 mu_errstring (rc)); 399 mu_errstring (rc));
396 exit (EXIT_FAILURE); 400 exit (EXIT_FAILURE);
397 } 401 }
398 } 402 }
399 else if ((rc = mailbox_create_default (&mbox, args.file)) != 0) 403 else if ((rc = mailbox_create_default (&mbox, args.file)) != 0)
400 { 404 {
401 util_error ("Can not create mailbox %s: %s", args.file, 405 util_error (_("Can not create mailbox %s: %s"), args.file,
402 mu_errstring (rc)); 406 mu_errstring (rc));
403 exit (EXIT_FAILURE); 407 exit (EXIT_FAILURE);
404 } 408 }
...@@ -415,7 +419,7 @@ main (int argc, char **argv) ...@@ -415,7 +419,7 @@ main (int argc, char **argv)
415 { 419 {
416 url_t url = NULL; 420 url_t url = NULL;
417 mailbox_get_url (mbox, &url); 421 mailbox_get_url (mbox, &url);
418 util_error ("Can not open mailbox %s: %s", 422 util_error (_("Can not open mailbox %s: %s"),
419 url_to_string (url), mu_errstring (rc)); 423 url_to_string (url), mu_errstring (rc));
420 exit (EXIT_FAILURE); 424 exit (EXIT_FAILURE);
421 } 425 }
...@@ -428,7 +432,7 @@ main (int argc, char **argv) ...@@ -428,7 +432,7 @@ main (int argc, char **argv)
428 { 432 {
429 url_t url = NULL; 433 url_t url = NULL;
430 mailbox_get_url (mbox, &url); 434 mailbox_get_url (mbox, &url);
431 util_error ("Can not read mailbox %s: %s", 435 util_error (_("Can not read mailbox %s: %s"),
432 url_to_string (url), mu_errstring (rc)); 436 url_to_string (url), mu_errstring (rc));
433 exit (EXIT_FAILURE); 437 exit (EXIT_FAILURE);
434 } 438 }
...@@ -446,9 +450,9 @@ main (int argc, char **argv) ...@@ -446,9 +450,9 @@ main (int argc, char **argv)
446 if (total == 0) 450 if (total == 0)
447 { 451 {
448 if (args.file) 452 if (args.file)
449 fprintf (ofile, "%s: 0 messages\n", args.file); 453 fprintf (ofile, _("%s: 0 messages\n"), args.file);
450 else 454 else
451 fprintf (ofile, "No mail for %s\n", 455 fprintf (ofile, _("No mail for %s\n"),
452 args.user ? args.user : mail_whoami ()); 456 args.user ? args.user : mail_whoami ());
453 return 1; 457 return 1;
454 } 458 }
...@@ -508,28 +512,24 @@ mail_mainloop (char *(*input) __P((void *, int)), void *closure, int do_history) ...@@ -508,28 +512,24 @@ mail_mainloop (char *(*input) __P((void *, int)), void *closure, int do_history)
508 } 512 }
509 } 513 }
510 514
511 static char warranty_stmt[] =
512 "GNU mailutils - a suite of utilities for electronic mail\n\
513 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.\n\
514 \n\
515 This program is free software; you can redistribute it and/or modify\n\
516 it under the terms of the GNU General Public License as published by\n\
517 the Free Software Foundation; either version 2, or (at your option)\n\
518 any later version.\n\
519 \n\
520 This program is distributed in the hope that it will be useful,\n\
521 but WITHOUT ANY WARRANTY; without even the implied warranty of\n\
522 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\
523 GNU General Public License for more details.\n\
524 \n\
525 You should have received a copy of the GNU General Public License\n\
526 along with this program; if not, write to the Free Software\n\
527 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n";
528
529 int 515 int
530 mail_warranty(int argc, char **argv) 516 mail_warranty (int argc, char **argv)
531 { 517 {
532 (void)argc; (void)argv; 518 (void)argc; (void)argv;
533 fprintf (ofile, "%s", warranty_stmt); 519
520 fputs (_("GNU Mailutils -- a suite of utilities for electronic mail\n"
521 "Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.\n\n"),
522 ofile);
523 fputs (_("GNU Mailutils is free software; you can redistribute it and/or modify\n"
524 "it under the terms of the GNU General Public License as published by\n"
525 "the Free Software Foundation; either version 2, or (at your option)\n"
526 "any later version.\n\n"), ofile);
527 fputs (_("GNU Mailutils is distributed in the hope that it will be useful,\n"
528 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n"
529 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n"
530 "GNU General Public License for more details.\n\n"), ofile);
531 fputs (_("You should have received a copy of the GNU General Public License\n"
532 "along with GNU Mailutils; if not, write to the Free Software\n"
533 "Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n"), ofile);
534 return 0; 534 return 0;
535 } 535 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #ifndef _MAIL_H 18 #ifndef _MAIL_H
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
54 #include <xalloc.h> 54 #include <xalloc.h>
55 55
56 #ifdef HAVE_READLINE_READLINE_H 56 #ifdef HAVE_READLINE_READLINE_H
57 #include <readline/readline.h> 57 # include <readline/readline.h>
58 #include <readline/history.h> 58 # include <readline/history.h>
59 #endif 59 #endif
60 60
61 #include <mailutils/address.h> 61 #include <mailutils/address.h>
...@@ -76,7 +76,7 @@ ...@@ -76,7 +76,7 @@
76 #include <mailutils/registrar.h> 76 #include <mailutils/registrar.h>
77 #include <mailutils/stream.h> 77 #include <mailutils/stream.h>
78 #include <mailutils/url.h> 78 #include <mailutils/url.h>
79 79 #include <mailutils/nls.h>
80 #include <mailutils/argcv.h> 80 #include <mailutils/argcv.h>
81 #include <getline.h> 81 #include <getline.h>
82 #include <mu_asprintf.h> 82 #include <mu_asprintf.h>
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -391,7 +391,7 @@ ml_reread (const char *prompt, char **text) ...@@ -391,7 +391,7 @@ ml_reread (const char *prompt, char **text)
391 391
392 if (!line) 392 if (!line)
393 { 393 {
394 util_error("not enough memory to edit the line"); 394 util_error (_("not enough memory to edit the line"));
395 return -1; 395 return -1;
396 } 396 }
397 397
...@@ -419,7 +419,7 @@ ml_reread (const char *prompt, char **text) ...@@ -419,7 +419,7 @@ ml_reread (const char *prompt, char **text)
419 if ((p = realloc (line, line_size + LINE_INC)) == NULL) 419 if ((p = realloc (line, line_size + LINE_INC)) == NULL)
420 { 420 {
421 fputs ("\n", stdout); 421 fputs ("\n", stdout);
422 util_error ("not enough memory to edit the line"); 422 util_error (_("not enough memory to edit the line"));
423 break; 423 break;
424 } 424 }
425 else 425 else
...@@ -465,8 +465,8 @@ ml_reread (const char *prompt, char **text) ...@@ -465,8 +465,8 @@ ml_reread (const char *prompt, char **text)
465 { 465 {
466 if ((p = realloc (line, line_size + LINE_INC)) == NULL) 466 if ((p = realloc (line, line_size + LINE_INC)) == NULL)
467 { 467 {
468 fputs("\n", stdout); 468 fputs ("\n", stdout);
469 util_error("not enough memory to edit the line"); 469 util_error (_("not enough memory to edit the line"));
470 break; 470 break;
471 } 471 }
472 else 472 else
...@@ -502,7 +502,7 @@ ml_reread (const char *prompt, char **text) ...@@ -502,7 +502,7 @@ ml_reread (const char *prompt, char **text)
502 if ((p = realloc (line, line_size + LINE_INC)) == NULL) 502 if ((p = realloc (line, line_size + LINE_INC)) == NULL)
503 { 503 {
504 fputs ("\n", stdout); 504 fputs ("\n", stdout);
505 util_error ("not enough memory to edit the line"); 505 util_error (_("not enough memory to edit the line"));
506 break; 506 break;
507 } 507 }
508 else 508 else
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -40,7 +40,7 @@ mail_next (int argc, char **argv) ...@@ -40,7 +40,7 @@ mail_next (int argc, char **argv)
40 40
41 if (rc) 41 if (rc)
42 { 42 {
43 util_error ("No applicable message"); 43 util_error (_("No applicable message"));
44 return 1; 44 return 1;
45 } 45 }
46 } 46 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -40,7 +40,7 @@ mail_previous (int argc, char **argv) ...@@ -40,7 +40,7 @@ mail_previous (int argc, char **argv)
40 40
41 if (rc) 41 if (rc)
42 { 42 {
43 util_error ("No applicable message"); 43 util_error (_("No applicable message"));
44 return 1; 44 return 1;
45 } 45 }
46 } 46 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -96,7 +96,7 @@ mail_print (int argc, char **argv) ...@@ -96,7 +96,7 @@ mail_print (int argc, char **argv)
96 { 96 {
97 if (ml_got_interrupt()) 97 if (ml_got_interrupt())
98 { 98 {
99 util_error("\nInterrupt"); 99 util_error (_("\nInterrupt"));
100 break; 100 break;
101 } 101 }
102 buffer[n] = '\0'; 102 buffer[n] = '\0';
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -47,7 +47,7 @@ mail_mbox_close () ...@@ -47,7 +47,7 @@ mail_mbox_close ()
47 47
48 mailbox_get_url (mbox, &url); 48 mailbox_get_url (mbox, &url);
49 mailbox_messages_count (mbox, &held_count); 49 mailbox_messages_count (mbox, &held_count);
50 fprintf (ofile, "Held %d messages in %s\n", held_count, url_to_string (url)); 50 fprintf (ofile, _("Held %d messages in %s\n"), held_count, url_to_string (url));
51 51
52 mailbox_close (mbox); 52 mailbox_close (mbox);
53 mailbox_destroy (&mbox); 53 mailbox_destroy (&mbox);
...@@ -104,7 +104,7 @@ mail_mbox_commit () ...@@ -104,7 +104,7 @@ mail_mbox_commit ()
104 || mailbox_open (dest_mbox, 104 || mailbox_open (dest_mbox,
105 MU_STREAM_WRITE | MU_STREAM_CREAT)) 105 MU_STREAM_WRITE | MU_STREAM_CREAT))
106 { 106 {
107 util_error("can't create mailbox %s", name); 107 util_error (_("can't create mailbox %s"), name);
108 return 1; 108 return 1;
109 } 109 }
110 } 110 }
...@@ -124,7 +124,7 @@ mail_mbox_commit () ...@@ -124,7 +124,7 @@ mail_mbox_commit ()
124 url_t u = NULL; 124 url_t u = NULL;
125 125
126 mailbox_get_url (dest_mbox, &u); 126 mailbox_get_url (dest_mbox, &u);
127 fprintf(ofile, "Saved %d messages in %s\n", saved_count, 127 fprintf(ofile, _("Saved %d messages in %s\n"), saved_count,
128 url_to_string (u)); 128 url_to_string (u));
129 mailbox_close (dest_mbox); 129 mailbox_close (dest_mbox);
130 mailbox_destroy (&dest_mbox); 130 mailbox_destroy (&dest_mbox);
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -61,7 +61,7 @@ make_in_reply_to (compose_env_t *env, message_t msg) ...@@ -61,7 +61,7 @@ make_in_reply_to (compose_env_t *env, message_t msg)
61 } 61 }
62 62
63 if (value) 63 if (value)
64 asprintf (&s1, "Your message of %s", value); 64 asprintf (&s1, _("Your message of %s"), value);
65 65
66 if (header_aget_value (hdr, MU_HEADER_MESSAGE_ID, &value) == 0) 66 if (header_aget_value (hdr, MU_HEADER_MESSAGE_ID, &value) == 0)
67 { 67 {
...@@ -235,12 +235,12 @@ mail_reply (int argc, char **argv) ...@@ -235,12 +235,12 @@ mail_reply (int argc, char **argv)
235 else 235 else
236 compose_header_set (&env, MU_HEADER_SUBJECT, "", COMPOSE_REPLACE); 236 compose_header_set (&env, MU_HEADER_SUBJECT, "", COMPOSE_REPLACE);
237 237
238 fprintf (ofile, "To: %s\n", 238 fprintf (ofile, _("To: %s\n"),
239 compose_header_get (&env, MU_HEADER_TO, "")); 239 compose_header_get (&env, MU_HEADER_TO, ""));
240 str = compose_header_get (&env, MU_HEADER_CC, NULL); 240 str = compose_header_get (&env, MU_HEADER_CC, NULL);
241 if (str) 241 if (str)
242 fprintf (ofile, "Cc: %s\n", str); 242 fprintf (ofile, _("Cc: %s\n"), str);
243 fprintf (ofile, "Subject: %s\n\n", 243 fprintf (ofile, _("Subject: %s\n\n"),
244 compose_header_get (&env, MU_HEADER_SUBJECT, "")); 244 compose_header_get (&env, MU_HEADER_SUBJECT, ""));
245 245
246 make_in_reply_to (&env, msg); 246 make_in_reply_to (&env, msg);
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -30,7 +30,7 @@ mail_retain (int argc, char **argv) ...@@ -30,7 +30,7 @@ mail_retain (int argc, char **argv)
30 if (argc == 1) 30 if (argc == 1)
31 { 31 {
32 if (!retained_headers) 32 if (!retained_headers)
33 fprintf (ofile, "No fields are currently being retained\n"); 33 fprintf (ofile, _("No fields are currently being retained\n"));
34 else 34 else
35 util_slist_print (retained_headers, 1); 35 util_slist_print (retained_headers, 1);
36 return 0; 36 return 0;
...@@ -52,7 +52,7 @@ mail_discard (int argc, char **argv) ...@@ -52,7 +52,7 @@ mail_discard (int argc, char **argv)
52 if (argc == 1) 52 if (argc == 1)
53 { 53 {
54 if (!ignored_headers) 54 if (!ignored_headers)
55 fprintf (ofile, "No fields are currently being ignored\n"); 55 fprintf (ofile, _("No fields are currently being ignored\n"));
56 else 56 else
57 util_slist_print (ignored_headers, 1); 57 util_slist_print (ignored_headers, 1);
58 return 0; 58 return 0;
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include <sys/types.h> 18 #include <sys/types.h>
...@@ -112,7 +112,7 @@ compose_header_set (compose_env_t * env, char *name, char *value, int mode) ...@@ -112,7 +112,7 @@ compose_header_set (compose_env_t * env, char *name, char *value, int mode)
112 if (!env->header 112 if (!env->header
113 && (status = header_create (&env->header, NULL, 0, NULL)) != 0) 113 && (status = header_create (&env->header, NULL, 0, NULL)) != 0)
114 { 114 {
115 util_error ("can't create header: %s", mu_errstring (status)); 115 util_error (_("can't create header: %s"), mu_errstring (status));
116 return status; 116 return status;
117 } 117 }
118 118
...@@ -195,7 +195,7 @@ mail_send0 (compose_env_t * env, int save_to) ...@@ -195,7 +195,7 @@ mail_send0 (compose_env_t * env, int save_to)
195 195
196 if (fd == -1) 196 if (fd == -1)
197 { 197 {
198 util_error ("Can not open temporary file"); 198 util_error (_("Can not open temporary file"));
199 return 1; 199 return 1;
200 } 200 }
201 201
...@@ -224,7 +224,7 @@ mail_send0 (compose_env_t * env, int save_to) ...@@ -224,7 +224,7 @@ mail_send0 (compose_env_t * env, int save_to)
224 free (buf); 224 free (buf);
225 if (++int_cnt == 2) 225 if (++int_cnt == 2)
226 break; 226 break;
227 util_error ("(Interrupt -- one more to kill letter)"); 227 util_error (_("(Interrupt -- one more to kill letter)"));
228 } 228 }
229 continue; 229 continue;
230 } 230 }
...@@ -234,8 +234,8 @@ mail_send0 (compose_env_t * env, int save_to) ...@@ -234,8 +234,8 @@ mail_send0 (compose_env_t * env, int save_to)
234 if (util_getenv (NULL, "ignore", Mail_env_boolean, 0) == 0) 234 if (util_getenv (NULL, "ignore", Mail_env_boolean, 0) == 0)
235 { 235 {
236 util_error (util_getenv (NULL, "dot", Mail_env_boolean, 0) == 0 ? 236 util_error (util_getenv (NULL, "dot", Mail_env_boolean, 0) == 0 ?
237 "Use \".\" to terminate letter." : 237 _("Use \".\" to terminate letter.") :
238 "Use \"~.\" to terminate letter."); 238 _("Use \"~.\" to terminate letter."));
239 continue; 239 continue;
240 } 240 }
241 else 241 else
...@@ -275,11 +275,11 @@ mail_send0 (compose_env_t * env, int save_to) ...@@ -275,11 +275,11 @@ mail_send0 (compose_env_t * env, int save_to)
275 if (entry.escfunc) 275 if (entry.escfunc)
276 status = (*entry.escfunc) (argc, argv, env); 276 status = (*entry.escfunc) (argc, argv, env);
277 else 277 else
278 util_error ("Unknown escape %s", argv[0]); 278 util_error (_("Unknown escape %s"), argv[0]);
279 } 279 }
280 else 280 else
281 { 281 {
282 util_error ("can't parse escape sequence"); 282 util_error (_("can't parse escape sequence"));
283 } 283 }
284 argcv_free (argc, argv); 284 argcv_free (argc, argv);
285 285
...@@ -304,7 +304,7 @@ mail_send0 (compose_env_t * env, int save_to) ...@@ -304,7 +304,7 @@ mail_send0 (compose_env_t * env, int save_to)
304 304
305 if (!fp) 305 if (!fp)
306 { 306 {
307 util_error ("can't open file %s: %s", getenv ("DEAD"), 307 util_error (_("can't open file %s: %s"), getenv ("DEAD"),
308 strerror (errno)); 308 strerror (errno));
309 } 309 }
310 else 310 else
...@@ -359,7 +359,7 @@ mail_send0 (compose_env_t * env, int save_to) ...@@ -359,7 +359,7 @@ mail_send0 (compose_env_t * env, int save_to)
359 } 359 }
360 360
361 if (offset == 0) 361 if (offset == 0)
362 util_error ("Null message body; hope that's ok\n"); 362 util_error (_("Null message body; hope that's ok\n"));
363 if (buf) 363 if (buf)
364 free (buf); 364 free (buf);
365 } 365 }
...@@ -413,7 +413,7 @@ mail_send0 (compose_env_t * env, int save_to) ...@@ -413,7 +413,7 @@ mail_send0 (compose_env_t * env, int save_to)
413 mailbox_destroy (&mbx); 413 mailbox_destroy (&mbx);
414 } 414 }
415 if (status) 415 if (status)
416 util_error ("can't create mailbox %s", env->outfiles[i]); 416 util_error (_("can't create mailbox %s"), env->outfiles[i]);
417 } 417 }
418 } 418 }
419 } 419 }
...@@ -449,7 +449,7 @@ mail_send0 (compose_env_t * env, int save_to) ...@@ -449,7 +449,7 @@ mail_send0 (compose_env_t * env, int save_to)
449 msg_to_pipe (sendmail, msg); 449 msg_to_pipe (sendmail, msg);
450 } 450 }
451 else 451 else
452 util_error ("variable sendmail not set: no mailer"); 452 util_error (_("variable sendmail not set: no mailer"));
453 } 453 }
454 message_destroy (&msg, NULL); 454 message_destroy (&msg, NULL);
455 remove (filename); 455 remove (filename);
...@@ -497,5 +497,5 @@ msg_to_pipe (const char *cmd, message_t msg) ...@@ -497,5 +497,5 @@ msg_to_pipe (const char *cmd, message_t msg)
497 fclose (fp); 497 fclose (fp);
498 } 498 }
499 else 499 else
500 util_error ("Piping %s failed", cmd); 500 util_error (_("Piping %s failed"), cmd);
501 } 501 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -48,7 +48,7 @@ mail_source (int argc, char **argv) ...@@ -48,7 +48,7 @@ mail_source (int argc, char **argv)
48 48
49 if (argc != 2) 49 if (argc != 2)
50 { 50 {
51 util_error("source requires an argument"); 51 util_error (_("source requires an argument"));
52 return 1; 52 return 1;
53 } 53 }
54 54
...@@ -56,7 +56,7 @@ mail_source (int argc, char **argv) ...@@ -56,7 +56,7 @@ mail_source (int argc, char **argv)
56 if (!fp) 56 if (!fp)
57 { 57 {
58 if (errno != ENOENT) 58 if (errno != ENOENT)
59 util_error("can't open `%s': %s", argv[1], strerror(errno)); 59 util_error(_("can't open `%s': %s"), argv[1], strerror(errno));
60 return 1; 60 return 1;
61 } 61 }
62 62
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -63,13 +63,13 @@ mail_summary (int argc, char **argv) ...@@ -63,13 +63,13 @@ mail_summary (int argc, char **argv)
63 mailbox_get_url (mbox, &url); 63 mailbox_get_url (mbox, &url);
64 printf("\"%s\": ", url_to_string (url)); 64 printf("\"%s\": ", url_to_string (url));
65 } 65 }
66 printf("%d messages", count); 66 printf (_("%d messages"), count);
67 if (mnew > 0) 67 if (mnew > 0)
68 printf(" %d new", mnew); 68 printf (_(" %d new"), mnew);
69 if (mseen > 0) 69 if (mseen > 0)
70 printf(" %d unread", mseen); 70 printf (_(" %d unread"), mseen);
71 if (mdelete > 0) 71 if (mdelete > 0)
72 printf(" %d deleted", mdelete); 72 printf (_(" %d deleted"), mdelete);
73 printf("\n"); 73 printf("\n");
74 74
75 /* Set the cursor. */ 75 /* Set the cursor. */
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -26,7 +26,7 @@ mail_unalias (int argc, char **argv) ...@@ -26,7 +26,7 @@ mail_unalias (int argc, char **argv)
26 { 26 {
27 if (argc == 1) 27 if (argc == 1)
28 { 28 {
29 util_error("unalias requires at least one argument"); 29 util_error (_("unalias requires at least one argument"));
30 return 1; 30 return 1;
31 } 31 }
32 while (--argc) 32 while (--argc)
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -148,7 +148,7 @@ util_do_command (const char *c, ...) ...@@ -148,7 +148,7 @@ util_do_command (const char *c, ...)
148 } 148 }
149 else 149 else
150 { 150 {
151 util_error ("Unknown command: %s", argv[0]); 151 util_error (_("Unknown command: %s"), argv[0]);
152 status = 1; 152 status = 1;
153 } 153 }
154 154
...@@ -390,7 +390,7 @@ util_getenv (void *ptr, const char *variable, mail_env_data_t type, int warn) ...@@ -390,7 +390,7 @@ util_getenv (void *ptr, const char *variable, mail_env_data_t type, int warn)
390 if (!mail_env_entry_is_set (env) || env->type != type) 390 if (!mail_env_entry_is_set (env) || env->type != type)
391 { 391 {
392 if (warn) 392 if (warn)
393 util_error ("No value set for \"%s\"", variable); 393 util_error (_("No value set for \"%s\""), variable);
394 return 1; 394 return 1;
395 } 395 }
396 if (ptr) 396 if (ptr)
...@@ -488,7 +488,7 @@ util_printenv (int set) ...@@ -488,7 +488,7 @@ util_printenv (int set)
488 break; 488 break;
489 489
490 case Mail_env_whatever: 490 case Mail_env_whatever:
491 fprintf (ofile, "oops?"); 491 fprintf (ofile, _("oops?"));
492 } 492 }
493 fprintf (ofile, "\n"); 493 fprintf (ofile, "\n");
494 } 494 }
...@@ -583,7 +583,7 @@ util_get_homedir () ...@@ -583,7 +583,7 @@ util_get_homedir ()
583 if (!homedir) 583 if (!homedir)
584 { 584 {
585 /* Shouldn't happen, but one never knows */ 585 /* Shouldn't happen, but one never knows */
586 util_error ("can't get homedir"); 586 util_error (_("can't get homedir"));
587 exit (EXIT_FAILURE); 587 exit (EXIT_FAILURE);
588 } 588 }
589 return homedir; 589 return homedir;
...@@ -646,14 +646,14 @@ util_get_sender(int msgno, int strip) ...@@ -646,14 +646,14 @@ util_get_sender(int msgno, int strip)
646 if (envelope_sender (env, buffer, sizeof (buffer), NULL) 646 if (envelope_sender (env, buffer, sizeof (buffer), NULL)
647 || address_create (&addr, buffer)) 647 || address_create (&addr, buffer))
648 { 648 {
649 util_error("can't determine sender name (msg %d)", msgno); 649 util_error (_("can't determine sender name (msg %d)"), msgno);
650 return NULL; 650 return NULL;
651 } 651 }
652 } 652 }
653 653
654 if (address_get_email (addr, 1, buffer, sizeof(buffer), NULL)) 654 if (address_get_email (addr, 1, buffer, sizeof(buffer), NULL))
655 { 655 {
656 util_error("can't determine sender name (msg %d)", msgno); 656 util_error (_("can't determine sender name (msg %d)"), msgno);
657 address_destroy (&addr); 657 address_destroy (&addr);
658 return NULL; 658 return NULL;
659 } 659 }
...@@ -721,7 +721,7 @@ util_slist_add (list_t *list, char *value) ...@@ -721,7 +721,7 @@ util_slist_add (list_t *list, char *value)
721 721
722 if ((p = strdup(value)) == NULL) 722 if ((p = strdup(value)) == NULL)
723 { 723 {
724 util_error("not enough memory\n"); 724 util_error(_("not enough memory\n"));
725 return; 725 return;
726 } 726 }
727 list_append (*list, p); 727 list_append (*list, p);
...@@ -879,7 +879,7 @@ util_save_outgoing (message_t msg, char *savefile) ...@@ -879,7 +879,7 @@ util_save_outgoing (message_t msg, char *savefile)
879 outfile = fopen (filename, "a"); 879 outfile = fopen (filename, "a");
880 if (!outfile) 880 if (!outfile)
881 { 881 {
882 util_error("can't open save file %s: %s", 882 util_error(_("can't open save file %s: %s"),
883 filename, strerror (errno)); 883 filename, strerror (errno));
884 } 884 }
885 else 885 else
...@@ -896,7 +896,7 @@ util_save_outgoing (message_t msg, char *savefile) ...@@ -896,7 +896,7 @@ util_save_outgoing (message_t msg, char *savefile)
896 896
897 if (!bsize) 897 if (!bsize)
898 { 898 {
899 util_error("not enough memory for creating save file"); 899 util_error(_("not enough memory for creating save file"));
900 } 900 }
901 else 901 else
902 { 902 {
...@@ -981,7 +981,7 @@ util_help (const struct mail_command_entry *table, char *word) ...@@ -981,7 +981,7 @@ util_help (const struct mail_command_entry *table, char *word)
981 else 981 else
982 { 982 {
983 status = 1; 983 status = 1;
984 fprintf (stdout, "Unknown command: %s\n", word); 984 fprintf (stdout, _("Unknown command: %s\n"), word);
985 } 985 }
986 return status; 986 return status;
987 } 987 }
...@@ -1006,7 +1006,7 @@ util_descend_subparts (message_t mesg, msgset_t *msgset, message_t *part) ...@@ -1006,7 +1006,7 @@ util_descend_subparts (message_t mesg, msgset_t *msgset, message_t *part)
1006 { 1006 {
1007 if (message_unencapsulate (mesg, &submsg, NULL)) 1007 if (message_unencapsulate (mesg, &submsg, NULL))
1008 { 1008 {
1009 util_error ("can't unencapsulate message/part"); 1009 util_error (_("can't unencapsulate message/part"));
1010 return 1; 1010 return 1;
1011 } 1011 }
1012 mesg = submsg; 1012 mesg = submsg;
...@@ -1015,14 +1015,14 @@ util_descend_subparts (message_t mesg, msgset_t *msgset, message_t *part) ...@@ -1015,14 +1015,14 @@ util_descend_subparts (message_t mesg, msgset_t *msgset, message_t *part)
1015 message_get_num_parts (mesg, &nparts); 1015 message_get_num_parts (mesg, &nparts);
1016 if (nparts < msgset->msg_part[i]) 1016 if (nparts < msgset->msg_part[i])
1017 { 1017 {
1018 util_error ("no such (sub)part in the message: %d", 1018 util_error (_("no such (sub)part in the message: %d"),
1019 msgset->msg_part[i]); 1019 msgset->msg_part[i]);
1020 return 1; 1020 return 1;
1021 } 1021 }
1022 1022
1023 if (message_get_part (mesg, msgset->msg_part[i], &submsg)) 1023 if (message_get_part (mesg, msgset->msg_part[i], &submsg))
1024 { 1024 {
1025 util_error ("can't get (sub)part from the message: %d", 1025 util_error (_("can't get (sub)part from the message: %d"),
1026 msgset->msg_part[i]); 1026 msgset->msg_part[i]);
1027 return 1; 1027 return 1;
1028 } 1028 }
...@@ -1146,7 +1146,7 @@ util_header_expand (header_t *phdr) ...@@ -1146,7 +1146,7 @@ util_header_expand (header_t *phdr)
1146 rc = header_create (&hdr, "", 0, NULL); 1146 rc = header_create (&hdr, "", 0, NULL);
1147 if (rc) 1147 if (rc)
1148 { 1148 {
1149 util_error ("can't create temporary header: %s", mu_errstring (rc)); 1149 util_error (_("can't create temporary header: %s"), mu_errstring (rc));
1150 return 1; 1150 return 1;
1151 } 1151 }
1152 1152
...@@ -1187,10 +1187,10 @@ util_header_expand (header_t *phdr) ...@@ -1187,10 +1187,10 @@ util_header_expand (header_t *phdr)
1187 { 1187 {
1188 errcnt++; 1188 errcnt++;
1189 if (exp) 1189 if (exp)
1190 util_error ("can't parse address `%s' (while expanding `%s'): %s", 1190 util_error (_("can't parse address `%s' (while expanding `%s'): %s"),
1191 exp, p, mu_errstring (rc)); 1191 exp, p, mu_errstring (rc));
1192 else 1192 else
1193 util_error ("can't parse address `%s': %s", 1193 util_error (_("can't parse address `%s': %s"),
1194 p, mu_errstring (rc)); 1194 p, mu_errstring (rc));
1195 } 1195 }
1196 1196
...@@ -1243,7 +1243,7 @@ util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int flag) ...@@ -1243,7 +1243,7 @@ util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int flag)
1243 status = mailbox_get_message (mbox, msgno, msg); 1243 status = mailbox_get_message (mbox, msgno, msg);
1244 if (status) 1244 if (status)
1245 { 1245 {
1246 util_error ("can't get message %lu: %s", 1246 util_error (_("can't get message %lu: %s"),
1247 (unsigned long) msgno, mu_errstring (status)); 1247 (unsigned long) msgno, mu_errstring (status));
1248 return status; 1248 return status;
1249 } 1249 }
...@@ -1251,7 +1251,7 @@ util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int flag) ...@@ -1251,7 +1251,7 @@ util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int flag)
1251 if ((flag & MSG_NODELETED) && util_isdeleted (*msg)) 1251 if ((flag & MSG_NODELETED) && util_isdeleted (*msg))
1252 { 1252 {
1253 if (!(flag & MSG_SILENT)) 1253 if (!(flag & MSG_SILENT))
1254 util_error ("%lu: Inappropriate message (has been deleted)", 1254 util_error (_("%lu: Inappropriate message (has been deleted)"),
1255 (unsigned long) msgno); 1255 (unsigned long) msgno);
1256 return ENOENT; 1256 return ENOENT;
1257 } 1257 }
...@@ -1261,6 +1261,6 @@ util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int flag) ...@@ -1261,6 +1261,6 @@ util_get_message (mailbox_t mbox, size_t msgno, message_t *msg, int flag)
1261 int 1261 int
1262 util_error_range (size_t msgno) 1262 util_error_range (size_t msgno)
1263 { 1263 {
1264 util_error ("%d: invalid message number", msgno); 1264 util_error (_("%d: invalid message number"), msgno);
1265 return 1; 1265 return 1;
1266 } 1266 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 /* Functions for handling escape variables */ 18 /* Functions for handling escape variables */
...@@ -55,7 +55,7 @@ parse_headers (FILE *fp, compose_env_t *env) ...@@ -55,7 +55,7 @@ parse_headers (FILE *fp, compose_env_t *env)
55 55
56 if ((status = header_create (&header, NULL, 0, NULL)) != 0) 56 if ((status = header_create (&header, NULL, 0, NULL)) != 0)
57 { 57 {
58 util_error ("can't create header: %s", mu_errstring (status)); 58 util_error (_("can't create header: %s"), mu_errstring (status));
59 return 1; 59 return 1;
60 } 60 }
61 61
...@@ -91,7 +91,7 @@ parse_headers (FILE *fp, compose_env_t *env) ...@@ -91,7 +91,7 @@ parse_headers (FILE *fp, compose_env_t *env)
91 } 91 }
92 else 92 else
93 { 93 {
94 util_error ("%d: not a header line", line); 94 util_error (_("%d: not a header line"), line);
95 errcnt++; 95 errcnt++;
96 } 96 }
97 } 97 }
...@@ -117,7 +117,7 @@ parse_headers (FILE *fp, compose_env_t *env) ...@@ -117,7 +117,7 @@ parse_headers (FILE *fp, compose_env_t *env)
117 } 117 }
118 else 118 else
119 { 119 {
120 util_error ("%d: not a header line", line); 120 util_error (_("%d: not a header line"), line);
121 errcnt++; 121 errcnt++;
122 } 122 }
123 } 123 }
...@@ -138,7 +138,7 @@ parse_headers (FILE *fp, compose_env_t *env) ...@@ -138,7 +138,7 @@ parse_headers (FILE *fp, compose_env_t *env)
138 char *p; 138 char *p;
139 139
140 header_destroy (&header, NULL); 140 header_destroy (&header, NULL);
141 p = ml_readline ("Edit again?"); 141 p = ml_readline (_("Edit again?"));
142 if (*p == 'y' || *p == 'Y') 142 if (*p == 'y' || *p == 'Y')
143 return -1; 143 return -1;
144 else 144 else
...@@ -153,7 +153,7 @@ parse_headers (FILE *fp, compose_env_t *env) ...@@ -153,7 +153,7 @@ parse_headers (FILE *fp, compose_env_t *env)
153 static void 153 static void
154 var_continue (void) 154 var_continue (void)
155 { 155 {
156 fprintf (stdout, "(continue)\n"); 156 fprintf (stdout, _("(continue)\n"));
157 } 157 }
158 158
159 static int 159 static int
...@@ -163,7 +163,7 @@ var_check_args (int argc, char **argv) ...@@ -163,7 +163,7 @@ var_check_args (int argc, char **argv)
163 { 163 {
164 char *escape = "~"; 164 char *escape = "~";
165 util_getenv (&escape, "escape", Mail_env_string, 0); 165 util_getenv (&escape, "escape", Mail_env_string, 0);
166 util_error ("%c%s requires an argument", escape[0], argv[0]); 166 util_error (_("%c%s requires an argument"), escape[0], argv[0]);
167 return 1; 167 return 1;
168 } 168 }
169 return 0; 169 return 0;
...@@ -195,12 +195,12 @@ var_command (int argc, char **argv, compose_env_t *env) ...@@ -195,12 +195,12 @@ var_command (int argc, char **argv, compose_env_t *env)
195 entry = util_find_entry (mail_command_table, argv[1]); 195 entry = util_find_entry (mail_command_table, argv[1]);
196 if (!entry.func) 196 if (!entry.func)
197 { 197 {
198 util_error ("Unknown command: %s", argv[1]); 198 util_error (_("Unknown command: %s"), argv[1]);
199 return 1; 199 return 1;
200 } 200 }
201 if (entry.flags & (EF_FLOW | EF_SEND)) 201 if (entry.flags & (EF_FLOW | EF_SEND))
202 { 202 {
203 util_error ("Command not allowed in an escape sequence\n"); 203 util_error (_("Command not allowed in an escape sequence\n"));
204 return 1; 204 return 1;
205 } 205 }
206 206
...@@ -251,11 +251,11 @@ var_sign (int argc, char **argv, compose_env_t *env) ...@@ -251,11 +251,11 @@ var_sign (int argc, char **argv, compose_env_t *env)
251 251
252 if (!fp) 252 if (!fp)
253 { 253 {
254 util_error ("can't open %s: %s", name, strerror (errno)); 254 util_error (_("can't open %s: %s"), name, strerror (errno));
255 free (name); 255 free (name);
256 } 256 }
257 257
258 fprintf (stdout, "Reading %s\n", name); 258 fprintf (stdout, _("Reading %s\n"), name);
259 while (getline (&buf, &n, fp) > 0) 259 while (getline (&buf, &n, fp) > 0)
260 fprintf (ofile, "%s", buf); 260 fprintf (ofile, "%s", buf);
261 261
...@@ -455,7 +455,7 @@ var_quote (int argc, char **argv, compose_env_t *env) ...@@ -455,7 +455,7 @@ var_quote (int argc, char **argv, compose_env_t *env)
455 if (util_get_message (mbox, cursor, &mesg, MSG_NODELETED)) 455 if (util_get_message (mbox, cursor, &mesg, MSG_NODELETED))
456 return 1; 456 return 1;
457 457
458 fprintf (stdout, "Interpolating: %d\n", cursor); 458 fprintf (stdout, _("Interpolating: %d\n"), cursor);
459 459
460 util_getenv (&prefix, "indentprefix", Mail_env_string, 0); 460 util_getenv (&prefix, "indentprefix", Mail_env_string, 0);
461 461
...@@ -516,7 +516,7 @@ var_type_input (int argc, char **argv, compose_env_t *env) ...@@ -516,7 +516,7 @@ var_type_input (int argc, char **argv, compose_env_t *env)
516 { 516 {
517 char buffer[512]; 517 char buffer[512];
518 518
519 fprintf (env->ofile, "Message contains:\n"); 519 fprintf (env->ofile, _("Message contains:\n"));
520 520
521 dump_headers (env->ofile, env); 521 dump_headers (env->ofile, env);
522 522
...@@ -546,7 +546,7 @@ var_read (int argc, char **argv, compose_env_t *env) ...@@ -546,7 +546,7 @@ var_read (int argc, char **argv, compose_env_t *env)
546 inf = fopen (filename, "r"); 546 inf = fopen (filename, "r");
547 if (!inf) 547 if (!inf)
548 { 548 {
549 util_error ("can't open %s: %s\n", filename, strerror (errno)); 549 util_error (_("can't open %s: %s\n"), filename, strerror (errno));
550 free (filename); 550 free (filename);
551 return 1; 551 return 1;
552 } 552 }
...@@ -601,7 +601,7 @@ var_write (int argc, char **argv, compose_env_t *env) ...@@ -601,7 +601,7 @@ var_write (int argc, char **argv, compose_env_t *env)
601 601
602 if (!fp) 602 if (!fp)
603 { 603 {
604 util_error ("can't open %s: %s\n", filename, strerror (errno)); 604 util_error (_("can't open %s: %s\n"), filename, strerror (errno));
605 free (filename); 605 free (filename);
606 return 1; 606 return 1;
607 } 607 }
...@@ -631,7 +631,7 @@ var_pipe (int argc, char **argv, compose_env_t *env) ...@@ -631,7 +631,7 @@ var_pipe (int argc, char **argv, compose_env_t *env)
631 631
632 if (argc == 1) 632 if (argc == 1)
633 { 633 {
634 util_error ("pipe: no command specified"); 634 util_error (_("pipe: no command specified"));
635 return 1; 635 return 1;
636 } 636 }
637 637
...@@ -675,7 +675,7 @@ var_pipe (int argc, char **argv, compose_env_t *env) ...@@ -675,7 +675,7 @@ var_pipe (int argc, char **argv, compose_env_t *env)
675 xargv[i] = argv[i + 1]; 675 xargv[i] = argv[i + 1];
676 xargv[i] = NULL; 676 xargv[i] = NULL;
677 execvp (xargv[0], xargv); 677 execvp (xargv[0], xargv);
678 util_error ("cannot exec process `%s': %s", xargv[0], strerror (errno)); 678 util_error (_("cannot exec process `%s': %s"), xargv[0], strerror (errno));
679 exit (1); 679 exit (1);
680 } 680 }
681 else 681 else
...@@ -708,14 +708,14 @@ var_pipe (int argc, char **argv, compose_env_t *env) ...@@ -708,14 +708,14 @@ var_pipe (int argc, char **argv, compose_env_t *env)
708 waitpid (pid, &status, 0); 708 waitpid (pid, &status, 0);
709 if (!WIFEXITED (status)) 709 if (!WIFEXITED (status))
710 { 710 {
711 util_error ("child terminated abnormally: %d", WEXITSTATUS (status)); 711 util_error (_("child terminated abnormally: %d"), WEXITSTATUS (status));
712 } 712 }
713 else 713 else
714 { 714 {
715 struct stat st; 715 struct stat st;
716 if (fstat (fd, &st)) 716 if (fstat (fd, &st))
717 { 717 {
718 util_error ("can't stat output file: %s", strerror (errno)); 718 util_error (_("can't stat output file: %s"), strerror (errno));
719 } 719 }
720 else if (st.st_size > 0) 720 else if (st.st_size > 0)
721 rc = 0; 721 rc = 0;
...@@ -725,7 +725,7 @@ var_pipe (int argc, char **argv, compose_env_t *env) ...@@ -725,7 +725,7 @@ var_pipe (int argc, char **argv, compose_env_t *env)
725 (unsigned long) lines, (unsigned long) size); 725 (unsigned long) lines, (unsigned long) size);
726 if (rc) 726 if (rc)
727 { 727 {
728 fprintf (stdout, "no lines out\n"); 728 fprintf (stdout, _("no lines out\n"));
729 } 729 }
730 else 730 else
731 { 731 {
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -50,5 +50,6 @@ mail_version (int argc, char **argv) ...@@ -50,5 +50,6 @@ mail_version (int argc, char **argv)
50 fprintf (ofile, " )"); 50 fprintf (ofile, " )");
51 } 51 }
52 fprintf (ofile, "\n"); 52 fprintf (ofile, "\n");
53
53 return 0; 54 return 0;
54 } 55 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -67,7 +67,7 @@ mail_write (int argc, char **argv) ...@@ -67,7 +67,7 @@ mail_write (int argc, char **argv)
67 output = fopen (filename, "a"); 67 output = fopen (filename, "a");
68 if (!output) 68 if (!output)
69 { 69 {
70 util_error("can't open %s: %s", filename, strerror (errno)); 70 util_error (_("can't open %s: %s"), filename, strerror (errno));
71 free (filename); 71 free (filename);
72 fclose (output); 72 fclose (output);
73 msgset_free (msglist); 73 msgset_free (msglist);
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "mail.h" 18 #include "mail.h"
...@@ -60,7 +60,7 @@ z_parse_args(int argc, char **argv, unsigned int *return_count, int *return_dir) ...@@ -60,7 +60,7 @@ z_parse_args(int argc, char **argv, unsigned int *return_count, int *return_dir)
60 dir = D_NONE; 60 dir = D_NONE;
61 break; 61 break;
62 default: 62 default:
63 util_error("Bad arguments for the scrolling command"); 63 util_error (_("Bad arguments for the scrolling command"));
64 return 1; 64 return 1;
65 } 65 }
66 66
...@@ -75,7 +75,7 @@ z_parse_args(int argc, char **argv, unsigned int *return_count, int *return_dir) ...@@ -75,7 +75,7 @@ z_parse_args(int argc, char **argv, unsigned int *return_count, int *return_dir)
75 75
76 if (argc > 1) 76 if (argc > 1)
77 { 77 {
78 util_error("Too many arguments for the scrolling command"); 78 util_error (_("Too many arguments for the scrolling command"));
79 return 1; 79 return 1;
80 } 80 }
81 81
...@@ -83,13 +83,13 @@ z_parse_args(int argc, char **argv, unsigned int *return_count, int *return_dir) ...@@ -83,13 +83,13 @@ z_parse_args(int argc, char **argv, unsigned int *return_count, int *return_dir)
83 { 83 {
84 if (dir == D_NONE) 84 if (dir == D_NONE)
85 { 85 {
86 util_error("argument not applicable for z."); 86 util_error (_("argument not applicable for z."));
87 return 1; 87 return 1;
88 } 88 }
89 89
90 if ((mul = strtoul (argp, NULL, 10)) == 0) 90 if ((mul = strtoul (argp, NULL, 10)) == 0)
91 { 91 {
92 util_error("Bad number of pages"); 92 util_error (_("Bad number of pages"));
93 return 1; 93 return 1;
94 } 94 }
95 } 95 }
...@@ -121,7 +121,7 @@ mail_z (int argc, char **argv) ...@@ -121,7 +121,7 @@ mail_z (int argc, char **argv)
121 case D_BWD: 121 case D_BWD:
122 if (cursor < nlines) 122 if (cursor < nlines)
123 { 123 {
124 fprintf(stdout, "On first screenful of messages\n"); 124 fprintf (stdout, _("On first screenful of messages\n"));
125 return 0; 125 return 0;
126 } 126 }
127 if (cursor < count) 127 if (cursor < count)
...@@ -133,7 +133,7 @@ mail_z (int argc, char **argv) ...@@ -133,7 +133,7 @@ mail_z (int argc, char **argv)
133 case D_FWD: 133 case D_FWD:
134 if (cursor + pagelines > total) 134 if (cursor + pagelines > total)
135 { 135 {
136 fprintf(stdout, "On last screenful of messages\n"); 136 fprintf (stdout, _("On last screenful of messages\n"));
137 return 0; 137 return 0;
138 } 138 }
139 139
...@@ -144,7 +144,7 @@ mail_z (int argc, char **argv) ...@@ -144,7 +144,7 @@ mail_z (int argc, char **argv)
144 144
145 if (nlines <= 0) 145 if (nlines <= 0)
146 { 146 {
147 fprintf(stdout, "On last screenful of messages\n"); 147 fprintf (stdout, _("On last screenful of messages\n"));
148 return 0; 148 return 0;
149 } 149 }
150 break; 150 break;
...@@ -157,6 +157,7 @@ mail_z (int argc, char **argv) ...@@ -157,6 +157,7 @@ mail_z (int argc, char **argv)
157 when displaying the summary and the headers, new messages 157 when displaying the summary and the headers, new messages
158 are last but we want to display a screenful with the 158 are last but we want to display a screenful with the
159 real cursor set by summary() to the new message. */ 159 real cursor set by summary() to the new message. */
160
160 /* Find the start of the last screen page. */ 161 /* Find the start of the last screen page. */
161 int lastpage = total - pagelines + 1; 162 int lastpage = total - pagelines + 1;
162 if (lastpage <= 0) 163 if (lastpage <= 0)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 # Copyright (C) 2000,2001,2002 Free Software Foundation 2 # Copyright (C) 2000,2001,2002 Free Software Foundation
3 # See file COPYING in the distribution root directory for copying conditions. 3 # See file COPYING in the distribution root directory for copying conditions.
4 4
5 INCLUDES = -I${top_srcdir}/include -I${top_srcdir}/mailbox -I${top_srcdir}/mailbox/include -I${top_srcdir}/include/mailutils/gnu 5 INCLUDES = -I${top_srcdir}/include -I$(top_srcdir)/intl -I${top_srcdir}/mailbox -I${top_srcdir}/mailbox/include -I${top_srcdir}/include/mailutils/gnu
6 AM_CFLAGS = -DSITE_VIRTUAL_PWDDIR=\"@SITE_VIRTUAL_PWDDIR@\" 6 AM_CFLAGS = -DSITE_VIRTUAL_PWDDIR=\"@SITE_VIRTUAL_PWDDIR@\"
7 7
8 SUBDIRS = include testsuite 8 SUBDIRS = include testsuite
...@@ -10,6 +10,9 @@ SUBDIRS = include testsuite ...@@ -10,6 +10,9 @@ SUBDIRS = include testsuite
10 lib_LTLIBRARIES = libmailbox.la 10 lib_LTLIBRARIES = libmailbox.la
11 bin_PROGRAMS = mailutils-config 11 bin_PROGRAMS = mailutils-config
12 12
13 localedir = $(datadir)/locale
14 DEFS = @DEFS@ -DLOCALEDIR=\"$(localedir)\"
15
13 EXTRA_DIST = mbx_mboxscan.c strtok_r.c \ 16 EXTRA_DIST = mbx_mboxscan.c strtok_r.c \
14 strndup.c strnlen.c strchrnul.c argp-ba.c argp-eexst.c \ 17 strndup.c strnlen.c strchrnul.c argp-ba.c argp-eexst.c \
15 argp-fmtstream.c argp-fs-xinl.c argp-help.c argp-parse.c argp-pv.c \ 18 argp-fmtstream.c argp-fs-xinl.c argp-help.c argp-parse.c argp-pv.c \
...@@ -60,6 +63,7 @@ mu_auth.c \ ...@@ -60,6 +63,7 @@ mu_auth.c \
60 mutil.c \ 63 mutil.c \
61 muerror.c \ 64 muerror.c \
62 muerrno.c \ 65 muerrno.c \
66 nls.c \
63 observer.c \ 67 observer.c \
64 parse822.c \ 68 parse822.c \
65 property.c \ 69 property.c \
...@@ -82,9 +86,9 @@ url_smtp.c \ ...@@ -82,9 +86,9 @@ url_smtp.c \
82 wicket.c 86 wicket.c
83 87
84 libmailbox_la_DEPENDENCIES = @MU_LTLIBOBJS@ 88 libmailbox_la_DEPENDENCIES = @MU_LTLIBOBJS@
85 libmailbox_la_LIBADD = @MU_LTLIBOBJS@ 89 libmailbox_la_LIBADD = @MU_LTLIBOBJS@ @LIBINTL@
86 libmailbox_la_LDFLAGS = -version-info 0:0:0 90 libmailbox_la_LDFLAGS = -version-info 0:0:0
87 91
88 mailutils_config_SOURCES = mailutils-config.c 92 mailutils_config_SOURCES = mailutils-config.c
89 mailutils_config_LDADD = ./libmailbox.la ../lib/libmailutils.la 93 mailutils_config_LDADD = ./libmailbox.la ../lib/libmailutils.la
90 mailutils_config_CFLAGS = -DCOMPILE_FLAGS="\"-I$(includedir)\"" -DLINK_FLAGS="\"-L$(libdir)\"" -DAUTHLIBS="\"$(MYSQLLIBS)\"" -DGUILE_LIBS="\"$(GUILE_LIBS)\"" 94 mailutils_config_CFLAGS = -DCOMPILE_FLAGS="\"-I$(includedir)\"" -I$(top_srcdir)/intl -DLINK_FLAGS="\"-L$(libdir)\"" -DAUTHLIBS="\"$(MYSQLLIBS)\"" -DGUILE_LIBS="\"$(GUILE_LIBS)\""
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Library Public License as published by 5 it under the terms of the GNU General Library Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU Library General Public License for more details. 12 GNU Library General Public License for more details.
13 13
14 You should have received a copy of the GNU Library General Public License 14 You should have received a copy of the GNU Library General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #ifdef HAVE_CONFIG_H 18 #ifdef HAVE_CONFIG_H
...@@ -31,14 +31,13 @@ ...@@ -31,14 +31,13 @@
31 static int messages_count (const char *); 31 static int messages_count (const char *);
32 32
33 const char *argp_program_version = "messages (" PACKAGE_STRING ")"; 33 const char *argp_program_version = "messages (" PACKAGE_STRING ")";
34 static char doc[] = "GNU messages -- count the number of messages in a mailbox"; 34 static char doc[] = N_("GNU messages -- count the number of messages in a mailbox");
35 static char args_doc[] = "[mailbox...]"; 35 static char args_doc[] = N_("[mailbox...]");
36 36
37 static struct argp_option options[] = { 37 static struct argp_option options[] = {
38 {NULL, 0, NULL, 0, 38 { NULL, 0, NULL, 0, N_("messages specific switches:"), 0},
39 "messages specific switches:", 0}, 39 {"quiet", 'q', 0, 0, N_("Only display number of messages")},
40 {"quiet", 'q', 0, 0, "Only display number of messages"}, 40 {"silent", 's', 0, 0, N_("Same as -q")},
41 {"silent", 's', 0, 0, "Same as -q"},
42 { 0 } 41 { 0 }
43 }; 42 };
44 43
...@@ -98,6 +97,9 @@ main (int argc, char **argv) ...@@ -98,6 +97,9 @@ main (int argc, char **argv)
98 int err = 0; 97 int err = 0;
99 struct arguments args = {0, NULL}; 98 struct arguments args = {0, NULL};
100 99
100 /* Native Language Support */
101 mu_init_nls ();
102
101 mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, NULL, &args); 103 mu_argp_parse (&argp, &argc, &argv, 0, argp_capa, NULL, &args);
102 104
103 registrar_get_list (&bookie); 105 registrar_get_list (&bookie);
...@@ -126,7 +128,7 @@ messages_count (const char *box) ...@@ -126,7 +128,7 @@ messages_count (const char *box)
126 128
127 if (mailbox_create_default (&mbox, box) != 0) 129 if (mailbox_create_default (&mbox, box) != 0)
128 { 130 {
129 fprintf (stderr, "Couldn't create mailbox %s.\n", (box) ? box : ""); 131 fprintf (stderr, _("Couldn't create mailbox %s.\n"), (box) ? box : "");
130 return -1; 132 return -1;
131 } 133 }
132 134
...@@ -135,24 +137,24 @@ messages_count (const char *box) ...@@ -135,24 +137,24 @@ messages_count (const char *box)
135 137
136 if (mailbox_open (mbox, MU_STREAM_READ) != 0) 138 if (mailbox_open (mbox, MU_STREAM_READ) != 0)
137 { 139 {
138 fprintf (stderr, "Couldn't open mailbox %s.\n", box); 140 fprintf (stderr, _("Couldn't open mailbox %s.\n"), box);
139 return -1; 141 return -1;
140 } 142 }
141 143
142 if (mailbox_messages_count (mbox, &count) != 0) 144 if (mailbox_messages_count (mbox, &count) != 0)
143 { 145 {
144 fprintf (stderr, "Couldn't count messages in %s.\n", box); 146 fprintf (stderr, _("Couldn't count messages in %s.\n"), box);
145 return -1; 147 return -1;
146 } 148 }
147 149
148 if (silent) 150 if (silent)
149 printf ("%d\n", count); 151 printf ("%d\n", count);
150 else 152 else
151 printf ("Number of messages in %s: %d\n", box, count); 153 printf (_("Number of messages in %s: %d\n"), box, count);
152 154
153 if (mailbox_close (mbox) != 0) 155 if (mailbox_close (mbox) != 0)
154 { 156 {
155 fprintf (stderr, "Couldn't close %s.\n", box); 157 fprintf (stderr, _("Couldn't close %s.\n"), box);
156 return -1; 158 return -1;
157 } 159 }
158 mailbox_destroy (&mbox); 160 mailbox_destroy (&mbox);
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "pop3d.h" 18 #include "pop3d.h"
...@@ -53,9 +53,9 @@ pop3d_apopuser (const char *user) ...@@ -53,9 +53,9 @@ pop3d_apopuser (const char *user)
53 if (rc) 53 if (rc)
54 { 54 {
55 if (rc == -1) 55 if (rc == -1)
56 syslog (LOG_INFO, "Bad permissions on APOP password db"); 56 syslog (LOG_INFO, _("Bad permissions on APOP password db"));
57 else 57 else
58 syslog (LOG_ERR, "Unable to open APOP db: %s", 58 syslog (LOG_ERR, _("Unable to open APOP db: %s"),
59 mu_errstring (rc)); 59 mu_errstring (rc));
60 return NULL; 60 return NULL;
61 } 61 }
...@@ -73,7 +73,7 @@ pop3d_apopuser (const char *user) ...@@ -73,7 +73,7 @@ pop3d_apopuser (const char *user)
73 mu_dbm_close (db); 73 mu_dbm_close (db);
74 if (rc) 74 if (rc)
75 { 75 {
76 syslog (LOG_ERR, "Can't fetch APOP data: %s", mu_errstring (rc)); 76 syslog (LOG_ERR, _("Can't fetch APOP data: %s"), mu_errstring (rc));
77 return NULL; 77 return NULL;
78 } 78 }
79 password = calloc (MU_DATUM_SIZE(data) + 1, sizeof (*password)); 79 password = calloc (MU_DATUM_SIZE(data) + 1, sizeof (*password));
...@@ -91,14 +91,14 @@ pop3d_apopuser (const char *user) ...@@ -91,14 +91,14 @@ pop3d_apopuser (const char *user)
91 91
92 if (mu_check_perm (APOP_PASSFILE, 0600)) 92 if (mu_check_perm (APOP_PASSFILE, 0600))
93 { 93 {
94 syslog (LOG_INFO, "Bad permissions on APOP password file"); 94 syslog (LOG_INFO, _("Bad permissions on APOP password file"));
95 return NULL; 95 return NULL;
96 } 96 }
97 97
98 apop_file = fopen (APOP_PASSFILE, "r"); 98 apop_file = fopen (APOP_PASSFILE, "r");
99 if (apop_file == NULL) 99 if (apop_file == NULL)
100 { 100 {
101 syslog (LOG_INFO, "Unable to open APOP password file %s", 101 syslog (LOG_INFO, _("Unable to open APOP password file %s"),
102 strerror (errno)); 102 strerror (errno));
103 return NULL; 103 return NULL;
104 } 104 }
...@@ -255,7 +255,7 @@ pop3d_apop (const char *arg) ...@@ -255,7 +255,7 @@ pop3d_apop (const char *arg)
255 { 255 {
256 url_t url = NULL; 256 url_t url = NULL;
257 mailbox_get_url (mbox, &url); 257 mailbox_get_url (mbox, &url);
258 syslog (LOG_INFO, "User '%s' logged in with mailbox '%s'", 258 syslog (LOG_INFO, _("User '%s' logged in with mailbox '%s'"),
259 username, url_to_string (url)); 259 username, url_to_string (url));
260 } 260 }
261 return OK; 261 return OK;
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "pop3d.h" 18 #include "pop3d.h"
...@@ -94,34 +94,34 @@ pop3d_abquit (int reason) ...@@ -94,34 +94,34 @@ pop3d_abquit (int reason)
94 { 94 {
95 case ERR_NO_MEM: 95 case ERR_NO_MEM:
96 pop3d_outf ("-ERR Out of memory, quitting\r\n"); 96 pop3d_outf ("-ERR Out of memory, quitting\r\n");
97 syslog (LOG_ERR, "Out of memory"); 97 syslog (LOG_ERR, _("Out of memory"));
98 break; 98 break;
99 99
100 case ERR_SIGNAL: 100 case ERR_SIGNAL:
101 pop3d_outf ("-ERR Quitting on signal\r\n"); 101 pop3d_outf ("-ERR Quitting on signal\r\n");
102 syslog (LOG_ERR, "Quitting on signal"); 102 syslog (LOG_ERR, _("Quitting on signal"));
103 break; 103 break;
104 104
105 case ERR_TIMEOUT: 105 case ERR_TIMEOUT:
106 pop3d_outf ("-ERR Session timed out\r\n"); 106 pop3d_outf ("-ERR Session timed out\r\n");
107 if (state == TRANSACTION) 107 if (state == TRANSACTION)
108 syslog (LOG_INFO, "Session timed out for user: %s", username); 108 syslog (LOG_INFO, _("Session timed out for user: %s"), username);
109 else 109 else
110 syslog (LOG_INFO, "Session timed out for no user"); 110 syslog (LOG_INFO, _("Session timed out for no user"));
111 break; 111 break;
112 112
113 case ERR_NO_OFILE: 113 case ERR_NO_OFILE:
114 syslog (LOG_INFO, "No socket to send to"); 114 syslog (LOG_INFO, _("No socket to send to"));
115 break; 115 break;
116 116
117 case ERR_MBOX_SYNC: 117 case ERR_MBOX_SYNC:
118 syslog (LOG_ERR, "Mailbox was updated by other party: %s", username); 118 syslog (LOG_ERR, _("Mailbox was updated by other party: %s"), username);
119 pop3d_outf ("-ERR [OUT-SYNC] Mailbox updated by other party or corrupt\r\n"); 119 pop3d_outf ("-ERR [OUT-SYNC] Mailbox updated by other party or corrupt\r\n");
120 break; 120 break;
121 121
122 default: 122 default:
123 pop3d_outf ("-ERR Quitting (reason unknown)\r\n"); 123 pop3d_outf ("-ERR Quitting (reason unknown)\r\n");
124 syslog (LOG_ERR, "Unknown quit"); 124 syslog (LOG_ERR, _("Unknown quit"));
125 break; 125 break;
126 } 126 }
127 127
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "pop3d.h" 18 #include "pop3d.h"
...@@ -31,7 +31,7 @@ pop3d_lock () ...@@ -31,7 +31,7 @@ pop3d_lock ()
31 locker_set_flags (lock, MU_LOCKER_PID); 31 locker_set_flags (lock, MU_LOCKER_PID);
32 if ((status = locker_lock (lock))) 32 if ((status = locker_lock (lock)))
33 { 33 {
34 syslog (LOG_NOTICE, "mailbox '%s' lock failed: %s", 34 syslog (LOG_NOTICE, _("mailbox '%s' lock failed: %s"),
35 (name) ? name : "?", mu_errstring(status)); 35 (name) ? name : "?", mu_errstring(status));
36 return ERR_MBOX_LOCK; 36 return ERR_MBOX_LOCK;
37 } 37 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "pop3d.h" 18 #include "pop3d.h"
...@@ -44,7 +44,7 @@ static error_t pop3d_parse_opt __P((int key, char *arg, ...@@ -44,7 +44,7 @@ static error_t pop3d_parse_opt __P((int key, char *arg,
44 struct argp_state *astate)); 44 struct argp_state *astate));
45 45
46 const char *argp_program_version = "pop3d (" PACKAGE_STRING ")"; 46 const char *argp_program_version = "pop3d (" PACKAGE_STRING ")";
47 static char doc[] = "GNU pop3d -- the POP3 daemon"; 47 static char doc[] = N_("GNU pop3d -- the POP3 daemon");
48 48
49 static struct argp argp = { 49 static struct argp argp = {
50 NULL, 50 NULL,
...@@ -87,6 +87,9 @@ main (int argc, char **argv) ...@@ -87,6 +87,9 @@ main (int argc, char **argv)
87 struct group *gr; 87 struct group *gr;
88 int status = OK; 88 int status = OK;
89 89
90 /* Native Language Support */
91 mu_init_nls ();
92
90 MU_AUTH_REGISTER_ALL_MODULES(); 93 MU_AUTH_REGISTER_ALL_MODULES();
91 mu_argp_parse (&argp, &argc, &argv, 0, pop3d_argp_capa, NULL, &daemon_param); 94 mu_argp_parse (&argp, &argc, &argv, 0, pop3d_argp_capa, NULL, &daemon_param);
92 95
...@@ -105,13 +108,13 @@ main (int argc, char **argv) ...@@ -105,13 +108,13 @@ main (int argc, char **argv)
105 gr = getgrnam ("mail"); 108 gr = getgrnam ("mail");
106 if (gr == NULL) 109 if (gr == NULL)
107 { 110 {
108 perror ("Error getting mail group"); 111 perror (_("Error getting mail group"));
109 exit (EXIT_FAILURE); 112 exit (EXIT_FAILURE);
110 } 113 }
111 114
112 if (setgid (gr->gr_gid) == -1) 115 if (setgid (gr->gr_gid) == -1)
113 { 116 {
114 perror ("Error setting mail group"); 117 perror (_("Error setting mail group"));
115 exit (EXIT_FAILURE); 118 exit (EXIT_FAILURE);
116 } 119 }
117 } 120 }
...@@ -174,7 +177,7 @@ pop3d_daemon_init (void) ...@@ -174,7 +177,7 @@ pop3d_daemon_init (void)
174 first three one, in, out, err */ 177 first three one, in, out, err */
175 if (daemon (0, 0) < 0) 178 if (daemon (0, 0) < 0)
176 { 179 {
177 perror ("failed to become a daemon:"); 180 perror (_("failed to become a daemon:"));
178 exit (EXIT_FAILURE); 181 exit (EXIT_FAILURE);
179 } 182 }
180 183
...@@ -211,22 +214,22 @@ pop3d_mainloop (int infile, int outfile) ...@@ -211,22 +214,22 @@ pop3d_mainloop (int infile, int outfile)
211 214
212 state = AUTHORIZATION; 215 state = AUTHORIZATION;
213 216
214 syslog (LOG_INFO, "Incoming connection opened"); 217 syslog (LOG_INFO, _("Incoming connection opened"));
215 218
216 /* log information on the connecting client */ 219 /* log information on the connecting client */
217 if (debug_mode) 220 if (debug_mode)
218 { 221 {
219 syslog (LOG_INFO, "Started in debugging mode"); 222 syslog (LOG_INFO, _("Started in debugging mode"));
220 } 223 }
221 else 224 else
222 { 225 {
223 struct sockaddr_in cs; 226 struct sockaddr_in cs;
224 int len = sizeof cs; 227 int len = sizeof cs;
225 if (getpeername (infile, (struct sockaddr*)&cs, &len) < 0) 228 if (getpeername (infile, (struct sockaddr*)&cs, &len) < 0)
226 syslog (LOG_ERR, "can't obtain IP address of client: %s", 229 syslog (LOG_ERR, _("can't obtain IP address of client: %s"),
227 strerror (errno)); 230 strerror (errno));
228 else 231 else
229 syslog (LOG_INFO, "connect from %s", inet_ntoa(cs.sin_addr)); 232 syslog (LOG_INFO, _("connect from %s"), inet_ntoa(cs.sin_addr));
230 } 233 }
231 234
232 /* Prepare the shared secret for APOP. */ 235 /* Prepare the shared secret for APOP. */
...@@ -397,7 +400,7 @@ pop3d_daemon (unsigned int maxchildren, unsigned int port) ...@@ -397,7 +400,7 @@ pop3d_daemon (unsigned int maxchildren, unsigned int port)
397 { 400 {
398 if (children > maxchildren) 401 if (children > maxchildren)
399 { 402 {
400 syslog (LOG_ERR, "too many children (%lu)", 403 syslog (LOG_ERR, _("too many children (%lu)"),
401 (unsigned long) children); 404 (unsigned long) children);
402 pause (); 405 pause ();
403 continue; 406 continue;
...@@ -432,6 +435,3 @@ pop3d_daemon (unsigned int maxchildren, unsigned int port) ...@@ -432,6 +435,3 @@ pop3d_daemon (unsigned int maxchildren, unsigned int port)
432 } 435 }
433 } 436 }
434 437
435
436
437
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #ifndef _POP3D_H 18 #ifndef _POP3D_H
...@@ -122,6 +122,7 @@ ...@@ -122,6 +122,7 @@
122 #include <mailutils/registrar.h> 122 #include <mailutils/registrar.h>
123 #include <mailutils/url.h> 123 #include <mailutils/url.h>
124 #include <mailutils/mu_auth.h> 124 #include <mailutils/mu_auth.h>
125 #include <mailutils/nls.h>
125 126
126 /* For Berkley DB2 APOP password file */ 127 /* For Berkley DB2 APOP password file */
127 #ifdef HAVE_DB_H 128 #ifdef HAVE_DB_H
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "pop3d.h" 18 #include "pop3d.h"
...@@ -52,7 +52,7 @@ int (*ftab[]) __P((struct action_data *)) = { ...@@ -52,7 +52,7 @@ int (*ftab[]) __P((struct action_data *)) = {
52 }; 52 };
53 53
54 const char *argp_program_version = "popauth (" PACKAGE_STRING ")"; 54 const char *argp_program_version = "popauth (" PACKAGE_STRING ")";
55 static char doc[] = "GNU popauth -- manage pop3 authentcation database"; 55 static char doc[] = N_("GNU popauth -- manage pop3 authentcation database");
56 static error_t popauth_parse_opt __P((int key, char *arg, 56 static error_t popauth_parse_opt __P((int key, char *arg,
57 struct argp_state *astate)); 57 struct argp_state *astate));
58 58
...@@ -63,22 +63,22 @@ void (*argp_program_version_hook) __P((FILE *stream, ...@@ -63,22 +63,22 @@ void (*argp_program_version_hook) __P((FILE *stream,
63 63
64 static struct argp_option options[] = 64 static struct argp_option options[] =
65 { 65 {
66 { NULL, 0, NULL, 0, "Actions are:", 1 }, 66 { NULL, 0, NULL, 0, N_("Actions are:"), 1 },
67 { "add", 'a', 0, 0, "Add user", 1 }, 67 { "add", 'a', 0, 0, N_("Add user"), 1 },
68 { "modify", 'm', 0, 0, "Modify user's record (change password)", 1 }, 68 { "modify", 'm', 0, 0, N_("Modify user's record (change password)"), 1 },
69 { "delete", 'd', 0, 0, "Delete user's record", 1 }, 69 { "delete", 'd', 0, 0, N_("Delete user's record"), 1 },
70 { "list", 'l', 0, 0, "List the contents of DBM file", 1 }, 70 { "list", 'l', 0, 0, N_("List the contents of DBM file"), 1 },
71 71
72 { NULL, 0, NULL, 0, 72 { NULL, 0, NULL, 0,
73 "Default action is:\n" 73 N_("Default action is:\n"
74 " For the file owner: --list\n" 74 " For the file owner: --list\n"
75 " For a user: --modify --username <username>\n", 2 }, 75 " For a user: --modify --username <username>\n"), 2 },
76 76
77 { NULL, 0, NULL, 0, "Options are:", 3 }, 77 { NULL, 0, NULL, 0, N_("Options are:"), 3 },
78 { "file", 'f', "FILE", 0, "Read input from FILE (default stdin)", 3 }, 78 { "file", 'f', "FILE", 0, N_("Read input from FILE (default stdin)"), 3 },
79 { "output", 'o', "FILE", 0, "Direct output to file", 3 }, 79 { "output", 'o', "FILE", 0, N_("Direct output to file"), 3 },
80 { "password", 'p', "STRING", 0, "Specify user's password", 3 }, 80 { "password", 'p', "STRING", 0, N_("Specify user's password"), 3 },
81 { "user", 'u', "USERNAME", 0, "Specify user name", 3 }, 81 { "user", 'u', "USERNAME", 0, N_("Specify user name"), 3 },
82 { NULL, } 82 { NULL, }
83 }; 83 };
84 84
...@@ -164,7 +164,10 @@ int ...@@ -164,7 +164,10 @@ int
164 main(int argc, char **argv) 164 main(int argc, char **argv)
165 { 165 {
166 struct action_data adata; 166 struct action_data adata;
167 167
168 /* Native Language Support */
169 mu_init_nls ();
170
168 mu_argp_parse (&argp, &argc, &argv, 0, 171 mu_argp_parse (&argp, &argc, &argv, 0,
169 popauth_argp_capa, NULL, &adata); 172 popauth_argp_capa, NULL, &adata);
170 173
...@@ -176,7 +179,7 @@ check_action (int action) ...@@ -176,7 +179,7 @@ check_action (int action)
176 { 179 {
177 if (action != -1) 180 if (action != -1)
178 { 181 {
179 mu_error ("You may not specify more than one `-aldp' option"); 182 mu_error (_("You may not specify more than one `-aldp' option"));
180 exit (1); 183 exit (1);
181 } 184 }
182 } 185 }
...@@ -198,7 +201,7 @@ check_user_perm (int action, struct action_data *ap) ...@@ -198,7 +201,7 @@ check_user_perm (int action, struct action_data *ap)
198 DBM_FILE db; 201 DBM_FILE db;
199 if (mu_dbm_open (ap->input_name, &db, MU_STREAM_CREAT, 0600)) 202 if (mu_dbm_open (ap->input_name, &db, MU_STREAM_CREAT, 0600))
200 { 203 {
201 mu_error ("can't create %s: %s", 204 mu_error (_("can't create %s: %s"),
202 ap->input_name, strerror (errno)); 205 ap->input_name, strerror (errno));
203 exit (1); 206 exit (1);
204 } 207 }
...@@ -207,7 +210,7 @@ check_user_perm (int action, struct action_data *ap) ...@@ -207,7 +210,7 @@ check_user_perm (int action, struct action_data *ap)
207 } 210 }
208 else 211 else
209 { 212 {
210 mu_error ("can't stat %s: %s", ap->input_name, strerror (errno)); 213 mu_error (_("can't stat %s: %s"), ap->input_name, strerror (errno));
211 exit (1); 214 exit (1);
212 } 215 }
213 } 216 }
...@@ -218,13 +221,13 @@ check_user_perm (int action, struct action_data *ap) ...@@ -218,13 +221,13 @@ check_user_perm (int action, struct action_data *ap)
218 221
219 if (ap->username) 222 if (ap->username)
220 { 223 {
221 mu_error ("Only the file owner can use --username"); 224 mu_error (_("Only the file owner can use --username"));
222 exit (1); 225 exit (1);
223 } 226 }
224 227
225 if (action != ACT_CHPASS) 228 if (action != ACT_CHPASS)
226 { 229 {
227 mu_error ("Operation not allowed"); 230 mu_error (_("Operation not allowed"));
228 exit (1); 231 exit (1);
229 } 232 }
230 pw = getpwuid (uid); 233 pw = getpwuid (uid);
...@@ -245,7 +248,7 @@ action_list (struct action_data *ap) ...@@ -245,7 +248,7 @@ action_list (struct action_data *ap)
245 check_user_perm (ACT_LIST, ap); 248 check_user_perm (ACT_LIST, ap);
246 if (mu_dbm_open (ap->input_name, &db, MU_STREAM_READ, 0600)) 249 if (mu_dbm_open (ap->input_name, &db, MU_STREAM_READ, 0600))
247 { 250 {
248 mu_error("can't open %s: %s", ap->input_name, strerror (errno)); 251 mu_error (_("can't open %s: %s"), ap->input_name, strerror (errno));
249 return 1; 252 return 1;
250 } 253 }
251 254
...@@ -254,7 +257,7 @@ action_list (struct action_data *ap) ...@@ -254,7 +257,7 @@ action_list (struct action_data *ap)
254 fp = fopen (ap->output_name, "w"); 257 fp = fopen (ap->output_name, "w");
255 if (!fp) 258 if (!fp)
256 { 259 {
257 mu_error("can't create %s: %s", ap->output_name, strerror (errno)); 260 mu_error (_("can't create %s: %s"), ap->output_name, strerror (errno));
258 return 1; 261 return 1;
259 } 262 }
260 } 263 }
...@@ -269,7 +272,7 @@ action_list (struct action_data *ap) ...@@ -269,7 +272,7 @@ action_list (struct action_data *ap)
269 MU_DATUM_SIZE (key) = strlen (ap->username); 272 MU_DATUM_SIZE (key) = strlen (ap->username);
270 if (mu_dbm_fetch (db, key, &contents)) 273 if (mu_dbm_fetch (db, key, &contents))
271 { 274 {
272 mu_error ("no such user: %s", ap->username); 275 mu_error (_("no such user: %s"), ap->username);
273 } 276 }
274 else 277 else
275 fprintf (fp, "%.*s: %.*s\n", 278 fprintf (fp, "%.*s: %.*s\n",
...@@ -316,7 +319,7 @@ action_create (struct action_data *ap) ...@@ -316,7 +319,7 @@ action_create (struct action_data *ap)
316 fp = fopen (ap->input_name, "r"); 319 fp = fopen (ap->input_name, "r");
317 if (!fp) 320 if (!fp)
318 { 321 {
319 mu_error("can't open %s: %s", ap->input_name, strerror (errno)); 322 mu_error (_("can't open %s: %s"), ap->input_name, strerror (errno));
320 return 1; 323 return 1;
321 } 324 }
322 } 325 }
...@@ -330,7 +333,7 @@ action_create (struct action_data *ap) ...@@ -330,7 +333,7 @@ action_create (struct action_data *ap)
330 ap->output_name = APOP_PASSFILE; 333 ap->output_name = APOP_PASSFILE;
331 if (mu_dbm_open (ap->output_name, &db, MU_STREAM_CREAT, 0600)) 334 if (mu_dbm_open (ap->output_name, &db, MU_STREAM_CREAT, 0600))
332 { 335 {
333 mu_error("can't create %s: %s", ap->output_name, strerror (errno)); 336 mu_error (_("can't create %s: %s"), ap->output_name, strerror (errno));
334 return 1; 337 return 1;
335 } 338 }
336 339
...@@ -360,7 +363,7 @@ action_create (struct action_data *ap) ...@@ -360,7 +363,7 @@ action_create (struct action_data *ap)
360 363
361 if (argc != 3 || argv[1][0] != ':' || argv[1][1] != 0) 364 if (argc != 3 || argv[1][0] != ':' || argv[1][1] != 0)
362 { 365 {
363 mu_error ("%s:%d: malformed line", ap->input_name, line); 366 mu_error (_("%s:%d: malformed line"), ap->input_name, line);
364 argcv_free (argc, argv); 367 argcv_free (argc, argv);
365 continue; 368 continue;
366 } 369 }
...@@ -373,7 +376,7 @@ action_create (struct action_data *ap) ...@@ -373,7 +376,7 @@ action_create (struct action_data *ap)
373 MU_DATUM_SIZE (contents) = strlen (argv[2]); 376 MU_DATUM_SIZE (contents) = strlen (argv[2]);
374 377
375 if (mu_dbm_insert (db, key, contents, 1)) 378 if (mu_dbm_insert (db, key, contents, 1))
376 mu_error ("%s:%d: can't store datum", ap->input_name, line); 379 mu_error (_("%s:%d: can't store datum"), ap->input_name, line);
377 380
378 argcv_free (argc, argv); 381 argcv_free (argc, argv);
379 } 382 }
...@@ -390,7 +393,7 @@ open_io (int action, struct action_data *ap, DBM_FILE *db, int *not_owner) ...@@ -390,7 +393,7 @@ open_io (int action, struct action_data *ap, DBM_FILE *db, int *not_owner)
390 *not_owner = rc; 393 *not_owner = rc;
391 if (mu_dbm_open (ap->input_name, db, MU_STREAM_RDWR, 0600)) 394 if (mu_dbm_open (ap->input_name, db, MU_STREAM_RDWR, 0600))
392 { 395 {
393 mu_error("can't open %s: %s", ap->input_name, strerror (errno)); 396 mu_error (_("can't open %s: %s"), ap->input_name, strerror (errno));
394 return 1; 397 return 1;
395 } 398 }
396 return 0; 399 return 0;
...@@ -406,14 +409,14 @@ fill_pass (struct action_data *ap) ...@@ -406,14 +409,14 @@ fill_pass (struct action_data *ap)
406 while (1) { 409 while (1) {
407 if (ap->passwd) 410 if (ap->passwd)
408 free (ap->passwd); 411 free (ap->passwd);
409 p = getpass ("Password:"); 412 p = getpass (_("Password:"));
410 if (!p) 413 if (!p)
411 exit (1); 414 exit (1);
412 ap->passwd = strdup (p); 415 ap->passwd = strdup (p);
413 p = getpass ("Confirm :"); 416 p = getpass (_("Confirm :"));
414 if (strcmp (ap->passwd, p) == 0) 417 if (strcmp (ap->passwd, p) == 0)
415 break; 418 break;
416 mu_error ("Passwords differ. Please retry."); 419 mu_error (_("Passwords differ. Please retry."));
417 } 420 }
418 } 421 }
419 } 422 }
...@@ -428,7 +431,7 @@ action_add (struct action_data *ap) ...@@ -428,7 +431,7 @@ action_add (struct action_data *ap)
428 431
429 if (!ap->username) 432 if (!ap->username)
430 { 433 {
431 mu_error ("missing username to add"); 434 mu_error (_("missing username to add"));
432 return 1; 435 return 1;
433 } 436 }
434 437
...@@ -446,7 +449,7 @@ action_add (struct action_data *ap) ...@@ -446,7 +449,7 @@ action_add (struct action_data *ap)
446 449
447 rc = mu_dbm_insert (db, key, contents, 1); 450 rc = mu_dbm_insert (db, key, contents, 1);
448 if (rc) 451 if (rc)
449 mu_error ("can't store datum"); 452 mu_error (_("can't store datum"));
450 453
451 mu_dbm_close (db); 454 mu_dbm_close (db);
452 return rc; 455 return rc;
...@@ -461,7 +464,7 @@ action_delete (struct action_data *ap) ...@@ -461,7 +464,7 @@ action_delete (struct action_data *ap)
461 464
462 if (!ap->username) 465 if (!ap->username)
463 { 466 {
464 mu_error ("missing username to delete"); 467 mu_error (_("missing username to delete"));
465 return 1; 468 return 1;
466 } 469 }
467 470
...@@ -473,7 +476,7 @@ action_delete (struct action_data *ap) ...@@ -473,7 +476,7 @@ action_delete (struct action_data *ap)
473 476
474 rc = mu_dbm_delete (db, key); 477 rc = mu_dbm_delete (db, key);
475 if (rc) 478 if (rc)
476 mu_error ("can't remove record for %s", ap->username); 479 mu_error (_("can't remove record for %s"), ap->username);
477 480
478 mu_dbm_close (db); 481 mu_dbm_close (db);
479 return rc; 482 return rc;
...@@ -493,7 +496,7 @@ action_chpass (struct action_data *ap) ...@@ -493,7 +496,7 @@ action_chpass (struct action_data *ap)
493 496
494 if (!ap->username) 497 if (!ap->username)
495 { 498 {
496 mu_error ("missing username"); 499 mu_error (_("missing username"));
497 return 1; 500 return 1;
498 } 501 }
499 502
...@@ -504,7 +507,7 @@ action_chpass (struct action_data *ap) ...@@ -504,7 +507,7 @@ action_chpass (struct action_data *ap)
504 MU_DATUM_SIZE (key) = strlen (ap->username); 507 MU_DATUM_SIZE (key) = strlen (ap->username);
505 if (mu_dbm_fetch (db, key, &contents)) 508 if (mu_dbm_fetch (db, key, &contents))
506 { 509 {
507 mu_error ("no such user: %s", ap->username); 510 mu_error (_("no such user: %s"), ap->username);
508 return 1; 511 return 1;
509 } 512 }
510 513
...@@ -515,12 +518,12 @@ action_chpass (struct action_data *ap) ...@@ -515,12 +518,12 @@ action_chpass (struct action_data *ap)
515 oldpass = xmalloc (MU_DATUM_SIZE (contents) + 1); 518 oldpass = xmalloc (MU_DATUM_SIZE (contents) + 1);
516 memcpy (oldpass, MU_DATUM_PTR (contents), MU_DATUM_SIZE (contents)); 519 memcpy (oldpass, MU_DATUM_PTR (contents), MU_DATUM_SIZE (contents));
517 oldpass[MU_DATUM_SIZE (contents)] = 0; 520 oldpass[MU_DATUM_SIZE (contents)] = 0;
518 p = getpass ("Old Password:"); 521 p = getpass (_("Old Password:"));
519 if (!p) 522 if (!p)
520 return 1; 523 return 1;
521 if (strcmp (oldpass, p)) 524 if (strcmp (oldpass, p))
522 { 525 {
523 mu_error ("Sorry"); 526 mu_error (_("Sorry"));
524 return 1; 527 return 1;
525 } 528 }
526 } 529 }
...@@ -531,7 +534,7 @@ action_chpass (struct action_data *ap) ...@@ -531,7 +534,7 @@ action_chpass (struct action_data *ap)
531 MU_DATUM_SIZE (contents) = strlen (ap->passwd); 534 MU_DATUM_SIZE (contents) = strlen (ap->passwd);
532 rc = mu_dbm_insert (db, key, contents, 1); 535 rc = mu_dbm_insert (db, key, contents, 1);
533 if (rc) 536 if (rc)
534 mu_error ("can't replace datum"); 537 mu_error (_("can't replace datum"));
535 538
536 mu_dbm_close (db); 539 mu_dbm_close (db);
537 return rc; 540 return rc;
...@@ -550,7 +553,7 @@ popauth_version (FILE *stream, struct argp_state *state) ...@@ -550,7 +553,7 @@ popauth_version (FILE *stream, struct argp_state *state)
550 # define FORMAT "Old DBM" 553 # define FORMAT "Old DBM"
551 #endif 554 #endif
552 printf ("%s\n", argp_program_version); 555 printf ("%s\n", argp_program_version);
553 printf ("Database format: %s\n", FORMAT); 556 printf (_("Database format: %s\n"), FORMAT);
554 printf ("Database location: %s\n", APOP_PASSFILE); 557 printf (_("Database location: %s\n"), APOP_PASSFILE);
555 exit (EXIT_SUCCESS); 558 exit (EXIT_SUCCESS);
556 } 559 }
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "pop3d.h" 18 #include "pop3d.h"
...@@ -38,10 +38,10 @@ pop3d_quit (const char *arg) ...@@ -38,10 +38,10 @@ pop3d_quit (const char *arg)
38 if (mailbox_close (mbox) != 0) 38 if (mailbox_close (mbox) != 0)
39 err = ERR_FILE; 39 err = ERR_FILE;
40 mailbox_destroy (&mbox); 40 mailbox_destroy (&mbox);
41 syslog (LOG_INFO, "Session ended for user: %s", username); 41 syslog (LOG_INFO, _("Session ended for user: %s"), username);
42 } 42 }
43 else 43 else
44 syslog (LOG_INFO, "Session ended for no user"); 44 syslog (LOG_INFO, _("Session ended for no user"));
45 45
46 state = UPDATE; 46 state = UPDATE;
47 free (username); 47 free (username);
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "pop3d.h" 18 #include "pop3d.h"
...@@ -63,7 +63,7 @@ pop3d_user (const char *arg) ...@@ -63,7 +63,7 @@ pop3d_user (const char *arg)
63 tmp = pop3d_apopuser (arg); 63 tmp = pop3d_apopuser (arg);
64 if (tmp != NULL) 64 if (tmp != NULL)
65 { 65 {
66 syslog (LOG_INFO, "APOP user %s tried to log in with USER", arg); 66 syslog (LOG_INFO, _("APOP user %s tried to log in with USER"), arg);
67 free (tmp); 67 free (tmp);
68 return ERR_BAD_LOGIN; 68 return ERR_BAD_LOGIN;
69 } 69 }
...@@ -73,7 +73,7 @@ pop3d_user (const char *arg) ...@@ -73,7 +73,7 @@ pop3d_user (const char *arg)
73 73
74 if (auth_data == NULL) 74 if (auth_data == NULL)
75 { 75 {
76 syslog (LOG_INFO, "User '%s': nonexistent", arg); 76 syslog (LOG_INFO, _("User '%s': nonexistent"), arg);
77 return ERR_BAD_LOGIN; 77 return ERR_BAD_LOGIN;
78 } 78 }
79 79
...@@ -82,14 +82,14 @@ pop3d_user (const char *arg) ...@@ -82,14 +82,14 @@ pop3d_user (const char *arg)
82 82
83 if (rc) 83 if (rc)
84 { 84 {
85 syslog (LOG_INFO, "User '%s': authentication failed", arg); 85 syslog (LOG_INFO, _("User '%s': authentication failed"), arg);
86 mu_auth_data_free (auth_data); 86 mu_auth_data_free (auth_data);
87 return ERR_BAD_LOGIN; 87 return ERR_BAD_LOGIN;
88 } 88 }
89 } 89 }
90 else if (strcasecmp (cmd, "QUIT") == 0) 90 else if (strcasecmp (cmd, "QUIT") == 0)
91 { 91 {
92 syslog (LOG_INFO, "Possible probe of account '%s'", arg); 92 syslog (LOG_INFO, _("Possible probe of account '%s'"), arg);
93 free (cmd); 93 free (cmd);
94 return pop3d_quit (pass); 94 return pop3d_quit (pass);
95 } 95 }
...@@ -150,12 +150,9 @@ pop3d_user (const char *arg) ...@@ -150,12 +150,9 @@ pop3d_user (const char *arg)
150 size_t total = 0; 150 size_t total = 0;
151 mailbox_get_url (mbox, &url); 151 mailbox_get_url (mbox, &url);
152 mailbox_messages_count (mbox, &total); 152 mailbox_messages_count (mbox, &total);
153 syslog (LOG_INFO, "User '%s' logged in with mailbox '%s' (%d msgs)", 153 syslog (LOG_INFO, _("User '%s' logged in with mailbox '%s' (%d msgs)"),
154 username, url_to_string (url), total); 154 username, url_to_string (url), total);
155 } 155 }
156 return OK; 156 return OK;
157
158 } 157 }
159 158
160
161
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #include "readmsg.h" 18 #include "readmsg.h"
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 GNU Mailutils is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2, or (at your option) 6 the Free Software Foundation; either version 2, or (at your option)
7 any later version. 7 any later version.
8 8
9 This program is distributed in the hope that it will be useful, 9 GNU Mailutils is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of 10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details. 12 GNU General Public License for more details.
13 13
14 You should have received a copy of the GNU General Public License 14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software 15 along with GNU Mailutils; if not, write to the Free Software
16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ 16 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17 17
18 #ifdef HAVE_CONFIG_H 18 #ifdef HAVE_CONFIG_H
...@@ -29,20 +29,21 @@ static void print_body __P ((message_t)); ...@@ -29,20 +29,21 @@ static void print_body __P ((message_t));
29 static int string_starts_with __P ((const char * s1, const char *s2)); 29 static int string_starts_with __P ((const char * s1, const char *s2));
30 30
31 const char *argp_program_version = "readmsg (" PACKAGE_STRING ")"; 31 const char *argp_program_version = "readmsg (" PACKAGE_STRING ")";
32 static char doc[] = "GNU readmsg -- print messages"; 32 static char doc[] = N_("GNU readmsg -- print messages");
33 static error_t readmsg_parse_opt __P((int key, char *arg, 33 static error_t readmsg_parse_opt __P((int key, char *arg,
34 struct argp_state *astate)); 34 struct argp_state *astate));
35 35
36 static struct argp_option options[] = 36 static struct argp_option options[] =
37 { 37 {
38 { "debug", 'd', 0, 0, "Display debugging information", 1 }, 38 { "debug", 'd', 0, 0, N_("Display debugging information"), 1 },
39 { "header", 'h', 0, 0, "Display entire header", 1 }, 39 { "header", 'h', 0, 0, N_("Display entire header"), 1 },
40 { "weedlist", 'w', "LIST", 0, "List of header names separated by whitespace or commas", 1 }, 40 { "weedlist", 'w', "LIST", 0,
41 { "folder", 'f', "FOLDER", 0, "Folder to use", 1 }, 41 N_("List of header names separated by whitespace or commas"), 1 },
42 { "no-header", 'n', 0, 0, "Exclude all headers", 1 }, 42 { "folder", 'f', "FOLDER", 0, N_("Folder to use"), 1 },
43 { "form-feeds", 'p', 0, 0, "Output formfeeds between messages", 1 }, 43 { "no-header", 'n', 0, 0, N_("Exclude all headers"), 1 },
44 { "form-feeds", 'p', 0, 0, N_("Output formfeeds between messages"), 1 },
44 { "show-all-match", 'a', NULL, 0, 45 { "show-all-match", 'a', NULL, 0,
45 "Print all messages matching pattern, not just the first", 1 }, 46 N_("Print all messages matching pattern, not just the first"), 1 },
46 {0, 0, 0, 0} 47 {0, 0, 0, 0}
47 }; 48 };
48 49
...@@ -224,6 +225,9 @@ main (int argc, char **argv) ...@@ -224,6 +225,9 @@ main (int argc, char **argv)
224 int index; 225 int index;
225 mailbox_t mbox = NULL; 226 mailbox_t mbox = NULL;
226 227
228 /* Native Language Support */
229 mu_init_nls ();
230
227 mu_argp_parse (&argp, &argc, &argv, 0, readmsg_argp_capa, &index, NULL); 231 mu_argp_parse (&argp, &argc, &argv, 0, readmsg_argp_capa, &index, NULL);
228 232
229 /* Registration. */ 233 /* Registration. */
...@@ -239,7 +243,7 @@ main (int argc, char **argv) ...@@ -239,7 +243,7 @@ main (int argc, char **argv)
239 status = mailbox_create_default (&mbox, mailbox_name); 243 status = mailbox_create_default (&mbox, mailbox_name);
240 if (status != 0) 244 if (status != 0)
241 { 245 {
242 fprintf (stderr, "could not create - %s\n", mu_errstring(status)); 246 fprintf (stderr, _("could not create - %s\n"), mu_errstring(status));
243 exit (2); 247 exit (2);
244 } 248 }
245 249
...@@ -257,7 +261,7 @@ main (int argc, char **argv) ...@@ -257,7 +261,7 @@ main (int argc, char **argv)
257 url_t url = NULL; 261 url_t url = NULL;
258 262
259 mailbox_get_url (mbox, &url); 263 mailbox_get_url (mbox, &url);
260 fprintf (stderr, "can't open mailbox %s: %s\n", 264 fprintf (stderr, _("can't open mailbox %s: %s\n"),
261 url_to_string (url), 265 url_to_string (url),
262 mu_errstring(status)); 266 mu_errstring(status));
263 exit (2); 267 exit (2);
......
1 /* GNU mailutils - a suite of utilities for electronic mail 1 /* GNU Mailutils -- a suite of utilities for electronic mail
2 Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc. 2 Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 3
4 This program is free software; you can redistribute it and/or modify 4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
...@@ -39,6 +39,7 @@ ...@@ -39,6 +39,7 @@
39 #include <mailutils/registrar.h> 39 #include <mailutils/registrar.h>
40 #include <mailutils/stream.h> 40 #include <mailutils/stream.h>
41 #include <mailutils/url.h> 41 #include <mailutils/url.h>
42 #include <mailutils/nls.h>
42 43
43 int msglist __P ((mailbox_t mbox, int show_all, int argc, char **argv, int **set, int *n)); 44 int msglist __P ((mailbox_t mbox, int show_all, int argc, char **argv, int **set, int *n));
44 45
......