From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 439 invoked by alias); 23 Jun 2002 16:32:58 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 429 invoked from network); 23 Jun 2002 16:32:55 -0000 Received: from unknown (HELO gash2.peakpeak.com) (207.174.178.17) by sources.redhat.com with SMTP; 23 Jun 2002 16:32:55 -0000 Received: from fleche.redhat.com (ta0200.peakpeak.com [204.144.244.200]) by gash2.peakpeak.com (8.9.3/8.9.3) with ESMTP id KAA28058 for ; Sun, 23 Jun 2002 10:32:52 -0600 Received: by fleche.redhat.com (Postfix, from userid 1000) id 0040F4F80BA; Sun, 23 Jun 2002 10:46:07 -0600 (MDT) To: gdb-patches@sources.redhat.com Subject: RFA: next gettextization step From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom X-Zippy: ...Just enough time to do my LIBERACE impression... Date: Sun, 23 Jun 2002 09:32:00 -0000 Message-ID: <877kkqq6y8.fsf@fleche.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-06/txt/msg00476.txt.bz2 This patch is the next step in gettextization. It adds the gdb/po directory and fills it in. It also marks up a single file (main.c) so that the initial gdb.pot (master catalog) will have some contents. This is exactly the same approach taken by the other tools in the src tree. Ok to commit? Tom Index: ChangeLog from Tom Tromey * main.c: Marked all strings with _(). * configure: Rebuilt. * configure.in (PACKAGE): New subst. (AC_OUTPUT): Create po/Makefile.in and po/Makefile. (SUBDIRS): Added po. * po/gdb.pot: New file. * po/POTFILES.in: New file. * po/.cvsignore: New file. * po/Make-in: New file. Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.88 diff -u -r1.88 configure.in --- configure.in 21 Jun 2002 23:48:39 -0000 1.88 +++ configure.in 23 Jun 2002 16:29:09 -0000 @@ -36,8 +36,9 @@ dnl Set up for gettext. PACKAGE is used when we call bindtextdomain. ALL_LINGUAS= CY_GNU_GETTEXT -AC_DEFINE(PACKAGE, "gdb", [Name of this package. ]) - +PACKAGE=gdb +AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of this package. ]) +AC_SUBST(PACKAGE) dnl List of object files added by configure. @@ -1293,7 +1294,7 @@ *) AC_MSG_ERROR("GDB: Unknown GDB_MULTI_ARCH value ${GDB_MULTI_ARCH}");; esac -SUBDIRS="doc testsuite nlm" +SUBDIRS="doc po testsuite nlm" if test "${enable_multi_ice}" = "yes"; then SUBDIRS="${SUBDIRS} multi-ice" fi @@ -1360,7 +1361,7 @@ AC_EXEEXT AC_CONFIG_SUBDIRS($configdirs) -AC_OUTPUT(Makefile .gdbinit:gdbinit.in, +AC_OUTPUT(Makefile .gdbinit:gdbinit.in po/Makefile.in:po/Make-in, [ dnl Autoconf doesn't provide a mechanism for modifying definitions dnl provided by makefile fragments. @@ -1386,6 +1387,8 @@ xconfig.h:config.in) echo > stamp-h ;; esac + +sed -e '/POTFILES =/r po/POTFILES' po/Makefile.in > po/Makefile ], [ gdb_host_cpu=$gdb_host_cpu Index: main.c =================================================================== RCS file: /cvs/src/src/gdb/main.c,v retrieving revision 1.17 diff -u -r1.17 main.c --- main.c 21 Jun 2002 23:48:41 -0000 1.17 +++ main.c 23 Jun 2002 16:29:10 -0000 @@ -347,7 +347,7 @@ extern int gdbtk_test (char *); if (!gdbtk_test (optarg)) { - fprintf_unfiltered (gdb_stderr, "%s: unable to load tclcommand file \"%s\"", + fprintf_unfiltered (gdb_stderr, _("%s: unable to load tclcommand file \"%s\""), argv[0], optarg); exit (1); } @@ -393,7 +393,7 @@ fprintf_unfiltered (gdb_stderr, - "warning: could not set baud rate to `%s'.\n", optarg); + _("warning: could not set baud rate to `%s'.\n"), optarg); else baud_rate = i; } @@ -410,7 +410,7 @@ fprintf_unfiltered (gdb_stderr, - "warning: could not set timeout limit to `%s'.\n", optarg); + _("warning: could not set timeout limit to `%s'.\n"), optarg); else remote_timeout = i; } @@ -421,7 +421,7 @@ #endif case '?': fprintf_unfiltered (gdb_stderr, - "Use `%s --help' for a complete list of options.\n", + _("Use `%s --help' for a complete list of options.\n"), argv[0]); exit (1); } @@ -452,7 +452,7 @@ if (optind >= argc) { fprintf_unfiltered (gdb_stderr, - "%s: `--args' specified but no program specified\n", + _("%s: `--args' specified but no program specified\n"), argv[0]); exit (1); } @@ -479,7 +479,7 @@ break; case 3: fprintf_unfiltered (gdb_stderr, - "Excess command line arguments ignored. (%s%s)\n", + _("Excess command line arguments ignored. (%s%s)\n"), argv[optind], (optind == argc - 1) ? "" : " ..."); break; } @@ -524,7 +524,7 @@ quit_pre_print = error_pre_print; /* We may get more than one warning, don't double space all of them... */ - warning_pre_print = "\nwarning: "; + warning_pre_print = _("\nwarning: "); /* Read and execute $HOME/.gdbinit file, if it exists. This is done *before* all the command line arguments are processed; it sets @@ -592,7 +592,7 @@ printf_filtered ("\n"); error_pre_print = "\n"; quit_pre_print = error_pre_print; - warning_pre_print = "\nwarning: "; + warning_pre_print = _("\nwarning: "); if (corearg != NULL) { @@ -622,7 +622,7 @@ /* Error messages should no longer be distinguished with extra output. */ error_pre_print = NULL; quit_pre_print = NULL; - warning_pre_print = "warning: "; + warning_pre_print = _("warning: "); /* Read the .gdbinit file in the current directory, *if* it isn't the same as the $HOME/.gdbinit file (it should exist, also). */ @@ -681,7 +681,7 @@ { long init_time = get_run_time () - time_at_startup; - printf_unfiltered ("Startup time: %ld.%06ld\n", + printf_unfiltered (_("Startup time: %ld.%06ld\n"), init_time / 1000000, init_time % 1000000); } @@ -691,7 +691,7 @@ extern char **environ; char *lim = (char *) sbrk (0); - printf_unfiltered ("Startup size: data size %ld\n", + printf_unfiltered (_("Startup size: data size %ld\n"), (long) (lim - (char *) &environ)); #endif } @@ -752,69 +752,69 @@ static void print_gdb_help (struct ui_file *stream) { - fputs_unfiltered ("\ + fputs_unfiltered (_("\ This is the GNU debugger. Usage:\n\n\ gdb [options] [executable-file [core-file or process-id]]\n\ gdb [options] --args executable-file [inferior-arguments ...]\n\n\ Options:\n\n\ -", stream); - fputs_unfiltered ("\ +"), stream); + fputs_unfiltered (_("\ --args Arguments after executable-file are passed to inferior\n\ -", stream); - fputs_unfiltered ("\ +"), stream); + fputs_unfiltered (_("\ --[no]async Enable (disable) asynchronous version of CLI\n\ -", stream); - fputs_unfiltered ("\ +"), stream); + fputs_unfiltered (_("\ -b BAUDRATE Set serial port baud rate used for remote debugging.\n\ --batch Exit after processing options.\n\ --cd=DIR Change current directory to DIR.\n\ --command=FILE Execute GDB commands from FILE.\n\ --core=COREFILE Analyze the core dump COREFILE.\n\ --pid=PID Attach to running process PID.\n\ -", stream); - fputs_unfiltered ("\ +"), stream); + fputs_unfiltered (_("\ --dbx DBX compatibility mode.\n\ --directory=DIR Search for source files in DIR.\n\ --epoch Output information used by epoch emacs-GDB interface.\n\ --exec=EXECFILE Use EXECFILE as the executable.\n\ --fullname Output information used by emacs-GDB interface.\n\ --help Print this message.\n\ -", stream); - fputs_unfiltered ("\ +"), stream); + fputs_unfiltered (_("\ --interpreter=INTERP\n\ Select a specific interpreter / user interface\n\ -", stream); - fputs_unfiltered ("\ +"), stream); + fputs_unfiltered (_("\ --mapped Use mapped symbol files if supported on this system.\n\ --nw Do not use a window interface.\n\ - --nx Do not read ", stream); + --nx Do not read "), stream); fputs_unfiltered (gdbinit, stream); - fputs_unfiltered (" file.\n\ + fputs_unfiltered (_(" file.\n\ --quiet Do not print version number on startup.\n\ --readnow Fully read symbol files on first access.\n\ -", stream); - fputs_unfiltered ("\ +"), stream); + fputs_unfiltered (_("\ --se=FILE Use FILE as symbol file and executable file.\n\ --symbols=SYMFILE Read symbols from SYMFILE.\n\ --tty=TTY Use TTY for input/output by the program being debugged.\n\ -", stream); +"), stream); #if defined(TUI) - fputs_unfiltered ("\ + fputs_unfiltered (_("\ --tui Use a terminal user interface.\n\ -", stream); +"), stream); #endif - fputs_unfiltered ("\ + fputs_unfiltered (_("\ --version Print version information and then exit.\n\ -w Use a window interface.\n\ --write Set writing into executable and core files.\n\ --xdb XDB compatibility mode.\n\ -", stream); +"), stream); #ifdef ADDITIONAL_OPTION_HELP fputs_unfiltered (ADDITIONAL_OPTION_HELP, stream); #endif - fputs_unfiltered ("\n\ + fputs_unfiltered (_("\n\ For more information, type \"help\" from within GDB, or consult the\n\ GDB manual (available as on-line info or a printed manual).\n\ Report bugs to \"bug-gdb@gnu.org\".\ -", stream); +"), stream); }