KLocalizedString regression

Chusslove Illich caslav.ilic at gmx.net
Fri Mar 25 12:45:13 GMT 2011

> [: John Tapsel :]
>   ki18ncp("Units", "%1 second", "%1 seconds").subs(1.1, 0, 'f', 1).toString()
> used to work (return "1.1 seconds") but now it returns ("1.1
> seconds(I18N_PLURAL_ARGUMENT_MISSING)") which screws up my graphing
> widget.

This is the way it (should have) always worked. The plural call expects to
get an integer, and if does not, it shows this warning (in debug build, not
in release build).

On the language level, plural declination kicks in only on integer values,
while real values always get plural form. This seems to hold for all
languages currently known in KDE. In English, all of "1.0 seconds",
"1.1 seconds", "1.3 seconds", and "2.3 seconds", are (?) both correct and
expected forms, as opposed to "1 second" and "2 seconds".

Chusslove Illich (Часлав Илић)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20110325/fc330c14/attachment.sig>

More information about the kde-core-devel mailing list