Skip to content
Commit ad3596fd authored by Miklos Marton's avatar Miklos Marton Committed by Christoph Feck
Browse files

Accept dot as decimal separator even if the decimal separator is comma

... and the group separator is not dot neither comma

There are some software which does not tolerate the locale and producing
float numbers with fixed dot decimal separator.

Copy-pasting data from these software can be painful because kcalc cannot
interpret numbers with dot decimal separators if the locale has comma
decimal separator.

To increase the user experience this patch will allow pasting both
separators if the decimal separator is comma and the thousand-group
separator is not a dot neither a comma. (Usually it is a space).

Reviewers: cfeck, teran

Reviewed by: cfeck

TEST PLAN

* Set some locale where the thousand separator is a space. For e.g.: Hungarian can be set with export LANG=hu_HU.UTF-8
* Paste a number with the proper decimal separator (in the Hungarian example this is comma so the test number example is: 42,42)
* Check if the number pasted correctly
* Paste a number with the another decimal separator (in the Hungarian example this is dot so the test number example is: 42.42)
* Check if the number pasted correctly

Differential Revision: https://phabricator.kde.org/D10555
parent afff5eda
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment