[cfe-dev] Diagnostic Improvements

Nuno Lopes nunoplopes at sapo.pt
Tue Nov 18 08:25:45 PST 2008


> DIAG(err_operator_overload_must_be_binary, ERROR,
>      "overloaded '%0' must be a binary operator (has %u1 parameter
> %up1)")
>
> Where %u1 prints the unsigned, and %up1 (p=plural, or pick a better
> letter) prints a "s" if the unsigned is != 1, or nothing if it is.
>
> Does this seem like a reasonable thing to do?  Does anyone volunteer
> to start tackling it?

Well, if you really want to have good localization, you simply can't do it. 
Plural is very tricky is other languages than English. Even in english 
you've many exceptions (e.g. one mouse -> two mice; one child -> two 
children; etc..). In German it's very complex: there are 7 different rules 
(AFAIR) and tons of exceptions, so..
Not really important, but I though I could share this info before you make 
any decision.

Nuno 




More information about the cfe-dev mailing list