Slingshot Calc and Pantheon Calc don't agree on decimal point
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Calculator |
New
|
Undecided
|
elementary UX | ||
Slingshot |
New
|
Medium
|
Unassigned |
Bug Description
When date/number locale is set to pt_PT:
On Slingshot:
"3.2 + 3.4" -> returns 6,6
"3,2 + 3,4" -> returns 6,6
On pantheon-calc:
"3,2 + 3,4" -> returns 6,6
"3.2 + 3.4" -> returns " '.' is unknown"
When date/number locale is set to en_UK:
On Slingshot:
"3.2 + 3.4" -> returns 6,6
"3,2 + 3,4" -> returns 6,6
On pantheon-calc:
"3,2 + 3,4" -> returns " ',' is unknown"
"3.2 + 3.4" -> returns 6.6
I understand pantheon-calc is more intelligent checking the locale setting for numbers for the proper decimal point but it seems inconsistent across the system.
I've changed around some code in pantheon-calc for it to accept both but it's more of a question of:
"Should slingshot calc respect date/number locale settings as well or should pantheon-calc accept both ',' and '.' as decimal points."
tags: |
added: decimal pantheon-calc points removed: panth-calc |
Changed in pantheon-calculator: | |
assignee: | nobody → elementary UX (elementary-design) |
Changed in slingshot: | |
milestone: | none → loki-beta1 |
Changed in slingshot: | |
importance: | Undecided → Medium |
This should probably be solved by having pantheon-calculator provide the logic for the calculator plugin to Slingshot.
In other words, Slingshot should just send the string to pantheon calculator and pantheon calculator should do the math.