[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gettext and plurals
Marcin 'Qrczak' Kowalczyk wrote on 2000-01-31 15:19 UTC:
> > According to [1], there are languages with more than singular
> > and plural:
>
> It's worse in Polish, Russian and other Slavic languages.
The proper thing to do is to avoid using numbers inside English
sentences where this is feasible.
Good programming style:
printf("New mails: %d", n);
Bad programming style:
printf("You have %d new mail%s.", n, n==1 ? "" : "s");
One is as user friendly and neat as the other. In fact keeping the
number out of the sentence will make parsing the output for the brain of
the experienced user (and also post-processing software!) much faster
and simpler.
Similarly for dates: Instead of writing out a date as "This message was
delivered on 3rd February, 2000", better write "Message delivered:
2000-02-03".
Adding lots of complexity to message substitution mechanisms to handle
plurals, ordinal numbers, dates, etc. has nothing to do with user
friendliness. Avoiding dependencies of the phrases from numeric output
often leads to much shorter and easier to recognize output anyway, even
in English.
Program translators should provide feedback and patches to developers
where these used unfortunate message constructs that are difficult to
translate. In these cases, the English source version has to be
simplified.
Markus
--
Markus G. Kuhn, Computer Laboratory, University of Cambridge, UK
Email: mkuhn at acm.org, WWW: <http://www.cl.cam.ac.uk/~mgk25/>
-
Linux-UTF8: i18n of Linux on all levels
Archive: http://mail.nl.linux.org/lists/