From patchwork Fri Feb 11 23:18:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 1591898 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JwV1R1lHGz9sFq for ; Sat, 12 Feb 2022 10:19:05 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3AA783857C5D for ; Fri, 11 Feb 2022 23:19:02 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com [68.232.137.252]) by sourceware.org (Postfix) with ESMTPS id D4F7A385841B for ; Fri, 11 Feb 2022 23:18:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org D4F7A385841B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com IronPort-SDR: cwBQfsgLDySsb6qbcJXF7O4MMTrGJh0i/3JoNSKdVwBlFvGbjX++B6KzC9I+PFv/sE5JPrPmZu rFe6UN71jvHgth/91rLzYlsLAjyMLnM74gF8OJPxIGLKlDr5D9kgBKPs22ltu2QvvxQN4qootb 2Ie+nnXV/ywQtdTC/fTnVz2LGpIANQIzt9st5EjaXxb4XlwNKAcnUxy/+Bf+bLP6LpBj1/U1rn ORVZPLniPxqy2h1KTurcrPMR3wZVhOfP/ezAzEfh0AbzvhoxH1hS2piSIwZU26MHipiDGhSp+O eHviOTR/nCNtiobemSyVNBWr X-IronPort-AV: E=Sophos;i="5.88,361,1635235200"; d="scan'208";a="71866453" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 11 Feb 2022 15:18:39 -0800 IronPort-SDR: j764QtTXRx0PfJxngaE7BhBb2DoW90LH/dQTM+cbaFoebPeiCdNZ0mAqGDo3C54aTdt1wgF2bt qBeCFMmB2IdntjWYX7ras+N4JPe148Ko7yIinuUi2WSFfXbEMmXzsWXvAzTvaG7VDr+nADzK4q pgx+p2ZasT1TWDKVikqSaHE7hsoiVe3MHm8R/vRtcbMV4YARiMMr8LnLAQHjqKiIiHvZXiyI2z Gfh+xxCy1RBdu2gCuN/cDRPGU1VYou0xgXSC4+q+J+WDK/TztyEZT7kA8LkBq7emZgYgHyucZA riY= Date: Fri, 11 Feb 2022 23:18:33 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Subject: [committed] i18n: fix exgettext handling of C++ sources Message-ID: User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-05.mgc.mentorg.com (139.181.222.5) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-3120.8 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org Sender: "Gcc-patches" The move of source files to .cc names broke most message extraction by exgettext because it processed .c files with --language=GCC-source but didn't process .cc files that way. Fix to process files identified as C++ that way as well. Tested with "make gcc.pot". Applied to mainline. * exgettext: Also process C++ sources with --language=GCC-source. diff --git a/gcc/po/exgettext b/gcc/po/exgettext index a69cdacb9bf..95cb0e75554 100644 --- a/gcc/po/exgettext +++ b/gcc/po/exgettext @@ -69,6 +69,7 @@ posrcxx=$pwd/$T/po-cxx-sources pottmp1=$pwd/$T/tmp1.pot pottmp2=$pwd/$T/tmp2.pot pottmp3=$pwd/$T/tmp3.pot +pottmp4=$pwd/$T/tmp4.pot pottmp=$pwd/$T/tmp.pot # Locate files to scan. We scan the following directories: @@ -312,8 +313,13 @@ $xgettext --default-domain=$package --directory=$srcdir \ --copyright-holder="Free Software Foundation, Inc." \ --msgid-bugs-address="$BUGURL" \ --language=GCC-source -o $pottmp3 +$xgettext --default-domain=$package --directory=$srcdir \ + --add-comments --keyword= `cat $kopt2` --files-from=$posrcxx \ + --copyright-holder="Free Software Foundation, Inc." \ + --msgid-bugs-address="$BUGURL" \ + --language=GCC-source -o $pottmp4 $xgettext --default-domain=$package \ - --add-comments $pottmp1 $pottmp2 $pottmp3 \ + --add-comments $pottmp1 $pottmp2 $pottmp3 $pottmp4 \ --copyright-holder="Free Software Foundation, Inc." \ --msgid-bugs-address="$BUGURL" \ --language=PO -o $pottmp