From patchwork Thu Feb 23 10:34:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Jelinek X-Patchwork-Id: 60893 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp240595wrd; Thu, 23 Feb 2023 02:35:44 -0800 (PST) X-Google-Smtp-Source: AK7set+GyvbzfncVV2cPNgXRRrbRnBZJBeyx4X7ehYn6WckUtDiYCqgkLzWCZQPVhWs6mtxMg1hu X-Received: by 2002:aa7:d5c6:0:b0:4ac:b614:dd00 with SMTP id d6-20020aa7d5c6000000b004acb614dd00mr11188800eds.30.1677148544068; Thu, 23 Feb 2023 02:35:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677148544; cv=none; d=google.com; s=arc-20160816; b=kFBl8V9/JzhPnNb5CmBn1mljph56y7pV/Rm5Z4E2mvAr9NjWRKrBect9EHI3xak7vi pY9M1D+u2NH+BydunRsmjQYoD+rL3CmZLoAojcJlRgEXevVcHZ60tb2ZU4EIjFw0qATD 66Jqy/rtz2qR8TKYsWtKzLprhjJXDSIoEtWKyJ3/rm9Rg2OxR0dlHbNnnlLXYQal45BG Fc9bkLU0a236gViRrLDSuBLtuQBXJVVfWMCa/j+XOjj/MlddnA2eydl6UypfAslq2Q8h e9r72uKACior0Hm4euu4ta60xqh8YUo6GcTXT2gBy+A4ndUG2lxG2PMPe81w861mcCEV ikXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-disposition:mime-version:message-id:subject:cc:to:date :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=jDkS5wBekKOOF+Pi8n3VQJDbZ0MJcoSWHtRSAQD/tjw=; b=b0BKfF5EM2KjyVKbrcyoDamdF58ZUP2xelTcinaUPyFBiJHlsXyft6s+bErcugsvtT 7m435hv2BE3lBB7PR4juxvR8ZJrD9z7NNvBB0ZkRtLqXoTh9mv5kF8l3v1ckYC2bSIUe haNdeWM+lXhnE13k4afWiq8dkJ9ANrmvf7OqeNP+f+ObgaZsUWhEftVURqX3sztYzEMe bpNYwwjIpM28TVoOouCOt86/qX0GzmtBxQ6he7snljsAsLgqlCRjLLWFQOse4x8Kx1D1 CJbbFMX6kb4hTC+173WabXujcpKR9oBd+GeiNsLTQoz6Um9H74XbqOlZeBkEV/+93Jvv GGQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=lMBnThef; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id r12-20020a056402034c00b004aee547e558si10411004edw.332.2023.02.23.02.35.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Feb 2023 02:35:44 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=lMBnThef; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0E7B5385842B for ; Thu, 23 Feb 2023 10:35:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0E7B5385842B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677148543; bh=jDkS5wBekKOOF+Pi8n3VQJDbZ0MJcoSWHtRSAQD/tjw=; h=Date:To:Cc:Subject:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=lMBnThefY4zLh1tXi9YL7Z4VyRYkWe89I8tYgXNBRhwLpgujvB89hKeQTg+nSdKuj XNWY1s6h8g776wpv2h/Nzh7BJEUQEJjCGMObWv+uxCYMHd+1GvQCHcP6duWCr9HXyG oZQaYW8zKKFq2PK3HJiLL3ltvp1eFCGUT5zzjhnE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 360B63858288 for ; Thu, 23 Feb 2023 10:34:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 360B63858288 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-494-4b9rvfBqPMK5nd0JHKP0zw-1; Thu, 23 Feb 2023 05:34:54 -0500 X-MC-Unique: 4b9rvfBqPMK5nd0JHKP0zw-1 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1F14680D0E3; Thu, 23 Feb 2023 10:34:54 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.39.192.62]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D7AC5492C14; Thu, 23 Feb 2023 10:34:53 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.17.1/8.17.1) with ESMTPS id 31NAYpFB507581 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Thu, 23 Feb 2023 11:34:51 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.17.1/8.17.1/Submit) id 31NAYoVq507580; Thu, 23 Feb 2023 11:34:50 +0100 Date: Thu, 23 Feb 2023 11:34:50 +0100 To: Max Filippov Cc: gcc-patches@gcc.gnu.org Subject: [PATCH] xtensa: Fix up fatal_error message strings in xtensa-dynconfig.c [PR108890] Message-ID: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Jakub Jelinek via Gcc-patches From: Jakub Jelinek Reply-To: Jakub Jelinek Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1758617711678506411?= X-GMAIL-MSGID: =?utf-8?q?1758617711678506411?= Hi! The translation PR complains that these 4 messages from xtensa-dynconfig.c are marked in po/gcc.pot as c-format (which doesn't allow %qs) while they should be gcc-internal-format. The problem is in the manual translation of the strings with _(), that should be both unnecessary because fatal_error invokes _() on its argument already, but also incorrect for the above reason, for gcc-internal-format strings one should use G_("...") instead if really needed. The following patch drops those _("..."), tested by regenerating po/gcc.pot to see they are now gcc-internal-format, but not really tested on xtensa target. Ok for trunk? BTW, why is the file using .c extension rather than .cc? Why isn't t-xtensa using $(COMPILE) and $(POSTCOMPILE) to compile it like for most other extra_objs on other targets? And, why does that file use <> style includes of gcc internal headers rather than "" style which is used everywhere else in gcc? 2023-02-23 Jakub Jelinek PR translation/108890 * config/xtensa/xtensa-dynconfig.c (xtensa_load_config): Drop _()s around fatal_error format strings. Jakub --- gcc/config/xtensa/xtensa-dynconfig.c.jj 2023-01-16 11:52:16.056734462 +0100 +++ gcc/config/xtensa/xtensa-dynconfig.c 2023-02-23 10:57:17.325259182 +0100 @@ -87,14 +87,14 @@ const void *xtensa_load_config (const ch if (!handle) { fatal_error (input_location, - _("%qs is defined but could not be loaded: %s"), + "%qs is defined but could not be loaded: %s", CONFIG_ENV_NAME, dlerror ()); exit (FATAL_EXIT_CODE); } if (dlsym (handle, "plugin_is_GPL_compatible") == NULL) { fatal_error (input_location, - _("%qs plugin is not licensed under a GPL-compatible license"), + "%qs plugin is not licensed under a GPL-compatible license", CONFIG_ENV_NAME); exit (FATAL_EXIT_CODE); } @@ -111,7 +111,7 @@ const void *xtensa_load_config (const ch return no_name_def; fatal_error (input_location, - _("%qs is loaded but symbol %qs is not found: %s"), + "%qs is loaded but symbol %qs is not found: %s", CONFIG_ENV_NAME, name, dlerror ()); exit (FATAL_EXIT_CODE); } @@ -125,7 +125,7 @@ const void *xtensa_load_config (const ch if (path) { fatal_error (input_location, - _("%qs is defined but plugin support is disabled"), + "%qs is defined but plugin support is disabled", CONFIG_ENV_NAME); exit (FATAL_EXIT_CODE); }