[cfe-commits] r59803 - in /cfe/trunk:

Chris Lattner clattner at apple.com
Fri Nov 21 15:52:45 PST 2008


On Nov 21, 2008, at 3:05 PM, C├ędric Venet wrote:
> Wouldn't it be better to have a translation specific describing the
> plural form instead of specifying it each time. Something like:
>
> /// Polish
> DEFINE_PLURAL_MODEL("{1:form0|:form1}");
> DIAG(diag,"%0 %plural{form0|form1}0");
>
> /// Polish
> DEFINE_PLURAL_MODEL("{1:0|%100=(10,20):2|%10=(2,4):1|:2}");
> DIAG(diag,"%0 %plural{form0|form1|form2}0");
>
> for exception, we could style use your %case specifier.

I don't think there is a need to do this, just use string concatenation:

#define MY_PLURAL_THING "whatever"

DIAG(diag,"%0 %plural{" MY_PLURAL_THING "form0|form1|form2}0");

Or whatever you want.  That way long common sequences can be factored  
between diagnostics.

-Chris



More information about the cfe-commits mailing list