public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/47081] New: Macro usage too clever for localization
@ 2010-12-28 19:19 goeran at uddeborg dot se
  2010-12-28 19:21 ` [Bug middle-end/47081] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: goeran at uddeborg dot se @ 2010-12-28 19:19 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47081

           Summary: Macro usage too clever for localization
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: goeran@uddeborg.se


In gcc/gentype-state.c there is a macro like this:

#define fatal_reading_state_printf(Tok,Fmt,...) do {    \
...
      fatal ("%s:%d:%d: Invalid state file; " Fmt,    \

Normally, the first argument to fatal() is extracted for localization.  But
that extraction apparently fails here.  Each usage of the macro will create a
unique format string to fatal().  But the extractor for localization only
extracts the invariant part that is in the macro, "%s:%d:%d: Invalid state
file; ".  That will never be the string looked up for translation at run time. 
And the strings actually looked up are not available in the pot file.

Seen in the po file distributed for 4.6-b20101218.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/47081] Macro usage too clever for localization
  2010-12-28 19:19 [Bug middle-end/47081] New: Macro usage too clever for localization goeran at uddeborg dot se
@ 2010-12-28 19:21 ` pinskia at gcc dot gnu.org
  2010-12-28 19:24 ` goeran at uddeborg dot se
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2010-12-28 19:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47081

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2010-12-28 19:21:25 UTC ---
I don't know if generator files should be have translated error messages. 
Unlike other programs, the gen* programs are only used internally inside gcc.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/47081] Macro usage too clever for localization
  2010-12-28 19:19 [Bug middle-end/47081] New: Macro usage too clever for localization goeran at uddeborg dot se
  2010-12-28 19:21 ` [Bug middle-end/47081] " pinskia at gcc dot gnu.org
@ 2010-12-28 19:24 ` goeran at uddeborg dot se
  2010-12-28 19:44 ` joseph at codesourcery dot com
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: goeran at uddeborg dot se @ 2010-12-28 19:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47081

--- Comment #2 from Göran Uddeborg <goeran at uddeborg dot se> 2010-12-28 19:23:57 UTC ---
Oh, I see.  You mean this message is never seen by an end user?  In that case,
maybe they could be excluded from the set of files scanned for messages to
translate?  Or would that be complex?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/47081] Macro usage too clever for localization
  2010-12-28 19:19 [Bug middle-end/47081] New: Macro usage too clever for localization goeran at uddeborg dot se
  2010-12-28 19:21 ` [Bug middle-end/47081] " pinskia at gcc dot gnu.org
  2010-12-28 19:24 ` goeran at uddeborg dot se
@ 2010-12-28 19:44 ` joseph at codesourcery dot com
  2024-06-16 21:24 ` goeran at uddeborg dot se
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: joseph at codesourcery dot com @ 2010-12-28 19:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47081

--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> 2010-12-28 19:44:02 UTC ---
On Tue, 28 Dec 2010, pinskia at gcc dot gnu.org wrote:

> I don't know if generator files should be have translated error messages. 
> Unlike other programs, the gen* programs are only used internally inside gcc.

If Basile's proposal to install gengtype goes ahead, then maybe it should 
all be properly internationalized.  Otherwise, gengtype-state.c should be 
added to po/EXCLUDES.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/47081] Macro usage too clever for localization
  2010-12-28 19:19 [Bug middle-end/47081] New: Macro usage too clever for localization goeran at uddeborg dot se
                   ` (2 preceding siblings ...)
  2010-12-28 19:44 ` joseph at codesourcery dot com
@ 2024-06-16 21:24 ` goeran at uddeborg dot se
  2024-06-17  5:22 ` egallager at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: goeran at uddeborg dot se @ 2024-06-16 21:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Göran Uddeborg <goeran at uddeborg dot se> ---
These messages are no longer included in the po files. I'm not sure exactly
what prevents it; gengtype-state.cc is still not in po/EXCLUDES (while plain
gengtype.cc is). In any case, I would say we can close this report. Does anyone
want it kept open for any reason?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/47081] Macro usage too clever for localization
  2010-12-28 19:19 [Bug middle-end/47081] New: Macro usage too clever for localization goeran at uddeborg dot se
                   ` (3 preceding siblings ...)
  2024-06-16 21:24 ` goeran at uddeborg dot se
@ 2024-06-17  5:22 ` egallager at gcc dot gnu.org
  2024-06-17 17:17 ` jsm28 at gcc dot gnu.org
  2024-06-24 16:06 ` goeran at uddeborg dot se
  6 siblings, 0 replies; 8+ messages in thread
From: egallager at gcc dot gnu.org @ 2024-06-17  5:22 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu.org,
                   |                            |pinskia at gcc dot gnu.org

--- Comment #6 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Göran Uddeborg from comment #5)
> These messages are no longer included in the po files. I'm not sure exactly
> what prevents it; gengtype-state.cc is still not in po/EXCLUDES (while plain
> gengtype.cc is). In any case, I would say we can close this report. Does
> anyone want it kept open for any reason?

I have no objection to closing it, but let's check with Andrew or Joseph
first...

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/47081] Macro usage too clever for localization
  2010-12-28 19:19 [Bug middle-end/47081] New: Macro usage too clever for localization goeran at uddeborg dot se
                   ` (4 preceding siblings ...)
  2024-06-17  5:22 ` egallager at gcc dot gnu.org
@ 2024-06-17 17:17 ` jsm28 at gcc dot gnu.org
  2024-06-24 16:06 ` goeran at uddeborg dot se
  6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2024-06-17 17:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Joseph S. Myers <jsm28 at gcc dot gnu.org> ---
There no longer seems to be a function "fatal" with a parameter using the msgid
naming convention that could be confused with the (non-translating) function
called here, which explains why these messages were (correctly) not extracted
for translation, but were at the time of this bug report. It seems such a
function was removed from collect2 in commit
9e350e99cb9f93ea99216c9c2a40517111636116 (May 2011) and from lto-wrapper in
commit ffb1f5ef12ce9d9994e850d87cbe4116a69d8d90 (June 2014).

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug middle-end/47081] Macro usage too clever for localization
  2010-12-28 19:19 [Bug middle-end/47081] New: Macro usage too clever for localization goeran at uddeborg dot se
                   ` (5 preceding siblings ...)
  2024-06-17 17:17 ` jsm28 at gcc dot gnu.org
@ 2024-06-24 16:06 ` goeran at uddeborg dot se
  6 siblings, 0 replies; 8+ messages in thread
From: goeran at uddeborg dot se @ 2024-06-24 16:06 UTC (permalink / raw)
  To: gcc-bugs

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

Göran Uddeborg <goeran at uddeborg dot se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #8 from Göran Uddeborg <goeran at uddeborg dot se> ---
We seem to agree this can be closed.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-06-24 16:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-28 19:19 [Bug middle-end/47081] New: Macro usage too clever for localization goeran at uddeborg dot se
2010-12-28 19:21 ` [Bug middle-end/47081] " pinskia at gcc dot gnu.org
2010-12-28 19:24 ` goeran at uddeborg dot se
2010-12-28 19:44 ` joseph at codesourcery dot com
2024-06-16 21:24 ` goeran at uddeborg dot se
2024-06-17  5:22 ` egallager at gcc dot gnu.org
2024-06-17 17:17 ` jsm28 at gcc dot gnu.org
2024-06-24 16:06 ` goeran at uddeborg dot se

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).