Skip to content
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

Problems with OGs and FGs for each style (2.3.0) #166

Closed
JAUCBN opened this issue Feb 3, 2016 · 23 comments
Closed

Problems with OGs and FGs for each style (2.3.0) #166

JAUCBN opened this issue Feb 3, 2016 · 23 comments

Comments

@JAUCBN
Copy link

JAUCBN commented Feb 3, 2016

I installed the Linux 64-bit version of the 2.3.0, and I'm facing some problems with the OGs and FGs for each style. They are appearing with dots and commas mixed, and higher values.
For example: Belgian Golden Strong Ale
OG min: 1,070 sg
OG max: 1.095,000 sg
FG min: 1.050,000 sg
FG max: 1.016,000 sg

Do you know what's wrong?

Thanks

@rocketman768
Copy link
Member

Have you noticed this issue anywhere else?

@renato, do you see this issue? Wondering if it is related to #65

@JAUCBN
Copy link
Author

JAUCBN commented Feb 5, 2016

I noticed the same issue in the Volume of the Mash Tun

378.541.178,000 L

@danielm5
Copy link
Contributor

danielm5 commented Feb 9, 2016

In Spanish we write the numbers in that format: ',' is a decimal separator and '.' is a thousand separator.

@rocketman768 rocketman768 modified the milestones: v2.3.1, v2.4.0 Mar 19, 2016
@mikfire
Copy link
Contributor

mikfire commented Apr 27, 2016

Is this still an issue? I will take yet another swing at the internationalization stuff if I need to.

@JAUCBN
Copy link
Author

JAUCBN commented May 6, 2016

Unfortunately, is still an issue here. I have updated to the Version 2.3.1.1 and still have the same problem

@mikfire
Copy link
Contributor

mikfire commented May 6, 2016

OK. I will see if i can fix it. Thanks.
On May 6, 2016 14:06, "JAUCBN" [email protected] wrote:

Unfortunately, is still an issue here. I have updated to the Version
2.3.1.1 and still have the same problem


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#166 (comment)

@mikfire
Copy link
Contributor

mikfire commented May 7, 2016

I've tried a few branches (2.3, 2.3.1 and HEAD) and I cannot reproduce the problem.
Shot from v2.3.1

So I need more information, please. What distro, what version of Qt and can you also show me the output from the locale command?

@JAUCBN
Copy link
Author

JAUCBN commented May 9, 2016

Hi, I'm using Ubuntu 14.04 LTS, Qt 5.2.1, and here is the output
bt_ogfg_issue

@mikfire
Copy link
Contributor

mikfire commented May 9, 2016

What is your locale set to? This looks like brewtarget thinks you are in a
locale that uses . as the thousands separator and , as the decimal point.
I'm assuming you are not, otherwise you wouldn't have opened the bug.

Mik

Hi, I'm using Ubuntu 14.04 LTS, Qt 5.2.1, and here is the output
[image: bt_ogfg_issue]
https://cloud.githubusercontent.com/assets/17052835/15113667/0d379e6c-15cc-11e6-964d-9f73129bd308.jpg


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#166 (comment)

@JAUCBN
Copy link
Author

JAUCBN commented May 9, 2016

I'm in Brazil, and here we use the "." as thousand separator, and "," as decimal point. But on the older version of BT 2.1.0, this problem doesn't appear. I didn't change anything after the upgrade to 2.3.1. Sorry, if its something obvious but I thought that it wouldn't change from one to another. Where can I change the locale?

@renato
Copy link

renato commented May 10, 2016

@rocketman768 Sorry, I just saw the mention today.

I wasn't using Brewtarget for a while but I compiled it today (from "develop" branch).

I think there is something odd indeed, but it's not everywhere. My mash tun volume is fine (32 L), and for example the American Amber Ale has the right statistics (OG 1,045 - 1,060; FG 1,010 - 1015), but some other styles have wrong data:
American Barleywine - min FG 1.016,000
American IPA - FG 1.056,000 - 1.075,000; OG 1,010 - 1.018,000

It is really mixed as described. I'll take a further look tomorrow, but overall the recipe's values look good.

@JAUCBN You can test setting LC_NUMERIC to en_US.UTF-8 (LC_NUMERIC=en_US.UTF-8 brewtarget)

BTW, the issue doesn't happen using en_US.UTF-8 in LC_NUMERIC, it only happens with my original pt_BR.UTF-8.

@JAUCBN
Copy link
Author

JAUCBN commented May 12, 2016

@renato I tried opening with en_US.UTF-8 and it really worked.

Thanks for the help, also to @rocketman768 and @mikfire , and sorry to bother.

@mikfire
Copy link
Contributor

mikfire commented May 12, 2016

Thank you very much for reporting the bug. I will fix it, and I am glad you
have a work around.

Mik
On May 12, 2016 16:17, "JAUCBN" [email protected] wrote:

@renato https://github.com/renato I tried opening with en_US.UTF-8 and
it really worked.

