]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Some i18n fixes for the TUI
authorTom Tromey <tom@tromey.com>
Sat, 13 Jul 2019 21:45:14 +0000 (15:45 -0600)
committerTom Tromey <tom@tromey.com>
Tue, 20 Aug 2019 22:22:03 +0000 (16:22 -0600)
The TUI has a few #defines that hold user-visible strings.  As these
are only used in a single spot, this patch removes the defines,
preferring direct use of the string where needed.  Furthermore, now
the strings are wrapped in _(), which is friendlier for i18n purposes.

gdb/ChangeLog
2019-08-20  Tom Tromey  <tom@tromey.com>

* tui/tui-source.h (struct tui_source_window): Update.
* tui/tui-regs.c (tui_show_registers): Update.
* tui/tui-disasm.h (struct tui_disasm_window): Update.
* tui/tui-data.h (NO_SRC_STRING, NO_DISASSEM_STRING)
(NO_REGS_STRING): Remove defines.

gdb/ChangeLog
gdb/tui/tui-data.h
gdb/tui/tui-disasm.h
gdb/tui/tui-regs.c
gdb/tui/tui-source.h

index d9e676ac7cde1781cdffde4edbfd4dfabfcbf7fc..c4a1179ce0bc51d57910d3ae87f3fe1a330c5f5e 100644 (file)
@@ -1,3 +1,11 @@
+2019-08-20  Tom Tromey  <tom@tromey.com>
+
+       * tui/tui-source.h (struct tui_source_window): Update.
+       * tui/tui-regs.c (tui_show_registers): Update.
+       * tui/tui-disasm.h (struct tui_disasm_window): Update.
+       * tui/tui-data.h (NO_SRC_STRING, NO_DISASSEM_STRING)
+       (NO_REGS_STRING): Remove defines.
+
 2019-08-20  Conrad Meyer  <cem@FreeBSD.org>
 
        * remote.c (remote_target::remote_btrace_maybe_reopen): Avoid
index 7993c639376d37f426a9aa52fd9e6e3b892428c2..0432a53750f0936cd178f617a9322423735f666b 100644 (file)
@@ -103,9 +103,6 @@ public:
 
 /* Constant definitions.  */
 #define DEFAULT_TAB_LEN         8
-#define NO_SRC_STRING           "[ No Source Available ]"
-#define NO_DISASSEM_STRING      "[ No Assembly Available ]"
-#define NO_REGS_STRING          "[ Register Values Unavailable ]"
 #define NO_DATA_STRING          "[ No Data Values Displayed ]"
 #define SRC_NAME                "src"
 #define CMD_NAME                "cmd"
index d98953224879548988a748fe680951f0aefdb8b1..bfddfa0183795831fda5db0681a6b3a177d915d9 100644 (file)
@@ -50,7 +50,7 @@ struct tui_disasm_window : public tui_source_window_base
 
   void erase_source_content () override
   {
-    do_erase_source_content (NO_DISASSEM_STRING);
+    do_erase_source_content (_("[ No Assembly Available ]"));
   }
 
 protected:
index 36973ff51aeb0630c626080f6a66d415a9919e5e..8fcb7bc46bc505ae7e340889d316cfe6dfcd36a1 100644 (file)
@@ -165,7 +165,7 @@ tui_show_registers (struct reggroup *group)
   else
     {
       TUI_DATA_WIN->current_group = 0;
-      TUI_DATA_WIN->erase_data_content (NO_REGS_STRING);
+      TUI_DATA_WIN->erase_data_content (_("[ Register Values Unavailable ]"));
     }
 }
 
index 9c3013637b72b1f2b11c08c1fafd179612c4c370..a7002123c97f3dacf6728d03b535f0380de17cbf 100644 (file)
@@ -53,7 +53,7 @@ struct tui_source_window : public tui_source_window_base
 
   void erase_source_content () override
   {
-    do_erase_source_content (NO_SRC_STRING);
+    do_erase_source_content (_("[ No Source Available ]"));
   }
 
   void show_symtab_source (struct gdbarch *, struct symtab *,