-
Notifications
You must be signed in to change notification settings - Fork 636
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
DYN-6526 Converter Culture Bug Swedish #15587
DYN-6526 Converter Culture Bug Swedish #15587
Conversation
When loading a dyn file that contains a Number with value 0.25 the converter was converting the value to 25.00 showing this value in the Number node. For fixing this I just set the InvariantCulture in the Converter.
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.
See the ticket for this pull request: https://jira.autodesk.com/browse/DYN-6526
UI Smoke TestsTest: success. 11 passed, 0 failed. |
Would you add a test or update a test? hmm thinking about this a bit more, seems a unit test would not make a diff because the output expectation was related to system culture.. Maybe this is good for now. Do we also only display number without |
I find this change kind of strange... it seems like you are overriding the purpose of this converter - maybe it shouldn't exist at all anymore? Also you can test it by changing the thread culture and then changing it back, I think there are other tests like this. |
@RobertGlobant20 sorry - didn't mean to close, hit the wrong button. |
@QilongTang I think we are not supporting creating unit test in other languages.
@QilongTang as we discussed in the standup I cannot add a unit test for Dynamo in another language. For the other case if the language = Czech (Swedish OS) consider that we have the value "0.25 " in the Number node If the user inserts a "," instead of "." is replaced automatically by "." and the new value is "250.000" (and is serialized in the same way). Let me know if is the expected behavior |
@mjkkirschner correct me if I´m wrong but the converter is adding the PrecisionFormat to the string so for example if you enter "2.5" and the NumberFormat in Preferences is 0.000 then will be showing the value "2.500", then I guess it should exist. |
@RobertGlobant20 that makes sense, missed the precision format. |
@RobertGlobant20 Please cherry-pick |
@QilongTang @RobertGlobant20 can you explain why changing the thread culture does not work for creating a test? |
@mjkkirschner for reproducing this particular case we need to have a OS in Sweedish Language (including Region and Region Format) and Dynamo for Civil3D (in Sandbox and Revit is not reproducible) should be in Czech language, was reported that for other languages like English or Spanish is not reproducible. |
Purpose
Fixing Culture in Converter used in the Number node.
In Civil3D when loading a dyn file that contains a Number with value 0.25 the converter was converting the value to 25.00 showing this value in the Number node (due that the CurrentCulture is "sv-FI"). For fixing this I just set the InvariantCulture in the Converter.
Declarations
Check these if you believe they are true
*.resx
filesRelease Notes
Fixing Culture in Converter used in the Number node.
Reviewers
@QilongTang
FYIs