Thanks for the help, also to @rocketman768
https://github.com/rocketman768 and @mikfire
https://github.com/mikfire , and sorry to bother.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#166 (comment)

@mikfire
Copy link
Contributor

mikfire commented Jun 1, 2016

The fun part about this is that brewtarget doesn't do any anything with respect to internationalization. Anything to do with displaying the numbers properly for the specific locale is left to Qt.

I will investigate more, but I am not really sure this is our problem. It may be something weird in Qt.

@castreixanas
Copy link

castreixanas commented Nov 13, 2016

Hello.
Have a bug with OG and FG ranges.

See yelow in image, OG for this style don't have min and max range. In FG have min range, but don't have max range.
In style editor OG min range mask is x.xxx,xxx sg and max range x,xxx sg. FG is min x,xxx sg and max range x.xxx,xxx sg.
I try change to x,xxx format, but I can't save. This format run for FG, but don't for OG.

Have S.I. units, and 20/20 C S.G. configured in options.

captura

@mikfire
Copy link
Contributor

mikfire commented Nov 13, 2016

Out of curiosity, what is your LANG environmental variable set to?

Mik

Mik Firestone
[email protected]

On Sat, Nov 12, 2016, at 21:22, castreixanas wrote:

Hello.
Have a bug with OG and FG ranges.
See yelow in image, OG for this style don't have min and max range. In
FG have min range, but don't have max range.
In style editor OG min range mask is x.xxx,xxx sg and max range x,xxx
sg. FG is min x,xxx sg and max range x.xxx,xxx sg.
I change to x,xxx format, but I can't save.
Have S.I. units, and 20/20 C S.G. configured.
captura
— You are receiving this because you were mentioned. Reply to this
email directly, view it on GitHub[1], or mute the thread[2].

Links:

  1. Problems with OGs and FGs for each style (2.3.0) #166 (comment)
  2. https://github.com/notifications/unsubscribe-auth/AKxgF-sH-QI5X1J-wbWLwwy6OpzxpVvSks5q9nRmgaJpZM4HSxpB

@castreixanas
Copy link

hello, my system complete report you can view in this url:

http://speccy.piriform.com/results/5DX4gOTQLInkBE7FV84uewZ

lang is spanish es-es, spain international alphabet.

If you want, I can test in my system your arrangements.

2016-11-13 4:39 GMT+01:00 mikfire [email protected]:

Out of curiosity, what is your LANG environmental variable set to?

Mik

Mik Firestone
[email protected]

On Sat, Nov 12, 2016, at 21:22, castreixanas wrote:

Hello.
Have a bug with OG and FG ranges.
See yelow in image, OG for this style don't have min and max range. In
FG have min range, but don't have max range.
In style editor OG min range mask is x.xxx,xxx sg and max range x,xxx
sg. FG is min x,xxx sg and max range x.xxx,xxx sg.
I change to x,xxx format, but I can't save.
Have S.I. units, and 20/20 C S.G. configured.
captura
— You are receiving this because you were mentioned. Reply to this
email directly, view it on GitHub[1], or mute the thread[2].

Links:

  1. Problems with OGs and FGs for each style (2.3.0) #166
    issuecomment-260162215
  2. https://github.com/notifications/unsubscribe-auth/AKxgF-sH-QI5X1J-
    wbWLwwy6OpzxpVvSks5q9nRmgaJpZM4HSxpB


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#166 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AWV2rnK1LQBn4PjKD-9WbZ8eEB0TjVnbks5q9oaHgaJpZM4HSxpB
.

@castreixanas
Copy link

castreixanas commented Dec 8, 2016 via email

@malavv
Copy link
Contributor

malavv commented Jan 10, 2017

@mikfire, do we know if this is still an issue?

EDIT: I could not replicate by switching my Ubuntu to es_es. I specifically like how when you change de language it apparently asks you whether you want to change all of your home folder names to the new language... I am glad I could Google Translate that prompt.

@mikfire
Copy link
Contributor

mikfire commented Jan 10, 2017 via email

@mikfire
Copy link
Contributor

mikfire commented Jan 10, 2017

Actually, I think I have an astonishingly easy fix. It's a little brute force.

The reason it only happened in some fields was that I was using slightly different methods. Most places invoked BtLineEdit::setText(double amount, int precision). StyleEditor was using a small bit of syntax sugar I created and called BtLineEdit::setText(BeerXMLElement *element).

As long as I force things to use the first call instead of the second, the gravities are displayed correctly as it will never go through the conversions. I still need to think about this and make some tests to verify the solution is this relatively straight forward. I will also likely need to break my database a bit.

I may get a solution checked in tonight.

@mikfire
Copy link
Contributor

mikfire commented Jan 12, 2017

I really would like to believe pull request #336 fixes this. If somebody in the afflicted region could test the branch and see if it works, I would be grateful.

@castreixanas
Copy link

@mikfire

Hi. I can do the test. But I need a compiled version for windows, and I do not know where to download it.

Or teach me another way I can do the test.

I am waiting for the information or the download link.

Greetings.

mikfire added a commit that referenced this issue Jan 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants