This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Some more translation related tweaks
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Volker Reichelt <v dot reichelt at netcologne dot de>, <gcc-patches at gcc dot gnu dot org>, Marek Polacek <polacek at redhat dot com>
- Date: Mon, 27 Feb 2017 12:47:09 +0000
- Subject: Re: [PATCH] Some more translation related tweaks
- Authentication-results: sourceware.org; auth=none
- References: <tkrat.a7532927a533bdd5@netcologne.de> <20170226123555.GW1849@tucnak> <tkrat.531701baee17c0a8@netcologne.de> <20170227102744.GZ1849@tucnak>
On Mon, 27 Feb 2017, Jakub Jelinek wrote:
> On Mon, Feb 27, 2017 at 11:04:36AM +0100, Volker Reichelt wrote:
> > > This is not -Wformat-security friendly, perhaps better
> > > pedwarn (EXPR_LOC_OR_LOC (outer_nelts, input_location), OPT_Wvla,
> > > typedef_variant_p (orig_type)
> > > ? "non-constant array new length must be specified "
> > > "directly, not by typedef"
> > > : "non-constant array new length must be specified "
> > > "without parentheses around the type-id");
> > > ?
> >
> > Not quite. Like this the second string doesn't end up in the gcc.pot
> > file for translation. I had to wrap the second string in G_(...) to make
> > it work. (I'll have a look for other instances of this pattern and
> > prepare a separate patch.)
>
> Looks like a xgettext bug or missing feature :(. Joseph, shall we just
> change all those to be G_() around the second string (well, some could be
Yes, it's generally the case that G_() is used whenever there's a
conditional expression for the msgid argument to a diagnostic function.
--
Joseph S. Myers
joseph@codesourcery.com