-
-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monetary columns and locale sensitive number display #5794
base: development
Are you sure you want to change the base?
Conversation
…ange language+territory codes however, once a Label is created it keeps the particular punctuation etc from the locale when it changed...
…entages well also make sure the doubles in the double array are not sperated by a comma :s
and tweaking the doublevalidator a bit more just convert to english/default locale thing when checking for decimals also add setLocal thing to resultsJsInterface, now to think of where to put that information
Sort of backwards compatible?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to two small suggested changes, there are other potentially serious problems:
- Label-Value combination change is not synchronously? when you change the locale, see that combination it's different.
- Edit value with decimal will crash JASP, error msg:
replaceDoublesTillLabelsRowWithLabels choked on a temp-label that cant be converted to double???
3.While import SPPS_Debug.sav inNumericRestrictedOrdinal
from debug.sav the decimal point mixed both.
and,
. - Maybe setting options should be moved to "Result" and put it with
Table options
together.
@@ -3,30 +3,44 @@ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#include <functional> |
I cannot compiling it without this with MSVC, and buildBot on Windows also failed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ill have a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shun2wang Sorry, I accidentally requested a re-review from you. You can ignore this. |
Yes but do we even want to allow comma's as digital separators? Maybe we should, but it sseems like it could be terribly confusing |
Yeah so the dots/commas is dependent on locale not on the currency. Because otherwise you would get different formatting for lets say, a column of yen next dollars next to euros? Seems unwanted |
Co-authored-by: Shun Wang <[email protected]>
Well, the label is a stringified version of the value, so it has the locale dependent setting.
Editing it in the labeleditor or in the data?
Hey that is a good one, ill have a look.
The language option? |
In the data. |
Hmm, doesnt crash for me on linux, but Ill check later on a windows system |
So you can see the crash also on Linux Debug build while press Enter |
Ah yes, now I can reproduce... |
fixes shuns crash
…ging to the selected language also fix popups
Wel Ive also changed the sorting of the languages and territories a bit, although it will be missing from (some?) of the builds. |
Ok, so now the alternative locale actually gets stored... |
This PR implements https://github.com/jasp-stats/INTERNAL-jasp/issues/1744 where a "monetary" format is added.
The format can just be "monetary" and then by default euro is chosen, to add a currency just do something like "monetary:USD" or "monetary:EUR".
This also implements almost everything in jasp-stats/jasp-issues#39 as far as localizing numbers and money go.
Date, time and or datetime colums are not added in this pr but the localisation stuff added now should help implementing it.
Ill also trigger some builds