https://bugs.kde.org/show_bug.cgi?id=341692

Peter Wu <pe...@lekensteyn.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
     Ever confirmed|0                           |1
         Resolution|WONTFIX                     |---
                 CC|                            |pe...@lekensteyn.nl

--- Comment #4 from Peter Wu <pe...@lekensteyn.nl> ---
The ki18n API appears to support real numbers (of the double type). I intended
to use it like this:

    // double val;
    setSuffix(i18np(" second", " seconds", val));

Corresponding autotests:

    // Anything other than 1 is non-singular.
    QCOMPARE(i18np("second", "seconds", 0.0),
             QString("seconds"));
    QCOMPARE(i18np("second", "seconds", 1.0),
             QString("second"));
    QCOMPARE(i18np("second", "seconds", 1.1),
             QString("seconds"));

The problem however is that the internal implementation only supports integer
numbers. Is it worth supporting this case? (feel free to close if you think it
is not, then the caller will just check val == 1.0 directly).

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to