This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc/cp/pt.c: use ngettext() when needed



Marco, xgettext can't accept the --flag argument that have more than one
argnums. It will have the argnums like 2,3 if the above code added.

Not true:


     If KEYWORDSPEC is
     of the form `ID:ARGNUM1,ARGNUM2', `xgettext' looks for strings in
     the ARGNUM1st argument and in the ARGNUM2nd argument of the call,
     and treats them as singular/plural variants for a message with
     plural handling.

How about to only use the conditional expression like

error (TREE_VEC_LENGTH (parms) > 1
? G_("redeclared with %d template parameters")
: G_("redeclared with %d template parameter"),
TREE_VEC_LENGTH (parms));

it changed less to fix this problem.

It wouldn't work for all Slavic and Baltic languages (and a few others), where you have multiple plural forms.


Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]