Bug 304442

Summary: Calculator doesn't work well with locales using comma instead of point.
Product: [Plasma] krunner Reporter: Jarno van der Kolk <jarno>
Component: calculatorAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: bugs.kde.org, KaiUweBroulik2, kde
Priority: NOR    
Version: 4.8.4   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=406388
Latest Commit: Version Fixed In:

Description Jarno van der Kolk 2012-08-02 15:18:50 UTC
I have the Dutch locale, which means that decimal numbers are written as: 1.234,56. That is, the comma is used to indicate the decimals instead of the English point.
When I enter a calculation in krunner I have to enter it as follows:
=12.50+25.06
Then answer I get is
37,56
As you can see, the answer is written in the correct way for the current locale, but the input has to be written in the 'wrong' form.
Also, when I press <Enter>, the answer is copied back into the input field with the comma, so the input field then reads "= 37,56". The output the Calculator plugin then shows as [37; 56].


Reproducible: Always

Steps to Reproduce:
1. Use the Dutch locale (or any locale using commas to separate the decimal part)
2. In krunner, enter "=12.50+25.06" (without quotes)
3. The answer is then "37,56" (without quotes)
4. Press <Enter>
5. The input field will read "= 37,56" (without quotes)

Actual Results:  
The output field will read "[37; 56]" (without quotes)

Expected Results:  
I would expect "37,56" again. Also the input should not use the point, but a comma. I.e. I should be able to enter the calculations as "=12,50+25,06".
Comment 1 Christoph Feck 2013-12-31 04:29:25 UTC
*** Bug 266886 has been marked as a duplicate of this bug. ***
Comment 2 Erik Quaeghebeur 2018-01-31 13:11:39 UTC
With krunner 5.40.0 and libqalculate 0.9.9 this is fixed (probably earlier). I can mix ‘.’ and ‘,’ as separator, or use either and the result will use ‘,’ and not give vector output after pressing enter.

So this report can be closed as fixed.
Comment 3 David Edmundson 2018-01-31 13:13:03 UTC
thanks for reporting back