[Bug translation/89939] messages for translation must not contain embedded macro parameters

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Apr 11 10:52:00 GMT 2019


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89939

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-04-11
     Ever confirmed|0                           |1

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Roland Illig from comment #3)
> Would it be possible to teach exgettext that inside the _(...), the only
> allowed tokens are string literals, and maybe the PRIU64 constants? There's
> probably some more tokens that I just forgot, but a test run over the GCC
> source should reveal most of them.

I'm afraid not, exgettext is just a wrapper around xgettext and all this
handling is done in xgettext, so we'd need to change gettext package (perhaps
add some new option).
In the https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00335.html thread David
Malcolm suggested that we could handle some of these issues (e.g. "something"
"somethingelse" or "something "
" something else"
etc. by a new gcc non-default -Wformat= warning, perhaps it could cover this
case as well, but it wouldn't handle the G_("...") cases unless the compiler
sees those arguments to format attribute functions.  In any case, that is GCC
10 material.

(In reply to Thomas Koenig from comment #2)
> For this case, the solution is straightforward:
> 
> Index: frontend-passes.c                                                    

LGTM; I'd like to submit the 20190414 snapshot to the translation project,
could you please make sure this fix is committed before Sunday?  Thanks.


More information about the Gcc-bugs mailing list