Bug 304442 - Calculator doesn't work well with locales using comma instead of point.
Summary: Calculator doesn't work well with locales using comma instead of point.
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: calculator (show other bugs)
Version: 4.8.4
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 266886 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-08-02 15:18 UTC by Jarno van der Kolk
Modified: 2019-04-10 05:37 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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