[Bug c++/38761] New: %s substituted with regular word can't be properly translated

View: New views
8 Messages — Rating Filter:   Alert me  

[Bug c++/38761] New: %s substituted with regular word can't be properly translated

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


Re: [Bug c++/38761] New: %s substituted with regular word can't be properly translated

by Andrew Pinski-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

[Bug c++/38761] %s substituted with regular word can't be properly translated

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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


[Bug c++/38761] %s substituted with regular word can't be properly translated

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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


[Bug c++/38761] %s substituted with regular word can't be properly translated

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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


[Bug c++/38761] %s substituted with regular word can't be properly translated

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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


[Bug c++/38761] %s substituted with regular word can't be properly translated

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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


[Bug c++/38761] %s substituted with regular word can't be properly translated

by Bugzilla from gcc-bugzilla@gcc.gnu.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



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