Removing %n in plural i18n calls

Chusslove Illich caslav.ilic at gmx.net
Sun Feb 11 17:31:24 GMT 2007


> [: Krzysztof Lichota :]
> Wouldn't it be better to get rid of i18np() at all and make plurals
> detection automatic? [...] For example:
> i18n("%1 files were moved").arg(numFiles)

If you could deliver a proper translated form, than this would be possible. 
But that would require a whole new translator-side system, as Gettext 
relies on programmer providing singular/plural both in order to extract 
such strings, and to present them in PO files.

On the other hand, I think it is also nice for a programmer to use two 
parameter call, in order not to have to use if (n == 1) ... else ...; all 
the time.

-- 
Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070211/da1622b1/attachment.sig>


More information about the kde-core-devel mailing list