Removing %n in plural i18n calls
Krzysztof Lichota
krzysiek at lichota.net
Mon Feb 12 14:35:05 GMT 2007
Chusslove Illich napisaĆ(a):
>> [: 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.
The strings would be extracted as singular form, the translator could
transform them to plural.
> 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.
Programmer would specify only plural form ("%1 files copied"). Providing
"%1 file copied" would be up to translation team.
Krzysztof Lichota
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070212/d7810955/attachment.sig>
More information about the kde-core-devel
mailing list