Bug 178169 - KAlgebra application and applet doesn’t use correct decimal separator some places
Summary: KAlgebra application and applet doesn’t use correct decimal separator some pl...
Status: CONFIRMED
Alias: None
Product: kalgebra
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Aleix Pol
URL:
Keywords:
: 259650 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-19 14:12 UTC by Karl Ove Hufthammer
Modified: 2018-07-16 20:19 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2008-12-19 14:12:39 UTC
Version:            (using Devel)
Installed from:    Compiled sources

The KAlgebra calculator applet doesn’t use the correct decimal 
separator in output (e.g., a comma instead of a period for Norwegian Nynorsk), and if you try to use a comma in
input, it gives a not to helpful error message (‘Expected
'end of file' instead of ,’)

The KAlgebra application does use the correct decimal 
separator for the main display, but not for the list of 
variables pane on the right, and not for the numbers on
the graph displays. In addition, it doesn’t support
the comma as a decimal separator for *input*, which is very
confusing to the user. (I guess one reason would be that
KAlgebra supports multi-argument functions separated by
comma, but localised spreadsheets handle this by having a
separate list character, usually the semi-colon for locales
where the comma is used as the decimal separator, so there
is no reason to fix this.)
Comment 1 Aleix Pol 2008-12-28 16:00:40 UTC
Yes it is true.
After talking about that with some people I have been convinced that this can be a problem (more or less :P).

I'll try to figure out a proper fix for that for 4.3. I don't think I should fix that right now (i don't have much time by now). I'll look into that though.

Thanks for reporting :)
Comment 2 Aleix Pol 2010-12-14 02:22:25 UTC
*** Bug 259650 has been marked as a duplicate of this bug. ***
Comment 3 Karl Ove Hufthammer 2018-07-16 18:38:30 UTC
Still valid for KAlgebra 18.04.2. That is, in the list of variables, the number is properly formatted (e.g. with a comma instead of a period). But in the tooltip, it’s not (it always uses a period as decimal separator). (The actual ‘Calculator’ pane is always empty, for some reason.)
Comment 4 Karl Ove Hufthammer 2018-07-16 20:19:36 UTC
BTW, Qt now has functions for locale-aware parsing of numbers:
https://doc.qt.io/qt-5/qlocale.html#toDouble
https://doc.qt.io/qt-5/qml-qtqml-number.html