[frameworks-ki18n] [Bug 341692] Need plural form format for real numbers
https://bugs.kde.org/show_bug.cgi?id=341692 --- Comment #7 from Albert Astals Cid--- Actually that unittest doesn't work -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ki18n] [Bug 341692] Need plural form format for real numbers
https://bugs.kde.org/show_bug.cgi?id=341692 Albert Astals Cidchanged: What|Removed |Added Status|REOPENED|RESOLVED Resolution|--- |FIXED --- Comment #6 from Albert Astals Cid --- // 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")); That's what is expected of it, so closing -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ki18n] [Bug 341692] Need plural form format for real numbers
https://bugs.kde.org/show_bug.cgi?id=341692 Albert Astals Cidchanged: What|Removed |Added CC||aa...@kde.org -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ki18n] [Bug 341692] Need plural form format for real numbers
https://bugs.kde.org/show_bug.cgi?id=341692 Alexander Potashevchanged: What|Removed |Added CC||aspotas...@gmail.com --- Comment #5 from Alexander Potashev --- (In reply to Peter Wu from comment #4) > QCOMPARE(i18np("second", "seconds", 1.0), > QString("second")); > QCOMPARE(i18np("second", "seconds", 1.1), > QString("seconds")); This doesn't work for Scottish Gaelic: as mentioned above, translation for a real number X should be the same as for floor(X). Here you have "1.0 second" and "1.1 seconds". For Russian language, I need 1. standard plural forms for integer values (0, 1, 2, 3, ...) and 2. another fixed translation for the case when the real number becomes non-integer, no matter how large is its integer part. -- You are receiving this mail because: You are watching all bug changes.
[frameworks-ki18n] [Bug 341692] Need plural form format for real numbers
https://bugs.kde.org/show_bug.cgi?id=341692 Peter Wuchanged: What|Removed |Added Status|RESOLVED|REOPENED Ever confirmed|0 |1 Resolution|WONTFIX |--- CC||pe...@lekensteyn.nl --- Comment #4 from Peter Wu --- 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.