[Bug translation/80191] diagnostic placeholder "new initializer" must be marked for translation

msebor at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Dec 19 17:19:00 GMT 2018


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

--- Comment #10 from Martin Sebor <msebor at gcc dot gnu.org> ---
I think quoting/translating grammar terms is a general problem in the C++
front-end (perhaps to a lesser extent also in the rest of GCC as well).  The
inconsistencies it leads to can be seen in the translated messages.  For
instance, de.po has these two messages:

#: cp/init.c:2906
#, gcc-internal-format
msgid "array size in new-expression must be constant"
msgstr "Arraygröße in »new«-Ausdruck muss konstant sein"

and

#: cp/parser.c:8454
#, gcc-internal-format
msgid "initialization of new-expression for type %<auto%> requires exactly one
element"
msgstr "Initialisierung des new-Ausdrucks für Typ %<auto%> erfordert genau ein
Element"

In the first one, 'new' is quoted as if it was a keyword, but in the second one
it isn't (as it shouldn't be).

Another example is one of inconsistent translation (it's not the fault of the
translator -- the msgid mixes plain English text with a grammar term/expression
syntax without making it clear what ends where):

#: cp/parser.c:37546
#, gcc-internal-format
msgid "expected id-expression (arguments)"
msgstr "»id-expression (arguments)« erwartet"

#: cp/parser.c:5790
#, gcc-internal-format
msgid "expected id-expression"
msgstr "ID-Ausdruck erwartet"

I don't know what the text of the C++ standard reads like in German to say what
the right way to  solve this is.  Does the German text refer to 'new'-Ausdruck
in the grammar, or does it use '/new-expression/' like the English edition, or
something else?

Roland?

(GCC is also inconsistent in the hyphenation of grammar terms like
"constant-expression" and so is the translation.)


More information about the Gcc-bugs mailing list