From 8abfcabcb49fcd8b95854a5b59e7928e3c6000ff Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 2 Aug 2019 08:12:31 -0600 Subject: 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 * 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_(). --- gdb/thread.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/thread.c') diff --git a/gdb/thread.c b/gdb/thread.c index 485c996..4a7fe68 100644 --- a/gdb/thread.c +++ b/gdb/thread.c @@ -2150,7 +2150,7 @@ Options:\n\ const auto thread_apply_opts = make_thread_apply_options_def_group (nullptr); - static std::string thread_apply_help = gdb::option::build_help (N_("\ + static std::string thread_apply_help = gdb::option::build_help (_("\ Apply a command to a list of threads.\n\ Usage: thread apply ID... [OPTION]... COMMAND\n\ ID is a space-separated list of IDs of threads to apply COMMAND on.\n" @@ -2166,7 +2166,7 @@ THREAD_APPLY_OPTION_HELP), const auto thread_apply_all_opts = make_thread_apply_all_options_def_group (nullptr, nullptr); - static std::string thread_apply_all_help = gdb::option::build_help (N_("\ + static std::string thread_apply_all_help = gdb::option::build_help (_("\ Apply a command to all threads.\n\ \n\ Usage: thread apply all [OPTION]... COMMAND\n" -- cgit v1.1