diff -ur bash-3.2.orig/builtins/break.def bash-3.2.new/builtins/break.def --- bash-3.2.orig/builtins/break.def 2003-12-19 23:56:38.000000000 +0100 +++ bash-3.2.new/builtins/break.def 2006-12-11 14:28:09.000000000 +0100 @@ -70,7 +70,7 @@ if (newbreak <= 0) { - sh_erange (list->word->word, "loop count"); + sh_erange (list->word->word, _("loop count")); breaking = loop_level; return (EXECUTION_FAILURE); } @@ -105,7 +105,7 @@ if (newcont <= 0) { - sh_erange (list->word->word, "loop count"); + sh_erange (list->word->word, _("loop count")); breaking = loop_level; return (EXECUTION_FAILURE); } diff -ur bash-3.2.orig/builtins/common.c bash-3.2.new/builtins/common.c --- bash-3.2.orig/builtins/common.c 2006-07-27 15:39:51.000000000 +0200 +++ bash-3.2.new/builtins/common.c 2006-12-11 14:28:09.000000000 +0100 @@ -100,7 +100,7 @@ fprintf (stderr, "%s: ", name); if (interactive_shell == 0) - fprintf (stderr, "line %d: ", executing_line_number ()); + fprintf (stderr, _("line %d: "), executing_line_number ()); if (this_command_name && *this_command_name) fprintf (stderr, "%s: ", this_command_name); @@ -117,7 +117,7 @@ builtin_usage () { if (this_command_name && *this_command_name) - fprintf (stderr, "%s: usage: ", this_command_name); + fprintf (stderr, _("%s: usage: "), this_command_name); fprintf (stderr, "%s\n", current_builtin->short_doc); fflush (stderr); } diff -ur bash-3.2.orig/builtins/evalfile.c bash-3.2.new/builtins/evalfile.c --- bash-3.2.orig/builtins/evalfile.c 2006-07-28 03:41:43.000000000 +0200 +++ bash-3.2.new/builtins/evalfile.c 2006-12-11 14:28:09.000000000 +0100 @@ -171,7 +171,7 @@ check_binary_file (string, (result > 80) ? 80 : result)) { free (string); - (*errfunc) ("%s: cannot execute binary file", filename); + (*errfunc) (_("%s: cannot execute binary file"), filename); return ((flags & FEVAL_BUILTIN) ? EX_BINARY_FILE : -1); } diff -ur bash-3.2.orig/builtins/exit.def bash-3.2.new/builtins/exit.def --- bash-3.2.orig/builtins/exit.def 2005-02-11 17:46:55.000000000 +0100 +++ bash-3.2.new/builtins/exit.def 2006-12-11 14:28:09.000000000 +0100 @@ -60,7 +60,7 @@ { if (interactive) { - fprintf (stderr, login_shell ? "logout\n" : "exit\n"); + fprintf (stderr, login_shell ? _("logout\n") : _("exit\n")); fflush (stderr); } diff -ur bash-3.2.orig/builtins/fg_bg.def bash-3.2.new/builtins/fg_bg.def --- bash-3.2.orig/builtins/fg_bg.def 2005-08-24 23:18:52.000000000 +0200 +++ bash-3.2.new/builtins/fg_bg.def 2006-12-11 14:28:09.000000000 +0100 @@ -137,7 +137,7 @@ if (INVALID_JOB (job)) { if (job != DUP_JOB) - sh_badjob (list ? list->word->word : "current"); + sh_badjob (list ? list->word->word : _("current")); goto failure; } diff -ur bash-3.2.orig/builtins/hash.def bash-3.2.new/builtins/hash.def --- bash-3.2.orig/builtins/hash.def 2006-02-21 20:59:45.000000000 +0100 +++ bash-3.2.new/builtins/hash.def 2006-12-11 14:28:09.000000000 +0100 @@ -233,7 +233,7 @@ return (0); if (fmt == 0) - printf ("hits\tcommand\n"); + printf (_("hits\tcommand\n")); hash_walk (hashed_filenames, fmt ? print_portable_hash_info : print_hash_info); return (1); } diff -ur bash-3.2.orig/builtins/jobs.def bash-3.2.new/builtins/jobs.def --- bash-3.2.orig/builtins/jobs.def 2005-02-11 17:47:09.000000000 +0100 +++ bash-3.2.new/builtins/jobs.def 2006-12-11 14:28:09.000000000 +0100 @@ -261,7 +261,7 @@ if (job == NO_JOB || jobs == 0 || INVALID_JOB (job)) { - sh_badjob (list ? list->word->word : "current"); + sh_badjob (list ? list->word->word : _("current")); retval = EXECUTION_FAILURE; } else if (nohup_only) diff -ur bash-3.2.orig/builtins/type.def bash-3.2.new/builtins/type.def --- bash-3.2.orig/builtins/type.def 2005-08-24 14:38:34.000000000 +0200 +++ bash-3.2.new/builtins/type.def 2006-12-11 14:28:09.000000000 +0100 @@ -227,7 +227,7 @@ if (((dflags & CDESC_FORCE_PATH) == 0) && expand_aliases && (alias = find_alias (command))) { if (dflags & CDESC_TYPE) - puts ("alias"); + puts (_("alias")); else if (dflags & CDESC_SHORTDESC) printf (_("%s is aliased to `%s'\n"), command, alias->value); else if (dflags & CDESC_REUSABLE) @@ -248,7 +248,7 @@ if (((dflags & CDESC_FORCE_PATH) == 0) && (i = find_reserved_word (command)) >= 0) { if (dflags & CDESC_TYPE) - puts ("keyword"); + puts (_("keyword")); else if (dflags & CDESC_SHORTDESC) printf (_("%s is a shell keyword\n"), command); else if (dflags & CDESC_REUSABLE) @@ -264,7 +264,7 @@ if (((dflags & (CDESC_FORCE_PATH|CDESC_NOFUNCS)) == 0) && (func = find_function (command))) { if (dflags & CDESC_TYPE) - puts ("function"); + puts (_("function")); else if (dflags & CDESC_SHORTDESC) { #define PRETTY_PRINT_FUNC 1 @@ -293,7 +293,7 @@ if (((dflags & CDESC_FORCE_PATH) == 0) && find_shell_builtin (command)) { if (dflags & CDESC_TYPE) - puts ("builtin"); + puts (_("builtin")); else if (dflags & CDESC_SHORTDESC) printf (_("%s is a shell builtin\n"), command); else if (dflags & CDESC_REUSABLE) @@ -314,7 +314,7 @@ if (f & FS_EXECABLE) { if (dflags & CDESC_TYPE) - puts ("file"); + puts (_("file")); else if (dflags & CDESC_SHORTDESC) printf (_("%s is %s\n"), command, command); else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY)) @@ -334,7 +334,7 @@ if (full_path = phash_search (command)) { if (dflags & CDESC_TYPE) - puts ("file"); + puts (_("file")); else if (dflags & CDESC_SHORTDESC) printf (_("%s is hashed (%s)\n"), command, full_path); else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY)) @@ -388,9 +388,9 @@ found = 1; if (dflags & CDESC_TYPE) - puts ("file"); + puts (_("file")); else if (dflags & CDESC_SHORTDESC) - printf ("%s is %s\n", command, full_path); + printf (_("%s is %s\n"), command, full_path); else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY)) printf ("%s\n", full_path); diff -ur bash-3.2.orig/builtins/ulimit.def bash-3.2.new/builtins/ulimit.def --- bash-3.2.orig/builtins/ulimit.def 2006-03-23 21:51:51.000000000 +0100 +++ bash-3.2.new/builtins/ulimit.def 2006-12-11 14:28:09.000000000 +0100 @@ -430,7 +430,7 @@ if ((real_limit / block_factor) != limit) { - sh_erange (cmdarg, "limit"); + sh_erange (cmdarg, _("limit")); return (EXECUTION_FAILURE); } } diff -ur bash-3.2.orig/error.c bash-3.2.new/error.c --- bash-3.2.orig/error.c 2006-07-28 03:14:12.000000000 +0200 +++ bash-3.2.new/error.c 2006-12-11 14:28:09.000000000 +0100 @@ -315,11 +315,11 @@ if (interactive) fprintf (stderr, "%s: ", ename); else if (interactive_shell) - fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : " line ", lineno); + fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : _(" line "), lineno); else if (STREQ (ename, iname)) - fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : " line ", lineno); + fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : _(" line "), lineno); else - fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : " line ", lineno); + fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : _(" line "), lineno); SH_VA_START (args, format); diff -ur bash-3.2.orig/execute_cmd.c bash-3.2.new/execute_cmd.c --- bash-3.2.orig/execute_cmd.c 2006-08-26 06:23:17.000000000 +0200 +++ bash-3.2.new/execute_cmd.c 2006-12-11 14:28:09.000000000 +0100 @@ -1396,7 +1396,7 @@ /* Make a pipeline between the two commands. */ if (pipe (fildes) < 0) { - sys_error ("pipe error"); + sys_error (_("pipe error")); #if defined (JOB_CONTROL) terminate_current_pipeline (); kill_current_pipeline (); diff -ur bash-3.2.orig/expr.c bash-3.2.new/expr.c --- bash-3.2.orig/expr.c 2005-12-28 23:47:03.000000000 +0100 +++ bash-3.2.new/expr.c 2006-12-11 14:28:09.000000000 +0100 @@ -1194,7 +1194,7 @@ name = this_command_name; for (t = expression; whitespace (*t); t++) ; - internal_error ("%s%s%s: %s (error token is \"%s\")", + internal_error (_("%s%s%s: %s (error token is \"%s\")"), name ? name : "", name ? ": " : "", t, msg, (lasttp && *lasttp) ? lasttp : ""); longjmp (evalbuf, 1); @@ -1321,7 +1321,7 @@ { v = evalexp (argv[i], &expok); if (expok == 0) - fprintf (stderr, "%s: expression error\n", argv[i]); + fprintf (stderr, _("%s: expression error\n"), argv[i]); else printf ("'%s' -> %ld\n", argv[i], v); } @@ -1332,7 +1332,7 @@ builtin_error (format, arg1, arg2, arg3, arg4, arg5) char *format; { - fprintf (stderr, "expr: "); + fprintf (stderr, _("expr: ")); fprintf (stderr, format, arg1, arg2, arg3, arg4, arg5); fprintf (stderr, "\n"); return 0; diff -ur bash-3.2.orig/jobs.c bash-3.2.new/jobs.c --- bash-3.2.orig/jobs.c 2006-07-29 22:40:48.000000000 +0200 +++ bash-3.2.new/jobs.c 2006-12-11 14:28:09.000000000 +0100 @@ -462,7 +462,7 @@ if (job_control) { if (pipe (pgrp_pipe) == -1) - sys_error ("start_pipeline: pgrp pipe"); + sys_error (_("start_pipeline: pgrp pipe")); } #endif } @@ -1087,7 +1087,7 @@ internal_warning ("add_process: process %5ld (%s) in the_pipeline", (long)p->pid, p->command); # endif if (PALIVE (p)) - internal_warning ("add_process: pid %5ld (%s) marked as still alive", (long)p->pid, p->command); + internal_warning (_("add_process: pid %5ld (%s) marked as still alive"), (long)p->pid, p->command); p->running = PS_RECYCLED; /* mark as recycled */ } #endif @@ -1390,7 +1390,7 @@ if (x == 0) { x = retcode_name_buffer; - sprintf (x, "Signal %d", s); + sprintf (x, _("Signal %d"), s); } return x; } @@ -1404,20 +1404,20 @@ static char *temp; int es; - temp = "Done"; + temp = _("Done"); if (STOPPED (j) && format == 0) { if (posixly_correct == 0 || p == 0 || (WIFSTOPPED (p->status) == 0)) - temp = "Stopped"; + temp = _("Stopped"); else { temp = retcode_name_buffer; - sprintf (temp, "Stopped(%s)", signal_name (WSTOPSIG (p->status))); + sprintf (temp, _("Stopped(%s)"), signal_name (WSTOPSIG (p->status))); } } else if (RUNNING (j)) - temp = "Running"; + temp = _("Running"); else { if (WIFSTOPPED (p->status)) @@ -1429,14 +1429,14 @@ temp = retcode_name_buffer; es = WEXITSTATUS (p->status); if (es == 0) - strcpy (temp, "Done"); + strcpy (temp, _("Done")); else if (posixly_correct) - sprintf (temp, "Done(%d)", es); + sprintf (temp, _("Done(%d)"), es); else - sprintf (temp, "Exit %d", es); + sprintf (temp, _("Exit %d"), es); } else - temp = "Unknown status"; + temp = _("Unknown status"); } return temp; @@ -1523,7 +1523,7 @@ if ((WIFSTOPPED (show->status) == 0) && (WIFCONTINUED (show->status) == 0) && WIFCORED (show->status)) - fprintf (stream, "(core dumped) "); + fprintf (stream, _("(core dumped) ")); } } @@ -1542,7 +1542,7 @@ if (strcmp (temp, jobs[job_index]->wd) != 0) fprintf (stream, - " (wd: %s)", polite_directory_format (jobs[job_index]->wd)); + _(" (wd: %s)"), polite_directory_format (jobs[job_index]->wd)); } if (format || (p == last)) @@ -1734,7 +1734,7 @@ B.4.3.3, p. 237 also covers this, in the context of job control shells. */ if (setpgid (mypid, pipeline_pgrp) < 0) - sys_error ("child setpgid (%ld to %ld)", (long)mypid, (long)pipeline_pgrp); + sys_error (_("child setpgid (%ld to %ld)"), (long)mypid, (long)pipeline_pgrp); /* By convention (and assumption above), if pipeline_pgrp == shell_pgrp, we are making a child for @@ -3396,7 +3396,7 @@ signal_is_trapped (termsig) == 0) { /* Don't print `0' for a line number. */ - fprintf (stderr, "%s: line %d: ", get_name_for_error (), (line_number == 0) ? 1 : line_number); + fprintf (stderr, _("%s: line %d: "), get_name_for_error (), (line_number == 0) ? 1 : line_number); pretty_print_job (job, JLIST_NONINTERACTIVE, stderr); } else if (IS_FOREGROUND (job)) @@ -3410,7 +3410,7 @@ fprintf (stderr, "%s", j_strsignal (termsig)); if (WIFCORED (s)) - fprintf (stderr, " (core dumped)"); + fprintf (stderr, _(" (core dumped)")); fprintf (stderr, "\n"); } @@ -3422,7 +3422,7 @@ pretty_print_job (job, JLIST_STANDARD, stderr); if (dir && strcmp (dir, jobs[job]->wd) != 0) fprintf (stderr, - "(wd now: %s)\n", polite_directory_format (dir)); + _("(wd now: %s)\n"), polite_directory_format (dir)); } jobs[job]->flags |= J_NOTIFIED; @@ -3435,7 +3435,7 @@ pretty_print_job (job, JLIST_STANDARD, stderr); if (dir && (strcmp (dir, jobs[job]->wd) != 0)) fprintf (stderr, - "(wd now: %s)\n", polite_directory_format (dir)); + _("(wd now: %s)\n"), polite_directory_format (dir)); jobs[job]->flags |= J_NOTIFIED; break; @@ -3463,7 +3463,7 @@ if (shell_pgrp == -1) { - sys_error ("initialize_job_control: getpgrp failed"); + sys_error (_("initialize_job_control: getpgrp failed")); exit (1); } @@ -3509,7 +3509,7 @@ /* Make sure that we are using the new line discipline. */ if (set_new_line_discipline (shell_tty) < 0) { - sys_error ("initialize_job_control: line discipline"); + sys_error (_("initialize_job_control: line discipline")); job_control = 0; } else @@ -3519,7 +3519,7 @@ if ((original_pgrp != shell_pgrp) && (setpgid (0, shell_pgrp) < 0)) { - sys_error ("initialize_job_control: setpgid"); + sys_error (_("initialize_job_control: setpgid")); shell_pgrp = original_pgrp; } diff -ur bash-3.2.orig/mksyntax.c bash-3.2.new/mksyntax.c --- bash-3.2.orig/mksyntax.c 2006-06-22 19:58:58.000000000 +0200 +++ bash-3.2.new/mksyntax.c 2006-12-11 14:28:09.000000000 +0100 @@ -86,7 +86,7 @@ static void usage() { - fprintf (stderr, "%s: usage: %s [-d] [-o filename]\n", progname, progname); + fprintf (stderr, _("%s: usage: %s [-d] [-o filename]\n"), progname, progname); exit (2); } @@ -175,7 +175,7 @@ if (debug) { fstr = getcstr (flag); - fprintf(stderr, "added %s for character %s\n", fstr, cdesc(uc)); + fprintf(stderr, _("added %s for character %s\n"), fstr, cdesc(uc)); } lsyntax[uc] |= flag; @@ -192,7 +192,7 @@ if (debug) { fstr = getcstr (flag); - fprintf (stderr, "added %s for character %s\n", fstr, cdesc(c)); + fprintf (stderr, _("added %s for character %s\n"), fstr, cdesc(c)); } lsyntax[c] |= flag; } @@ -350,7 +350,7 @@ fp = fopen (filename, "w"); if (fp == 0) { - fprintf (stderr, "%s: %s: cannot open: %s\n", progname, filename, strerror(errno)); + fprintf (stderr, _("%s: %s: cannot open: %s\n"), progname, filename, strerror(errno)); exit (1); } } @@ -408,7 +408,7 @@ else #endif /* HAVE_SYS_ERRLIST */ { - sprintf (emsg, "Unknown system error %d", e); + sprintf (emsg, _("Unknown system error %d"), e); return (&emsg[0]); } } diff -ur bash-3.2.orig/nojobs.c bash-3.2.new/nojobs.c --- bash-3.2.orig/nojobs.c 2006-01-25 16:03:47.000000000 +0100 +++ bash-3.2.new/nojobs.c 2006-12-11 14:28:09.000000000 +0100 @@ -801,7 +801,7 @@ { fprintf (stderr, "%s", j_strsignal (WTERMSIG (status))); if (WIFCORED (status)) - fprintf (stderr, " (core dumped)"); + fprintf (stderr, _(" (core dumped)")); fprintf (stderr, "\n"); } diff -ur bash-3.2.orig/shell.c bash-3.2.new/shell.c --- bash-3.2.orig/shell.c 2006-05-17 14:46:54.000000000 +0200 +++ bash-3.2.new/shell.c 2006-12-11 14:28:09.000000000 +0100 @@ -1731,7 +1731,7 @@ char *set_opts, *s, *t; if (extra) - fprintf (fp, "GNU bash, version %s-(%s)\n", shell_version_string (), MACHTYPE); + fprintf (fp, _("GNU bash, version %s-(%s)\n"), shell_version_string (), MACHTYPE); fprintf (fp, _("Usage:\t%s [GNU long option] [option] ...\n\t%s [GNU long option] [option] script-file ...\n"), shell_name, shell_name); fputs (_("GNU long options:\n"), fp); diff -ur bash-3.2.orig/subst.c bash-3.2.new/subst.c --- bash-3.2.orig/subst.c 2006-09-19 14:35:09.000000000 +0200 +++ bash-3.2.new/subst.c 2006-12-11 14:28:09.000000000 +0100 @@ -1278,7 +1278,7 @@ { if (no_longjmp_on_fatal_error == 0) { /* { */ - report_error ("bad substitution: no closing `%s' in %s", "}", string); + report_error (_("bad substitution: no closing `%s' in %s"), "}", string); last_command_exit_value = EXECUTION_FAILURE; exp_jump_to_top_level (DISCARD); } @@ -6958,7 +6958,7 @@ sindex = t_index; goto add_character; } - report_error ("bad substitution: no closing \"`\" in %s", string+t_index); + report_error (_("bad substitution: no closing \"`\" in %s"), string+t_index); free (string); free (istring); return ((temp == &extract_string_error) ? &expand_word_error diff -ur bash-3.2.orig/version.c bash-3.2.new/version.c --- bash-3.2.orig/version.c 2005-05-16 17:58:34.000000000 +0200 +++ bash-3.2.new/version.c 2006-12-11 14:28:09.000000000 +0100 @@ -77,7 +77,7 @@ show_shell_version (extended) int extended; { - printf ("GNU bash, version %s (%s)\n", shell_version_string (), MACHTYPE); + printf (_("GNU bash, version %s (%s)\n"), shell_version_string (), MACHTYPE); if (extended) printf (_("Copyright (C) 2005 Free Software Foundation, Inc.\n")); }