Bug 426442 - xy-Equation doesn't use the correct decimal separator
Summary: xy-Equation doesn't use the correct decimal separator
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: frontend (other bugs)
Version First Reported In: latest
Platform: Debian stable Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Gerlach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-12 12:43 UTC by Orestes Mas
Modified: 2020-09-28 22:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Observed result (23.65 KB, image/png)
2020-09-12 12:43 UTC, Orestes Mas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Orestes Mas 2020-09-12 12:43:02 UTC
Created attachment 131575 [details]
Observed result

SUMMARY
The "x min" and "x max" settings of an equation-generated xy Curve do not accept the comma as a decimal separator when the locale settings specify so (catalan language in my case).


STEPS TO REPRODUCE
0. Set the system locale to one that has the comma as a decimal separator.
1. Add a worksheet with an xy plot on it.
2. Add an xy-Curve from a mathematical equation.
3. Try to input a decimal value into the "x, min" or "x, max" fields.

OBSERVED RESULT
See attached screenshot (note: system locale is in catalan but screenshot strings appear in english because my Labplot is compiled from git and I've not installed the catalan translation manually yet).

EXPECTED RESULT
Be able to use comma as a decimal separator.

SOFTWARE/OS VERSIONS
Linux: 4.19.0-10-amd64
KDE Plasma Version: 5.14.5
KDE Frameworks Version: 5.54.0
Qt Version: 5.11.3
Comment 1 Stefan Gerlach 2020-09-13 09:08:25 UTC
The corresponding inputs parse the given text and the parser currently supports only C locale. We have to extend the parser to support and use the current locale.
Comment 2 Stefan Gerlach 2020-09-28 22:06:39 UTC
Git commit 1e4e1ef5597993bb002848e92748eaa0b15ac63b by Stefan Gerlach.
Committed on 28/09/2020 at 22:05.
Pushed by sgerlach into branch 'master'.

Enable using locale in parser to detect numbers
FIXED-N: 2.8.1

M  +1    -0    ChangeLog
M  +0    -2    src/backend/core/column/Column.cpp
M  +17   -9    src/backend/gsl/ExpressionParser.cpp
M  +2    -3    src/backend/gsl/parser.h
M  +11   -15   src/backend/gsl/parser.y
M  +4    -2    src/backend/lib/Range.h
M  +4    -0    src/backend/lib/macros.h
M  +5    -3    src/backend/worksheet/plots/cartesian/XYFitCurve.cpp
M  +1    -1    src/kdefrontend/SettingsGeneralPage.cpp
M  +4    -2    src/kdefrontend/matrix/MatrixFunctionDialog.cpp

https://invent.kde.org/education/labplot/commit/1e4e1ef5597993bb002848e92748eaa0b15ac63b