public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Joseph Myers <jsm28@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r12-7206] i18n: fix exgettext handling of C++ sources
Date: Fri, 11 Feb 2022 23:18:12 +0000 (GMT)	[thread overview]
Message-ID: <20220211231812.9FE8D385841B@sourceware.org> (raw)

https://gcc.gnu.org/g:434b2caf5d44d58cb48c9588d4b70588f6d5965b

commit r12-7206-g434b2caf5d44d58cb48c9588d4b70588f6d5965b
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Fri Feb 11 23:16:33 2022 +0000

    i18n: fix exgettext handling of C++ sources
    
    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".
    
            * exgettext: Also process C++ sources with --language=GCC-source.

Diff:
---
 gcc/po/exgettext | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

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


                 reply	other threads:[~2022-02-11 23:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220211231812.9FE8D385841B@sourceware.org \
    --to=jsm28@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).