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

Improper localization behavior for "Specific heat (cal/(g*K))" #77

Closed
renato opened this Issue Aug 31, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@renato
Copy link

renato commented Aug 31, 2015

When I change the Specific Heat field in the Equipment Editor and type, for instance, "0,215", it shows as "0,215" and is apparently save correctly because when I save and re-open the Editor, it is still showing as "0,215".

However, I can verify it's not yet persisted as it's not used in the "Mash wiz".

When I close Brewtarget and re-open it, the Specific heat for the same Equipment is now shown as "215,000", and the "Mash wiz", using this as specific heat, suggests an Infusion Temp of "519.536,000 C".

If I open with LC_ALL=en_US.UTF-8, then the Specific heat is shown correctly as 0.215.

This issue is likely related to #65, because it goes through Brewtarget::toDouble() which uses QLocale.toDouble():
https://github.com/Brewtarget/brewtarget/blob/master/src/equipment.cpp#L452
https://github.com/Brewtarget/brewtarget/blob/master/src/brewtarget.cpp#L1069

@rocketman768 rocketman768 self-assigned this Sep 5, 2015

@rocketman768 rocketman768 added this to the v2.2.0 milestone Sep 5, 2015

@rocketman768 rocketman768 added the bug label Sep 5, 2015

@rocketman768

This comment has been minimized.

Copy link
Member

rocketman768 commented Sep 5, 2015

Yes, you are exactly right. I'll push up a fix shortly.

@rocketman768 rocketman768 changed the title Wrong input in "Specific heat (cal/(g*K))" Improper localization behavior for "Specific heat (cal/(g*K))" Sep 5, 2015

rocketman768 added a commit that referenced this issue Oct 3, 2015

Merge pull request #78 from rocketman768/bug/equipment-todouble
Fixes #77: bad input behavior for equipment specific heat

rocketman768 added a commit that referenced this issue Oct 3, 2015

Fixes #77: bad input behavior for equipment specific heat
Issue is due to improper localization of database strings. Also fix as many
other improper localizations as I could find.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment