Now you can enter "1 minute" and it will be parsed correctly
- Group Reviewers
- R119:78ccc2eba9cb: [KCMs/Night Color] Add a valueForText handler for the new SpinBox
Enter "1 minute" and tab away from the box
Uh, I don't use Ukrainian locale. However, it doesn't matter that much. We format numbers practically the same way as in en_US.
Given the current implementation of textFromValue and the fact that the maximum value of transTimeField is capped, this change is good to go. However, it would be great to respect the user's locale.
I agree. Since there are other textFromValue implementations in plasma-desktop that don't do this, it would probably make sense to do them all at once. I'll see if I can figure out how.
Looks like parseInt() won't work for non-ASCII digits and for languages where the number of minutes does not come first in the phrase, see Sinhala language:
ro Romanian : %1 minute ru Russian : %1 минуты gd Scottish Gaelic : %1 m(h)ionaid(ean) sr Serbian : %1 минута si Sinhala : මිනිත්තු %1
Examples of non-ASCII digits:
Original Message: Every 30 Minutes Farsi (Persian) : هر ۳۰ دقیقه Khmer : រៀងរាល់ ៣០ នាទី Nepali : प्रत्येक ३० मिनेटमा