From patchwork Sun Aug 18 17:27:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 34163 Received: (qmail 77516 invoked by alias); 18 Aug 2019 17:27:45 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 77327 invoked by uid 89); 18 Aug 2019 17:27:41 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=Assembly, spot X-HELO: gateway24.websitewelcome.com Received: from gateway24.websitewelcome.com (HELO gateway24.websitewelcome.com) (192.185.50.252) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 18 Aug 2019 17:27:39 +0000 Received: from cm11.websitewelcome.com (cm11.websitewelcome.com [100.42.49.5]) by gateway24.websitewelcome.com (Postfix) with ESMTP id C53613243 for ; Sun, 18 Aug 2019 12:27:37 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id zOxthZKvcdnCezOxthywR5; Sun, 18 Aug 2019 12:27:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=gE7LUXaVtk8ZUjIp8YoZT8asrAILOlBuK2DDcUAzM4k=; b=M0vWAJRMFUYh4VVgt4hPbjBh7n GXWKNFDimWgSIZXRozTibSeOtaXkH/jCWrWO4rC9p8XHq+romj2qE3qQll8D5b7IaAmj2vhD5yWk/ fbP+97KFL6uNTMsnDqzW34Ns/; Received: from 97-122-178-82.hlrn.qwest.net ([97.122.178.82]:44512 helo=bapiya.Home) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hzOxt-002aYY-I5; Sun, 18 Aug 2019 12:27:37 -0500 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 01/14] Some i18n fixes for the TUI Date: Sun, 18 Aug 2019 11:27:22 -0600 Message-Id: <20190818172735.17477-2-tom@tromey.com> In-Reply-To: <20190818172735.17477-1-tom@tromey.com> References: <20190818172735.17477-1-tom@tromey.com> 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-18 Tom Tromey * 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 | 8 ++++++++ gdb/tui/tui-data.h | 3 --- gdb/tui/tui-disasm.h | 2 +- gdb/tui/tui-regs.c | 2 +- gdb/tui/tui-source.h | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/gdb/tui/tui-data.h b/gdb/tui/tui-data.h index 7993c639376..0432a53750f 100644 --- a/gdb/tui/tui-data.h +++ b/gdb/tui/tui-data.h @@ -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" diff --git a/gdb/tui/tui-disasm.h b/gdb/tui/tui-disasm.h index d9895322487..bfddfa01837 100644 --- a/gdb/tui/tui-disasm.h +++ b/gdb/tui/tui-disasm.h @@ -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: diff --git a/gdb/tui/tui-regs.c b/gdb/tui/tui-regs.c index 36973ff51ae..8fcb7bc46bc 100644 --- a/gdb/tui/tui-regs.c +++ b/gdb/tui/tui-regs.c @@ -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 ]")); } } diff --git a/gdb/tui/tui-source.h b/gdb/tui/tui-source.h index 9c3013637b7..a7002123c97 100644 --- a/gdb/tui/tui-source.h +++ b/gdb/tui/tui-source.h @@ -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 *,