I think there are some missing words in "R Internals"'s description of the P_ macro. It currently has "A macro as a wrapper for ngettext", which I think ought to be something like "The macro P_ may be used as a wrapper for ngettext".
The following patch also makes the 2 alternate definitions of P_ have the same argument names, StringS and StringP. Expanding the S and P to Singular and Plural, would be more descriptive. Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com Index: doc/manual/R-ints.texi =================================================================== --- doc/manual/R-ints.texi (revision 48294) +++ doc/manual/R-ints.texi (working copy) @@ -2149,17 +2149,18 @@ @noindent from @file{src/main/errors.c}. -A macro +The @code{P_} macro @example #ifdef ENABLE_NLS #define P_(StringS, StringP, N) ngettext (StringS, StringP, N) #else -#define P_(String, StringP, N) (N > 1 ? StringP: String) +#define P_(StringS, StringP, N) (N > 1 ? StringP: StringS) #endif @end example @noindent +may be used as a wrapper for @code{ngettext}: however in some cases the preferred approach has been to conditionalize (on @code{ENABLE_NLS}) code using @code{ngettext}. ______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel