[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: address@hidden: GNU Coding Standards, internatialisation and plurals
Re: address@hidden: GNU Coding Standards, internatialisation and plurals]
Fri, 19 May 2006 16:40:33 -0700
Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)
address@hidden (Karl Berry) writes:
> printf ((nfiles != 1 ? "%d files processed"
> : "%d file processed"),
> This has the problem that not all languages treat singular and plural
> the same way as English.
It might be helpful to recommend diagnostics that don't use singular
or plural at all, e.g.:
printf ("Files processed: %d", nfiles);
This is equally awkward in almost all languages (:-), and bypasses the
Another possibility is to update the recommendation to match the state
of the latest gettext. (To be honest, I don't know what that is.)
We could do both, too.
> Another thing worth mentioning is that it is better to limit strings
> to be translated to one number argument per sentence unit (i.e.
> "Searched %d directories. Found %d files" or "Searched %d
> directories and found %d files" rather than "Found %d files in %d
> directories") as some languages may prefer to express the arguments in
> reverse order ("In %d directories found %d files"), which printf would
> probably not take kindly to.
This point doesn't make sense to me. First, the translation need not
use the same number of sentences as the original. Second,
translations generally can assume the %$n notation, which lets the
translator reorder the arguments.