public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38761]  New: %s substituted with regular word can't be properly translated
@ 2009-01-07 21:34 goeran at uddeborg dot se
  2009-01-07 21:39 ` Andrew Thomas Pinski
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: goeran at uddeborg dot se @ 2009-01-07 21:34 UTC (permalink / raw)
  To: gcc-bugs

In gcc/cp/parser.c there is this code in cp_parser_parameter_declaration

            error ("%H%sparameter pack %qD cannot have a default argument",
                   &declarator_token_start->location,
                   kind, id_declarator->u.id.unqualified_name);
          else
            error ("%H%sparameter pack cannot have a default argument",
                   &declarator_token_start->location, kind);

where "kind" has previously been assigned either the empty string or the word
"template" followed by a space.  There is no way to translate the word
"template".  For this to work in all languages, I suspect the two messages
needs to be split up in four complete messages, with and without "template",
rather than composed from pieces like this.


-- 
           Summary: %s substituted with regular word can't be properly
                    translated
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: goeran at uddeborg dot se


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


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

* [Bug c++/38761] %s substituted with regular word can't be properly translated
  2009-01-07 21:34 [Bug c++/38761] New: %s substituted with regular word can't be properly translated goeran at uddeborg dot se
  2009-01-07 21:39 ` Andrew Thomas Pinski
@ 2009-01-07 21:39 ` pinskia at gmail dot com
  2009-01-07 21:52 ` goeran at uddeborg dot se
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: pinskia at gmail dot com @ 2009-01-07 21:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gmail dot com  2009-01-07 21:39 -------
Subject: Re:   New: %s substituted with regular word can't be properly
translated

Well template here might be consider the keyword template.  So we  
either have template argument or just argument. Translating template  
might cause more confusion.

Sent from my iPhone

On Jan 7, 2009, at 1:34 PM, "goeran at uddeborg dot se"
<gcc-bugzilla@gcc.gnu.org 
 > wrote:

> In gcc/cp/parser.c there is this code in  
> cp_parser_parameter_declaration
>
>            error ("%H%sparameter pack %qD cannot have a default  
> argument",
>                   &declarator_token_start->location,
>                   kind, id_declarator->u.id.unqualified_name);
>          else
>            error ("%H%sparameter pack cannot have a default argument",
>                   &declarator_token_start->location, kind);
>
> where "kind" has previously been assigned either the empty string or  
> the word
> "template" followed by a space.  There is no way to translate the word
> "template".  For this to work in all languages, I suspect the two  
> messages
> needs to be split up in four complete messages, with and without  
> "template",
> rather than composed from pieces like this.
>
>
> -- 
>           Summary: %s substituted with regular word can't be properly
>                    translated
>           Product: gcc
>           Version: 4.4.0
>            Status: UNCONFIRMED
>          Severity: minor
>          Priority: P3
>         Component: c++
>        AssignedTo: unassigned at gcc dot gnu dot org
>        ReportedBy: goeran at uddeborg dot se
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38761
>


-- 


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


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

* Re: [Bug c++/38761]  New: %s substituted with regular word can't be properly translated
  2009-01-07 21:34 [Bug c++/38761] New: %s substituted with regular word can't be properly translated goeran at uddeborg dot se
@ 2009-01-07 21:39 ` Andrew Thomas Pinski
  2009-01-07 21:39 ` [Bug c++/38761] " pinskia at gmail dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Andrew Thomas Pinski @ 2009-01-07 21:39 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

Well template here might be consider the keyword template.  So we  
either have template argument or just argument. Translating template  
might cause more confusion.

Sent from my iPhone

On Jan 7, 2009, at 1:34 PM, "goeran at uddeborg dot se" <gcc-bugzilla@gcc.gnu.org 
 > wrote:

> In gcc/cp/parser.c there is this code in  
> cp_parser_parameter_declaration
>
>            error ("%H%sparameter pack %qD cannot have a default  
> argument",
>                   &declarator_token_start->location,
>                   kind, id_declarator->u.id.unqualified_name);
>          else
>            error ("%H%sparameter pack cannot have a default argument",
>                   &declarator_token_start->location, kind);
>
> where "kind" has previously been assigned either the empty string or  
> the word
> "template" followed by a space.  There is no way to translate the word
> "template".  For this to work in all languages, I suspect the two  
> messages
> needs to be split up in four complete messages, with and without  
> "template",
> rather than composed from pieces like this.
>
>
> -- 
>           Summary: %s substituted with regular word can't be properly
>                    translated
>           Product: gcc
>           Version: 4.4.0
>            Status: UNCONFIRMED
>          Severity: minor
>          Priority: P3
>         Component: c++
>        AssignedTo: unassigned at gcc dot gnu dot org
>        ReportedBy: goeran at uddeborg dot se
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38761
>


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

* [Bug c++/38761] %s substituted with regular word can't be properly translated
  2009-01-07 21:34 [Bug c++/38761] New: %s substituted with regular word can't be properly translated goeran at uddeborg dot se
  2009-01-07 21:39 ` Andrew Thomas Pinski
  2009-01-07 21:39 ` [Bug c++/38761] " pinskia at gmail dot com
@ 2009-01-07 21:52 ` goeran at uddeborg dot se
  2009-01-30 15:46 ` bangerth at gmail dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: goeran at uddeborg dot se @ 2009-01-07 21:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from goeran at uddeborg dot se  2009-01-07 21:52 -------
(In reply to comment #1)
> Well template here might be consider the keyword template.

It COULD, but I would argue that would break the style of other messages.  The
word "template" is used in many messages, sometimes in different forms like
"templates" and "templetized".  The use in this particular message isn't
stylistically different from any other message.

Maybe more importantly, it wouldn't really help.  If I were to translate this
message in a way that treated "template" as an untranslatable keyword, I would
rewrite it to something analogous to

  parameter pack %qD of %s ...

But that only works as long as "kind" becomes SOME keyword.  If it is empty, I
do of course not want any "of".

(I would have to add $-directives to change the order too, but I omitted that
here for simplicity.)


-- 


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


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

* [Bug c++/38761] %s substituted with regular word can't be properly translated
  2009-01-07 21:34 [Bug c++/38761] New: %s substituted with regular word can't be properly translated goeran at uddeborg dot se
                   ` (2 preceding siblings ...)
  2009-01-07 21:52 ` goeran at uddeborg dot se
@ 2009-01-30 15:46 ` bangerth at gmail dot com
  2009-11-12  8:07 ` pearly dot zhao at oracle dot com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: bangerth at gmail dot com @ 2009-01-30 15:46 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from bangerth at gmail dot com  2009-01-30 15:45 -------
Confirmed. There is no need to convolve error messages like that.
W.


-- 

bangerth at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |diagnostic
   Last reconfirmed|0000-00-00 00:00:00         |2009-01-30 15:45:56
               date|                            |


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


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

* [Bug c++/38761] %s substituted with regular word can't be properly translated
  2009-01-07 21:34 [Bug c++/38761] New: %s substituted with regular word can't be properly translated goeran at uddeborg dot se
                   ` (3 preceding siblings ...)
  2009-01-30 15:46 ` bangerth at gmail dot com
@ 2009-11-12  8:07 ` pearly dot zhao at oracle dot com
  2009-11-12 21:14 ` goeran at uddeborg dot se
  2009-11-13  3:44 ` pearly dot zhao at oracle dot com
  6 siblings, 0 replies; 12+ messages in thread
From: pearly dot zhao at oracle dot com @ 2009-11-12  8:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pearly dot zhao at oracle dot com  2009-11-12 08:07 -------
The two messages are be split up with and without "template" already at the
current trunk. I think it was fixed at revision 149277.
Can this bug be closed?


-- 


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


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

* [Bug c++/38761] %s substituted with regular word can't be properly translated
  2009-01-07 21:34 [Bug c++/38761] New: %s substituted with regular word can't be properly translated goeran at uddeborg dot se
                   ` (4 preceding siblings ...)
  2009-11-12  8:07 ` pearly dot zhao at oracle dot com
@ 2009-11-12 21:14 ` goeran at uddeborg dot se
  2009-11-13  3:44 ` pearly dot zhao at oracle dot com
  6 siblings, 0 replies; 12+ messages in thread
From: goeran at uddeborg dot se @ 2009-11-12 21:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from goeran at uddeborg dot se  2009-11-12 21:14 -------
I took a look at the code in the web svn.  The messages as such look fine now. 
They should be readily translatable.

But I don't think xgettext will pick up both strings for translation, when the
argument is a conditional expression like that.  At least not in a simple test
case I made.  Only the first string was extracted.  But maybe you run xgettext
in some more advanced way in the gcc framework?  Otherwise, some markers for
gettext are probably also necessary.


-- 


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


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

* [Bug c++/38761] %s substituted with regular word can't be properly translated
  2009-01-07 21:34 [Bug c++/38761] New: %s substituted with regular word can't be properly translated goeran at uddeborg dot se
                   ` (5 preceding siblings ...)
  2009-11-12 21:14 ` goeran at uddeborg dot se
@ 2009-11-13  3:44 ` pearly dot zhao at oracle dot com
  6 siblings, 0 replies; 12+ messages in thread
From: pearly dot zhao at oracle dot com @ 2009-11-13  3:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pearly dot zhao at oracle dot com  2009-11-13 03:44 -------
I have run with gettext 0.14.6 not the latest one 0.17. Bug 40872 meet the same
problem.


-- 


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


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

* [Bug c++/38761] %s substituted with regular word can't be properly translated
       [not found] <bug-38761-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-10-19 12:52 ` paolo at gcc dot gnu.org
@ 2011-10-19 12:53 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 12+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-19 12:53 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #10 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-19 12:53:07 UTC ---
Fixed.


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

* [Bug c++/38761] %s substituted with regular word can't be properly translated
       [not found] <bug-38761-4@http.gcc.gnu.org/bugzilla/>
  2011-10-19  0:12 ` paolo.carlini at oracle dot com
  2011-10-19 10:55 ` paolo.carlini at oracle dot com
@ 2011-10-19 12:52 ` paolo at gcc dot gnu.org
  2011-10-19 12:53 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 12+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-10-19 12:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-10-19 12:46:47 UTC ---
Author: paolo
Date: Wed Oct 19 12:46:42 2011
New Revision: 180185

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180185
Log:
2011-10-19  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/38761
    PR c++/40872
    * decl.c (duplicate_decls, make_typename_type, grokdeclarator): Use
    G_() in error message strings to facilitate translation.
    * semantics.c (finish_id_expression): Likewise.
    * parser.c (cp_parser_nested_name_specifier_opt,
    cp_parser_parameter_declaration): Likewise.

Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/semantics.c


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

* [Bug c++/38761] %s substituted with regular word can't be properly translated
       [not found] <bug-38761-4@http.gcc.gnu.org/bugzilla/>
  2011-10-19  0:12 ` paolo.carlini at oracle dot com
@ 2011-10-19 10:55 ` paolo.carlini at oracle dot com
  2011-10-19 12:52 ` paolo at gcc dot gnu.org
  2011-10-19 12:53 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 12+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-19 10:55 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|gcc-bugs at gcc dot         |
                   |gnu.org, paolo.carlini at   |
                   |oracle dot com              |
         AssignedTo|unassigned at gcc dot       |paolo.carlini at oracle dot
                   |gnu.org                     |com

--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-19 10:54:19 UTC ---
I just checked 0.18.1 and is still unable to extract from conditional
expressions. I guess we want to add a few more G_(), as also pointed out
elsewhere. I'll do it.


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

* [Bug c++/38761] %s substituted with regular word can't be properly translated
       [not found] <bug-38761-4@http.gcc.gnu.org/bugzilla/>
@ 2011-10-19  0:12 ` paolo.carlini at oracle dot com
  2011-10-19 10:55 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-10-19  0:12 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jsm28 at gcc dot gnu.org,
                   |                            |paolo.carlini at oracle dot
                   |                            |com

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-10-19 00:11:20 UTC ---
Joseph, I wish we could resolve this PR for good. Can you help me understanding
this issue with the various gettext versions? Would it make sense to just have
separate error_at calls for template_parm_p true and false and be done with it?
(PR40872 may be also relevant)


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

end of thread, other threads:[~2011-10-19 12:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-07 21:34 [Bug c++/38761] New: %s substituted with regular word can't be properly translated goeran at uddeborg dot se
2009-01-07 21:39 ` Andrew Thomas Pinski
2009-01-07 21:39 ` [Bug c++/38761] " pinskia at gmail dot com
2009-01-07 21:52 ` goeran at uddeborg dot se
2009-01-30 15:46 ` bangerth at gmail dot com
2009-11-12  8:07 ` pearly dot zhao at oracle dot com
2009-11-12 21:14 ` goeran at uddeborg dot se
2009-11-13  3:44 ` pearly dot zhao at oracle dot com
     [not found] <bug-38761-4@http.gcc.gnu.org/bugzilla/>
2011-10-19  0:12 ` paolo.carlini at oracle dot com
2011-10-19 10:55 ` paolo.carlini at oracle dot com
2011-10-19 12:52 ` paolo at gcc dot gnu.org
2011-10-19 12:53 ` paolo.carlini at oracle dot com

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