This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Use _() in calls to build_help
- From: Kevin Buettner <kevinb at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at adacore dot com>
- Date: Fri, 2 Aug 2019 15:37:13 -0700
- Subject: Re: [PATCH] Use _() in calls to build_help
- References: <20190802141519.20019-1-tromey@adacore.com>
On Fri, 2 Aug 2019 08:15:19 -0600
Tom Tromey <tromey@adacore.com> wrote:
> Currently some code in gdb uses build_help with N_(), like:
>
> static const std::string compile_print_help
> = gdb::option::build_help (N_("\
>
> I believe this is incorrect. The N_ macro is used to mark text that
> should end up in the message catalog, but which will be translated by
> a later call to gettext.
>
> However, in this case, there is no later call to gettext, so (if gdb
> had translations), this text would remain untranslated.
>
> Instead, I think using the ordinary _() macro is correct here.
> Translators will have to know to preserve "%OPTIONS%" in the text --
> but that seems both unavoidable and fine.
>
> Tested by rebuilding as there's not much else to do.
>
> gdb/ChangeLog
> 2019-08-02 Tom Tromey <tromey@adacore.com>
>
> * compile/compile.c (_initialize_compile): Use _(), not N_().
> * thread.c (_initialize_thread): Use _(), not N_().
> * stack.c (_initialize_stack): Use _(), not N_().
> * printcmd.c (_initialize_printcmd): Use _(), not N_().
LGTM.
Kevin