diff options
author | Tom Tromey <tromey@adacore.com> | 2019-08-02 08:12:31 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-08-05 07:36:28 -0600 |
commit | 8abfcabcb49fcd8b95854a5b59e7928e3c6000ff (patch) | |
tree | 893690767cf48b6862208522976afc8d9c9183f3 /gdb/compile | |
parent | 23d188c74e7481bb0af3c42b84fc9cb0c94267e5 (diff) | |
download | gdb-8abfcabcb49fcd8b95854a5b59e7928e3c6000ff.zip gdb-8abfcabcb49fcd8b95854a5b59e7928e3c6000ff.tar.gz gdb-8abfcabcb49fcd8b95854a5b59e7928e3c6000ff.tar.bz2 |
Use _() in calls to build_help
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-05 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_().
Diffstat (limited to 'gdb/compile')
-rw-r--r-- | gdb/compile/compile.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/compile/compile.c b/gdb/compile/compile.c index 4c0721d..1c0513a 100644 --- a/gdb/compile/compile.c +++ b/gdb/compile/compile.c @@ -971,7 +971,7 @@ Command to compile source code and inject it into the inferior."), const auto compile_opts = make_compile_options_def_group (nullptr); static const std::string compile_code_help - = gdb::option::build_help (N_("\ + = gdb::option::build_help (_("\ Compile, inject, and execute code.\n\ \n\ Usage: compile code [OPTION]... [CODE]\n\ @@ -994,7 +994,7 @@ indicate the end of the expression."), set_cmd_completer_handle_brkchars (c, compile_code_command_completer); static const std::string compile_file_help - = gdb::option::build_help (N_("\ + = gdb::option::build_help (_("\ Evaluate a file containing source code.\n\ \n\ Usage: compile file [OPTION].. [FILENAME]\n\ @@ -1011,7 +1011,7 @@ Options:\n\ const auto compile_print_opts = make_value_print_options_def_group (nullptr); static const std::string compile_print_help - = gdb::option::build_help (N_("\ + = gdb::option::build_help (_("\ Evaluate EXPR by using the compiler and print result.\n\ \n\ Usage: compile print [[OPTION]... --] [/FMT] [EXPR]\n\ |