i18n change: no more %n in plural calls

Chusslove Illich caslav.ilic at gmx.net
Mon Feb 12 15:15:35 GMT 2007


I have just committed the changed handling of i18n plural code, so that 
special %n placeholder is no longer used. Eg. what was before:

i18n("One file in folder %1", "%n files in folder %1", nfiles, folder);

is now:

i18n("One file in folder %2", "%1 files in folder %2", nfiles, folder);

The plural form is decided by first integer-valued argument, so it does not 
have to be provided as %1.

The code in trunk/KDE is already converted, and for the already ported KDE4 
code that you might have outside of there, you can use the following script 
to make the conversion:

branches/work/kde4-l10n/scripts/conversion/i18nconvplural.pl

(you can run it without arguments in top directory of your sources, or 
provide paths as arguments).

-- 
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/20070212/246541e3/attachment.sig>


More information about the kde-core-devel mailing list