Glucosio / glucosio-android

Glucosio Android App
GNU General Public License v3.0
338 stars 162 forks source link

Error saving and display result #389

Open dmvstar opened 6 years ago

dmvstar commented 6 years ago

System config in mmol/L. Adding and saving result, for example - 11,8, after saving result on list is 118 ! screenshot_2017-12-26-09-29-12-066_org glucosio android daily screenshot_2017-12-26-09-29-22-679_org glucosio android daily screenshot_2017-12-26-09-29-32-579_org glucosio android daily

AndyScherzinger commented 6 years ago

@emartynov could this be related/fixed by your decimal support changes? Imho this is a locale depending issue since US uses "," for the 1K delimiter while most european countries use "." so you end up with (US) 1,000.00 == 1.000,00 (DE) for example, thus parsing user inputs would have to respect locales. :/

emartynov commented 6 years ago

As I saw this issue I've tested it. And it worked fine for me. So most probably mu decimal support changes will also fix this issue. However, I never was sharp in the remembering decimal separator. So, my proposal would be to make it locale-independent.

AndyScherzinger commented 6 years ago

So, my proposal would be to make it locale-independent.

As in always use a dot for decimals or separate it into 2 fields on the UI level?

dmvstar commented 6 years ago

When I change liocale to English - work fine, but when I restore to my locale then - wrong. screenshot_2017-12-28-14-40-07-571_com android settings screenshot_2017-12-28-14-41-50-479_org glucosio android daily screenshot_2017-12-28-14-43-27-715_org glucosio android daily

emartynov commented 6 years ago

I propose no matter dot or coma used always treat it as the separator

emartynov commented 6 years ago

@dmvstar Interesting notice - you have Polish locale but Ukraine region! (I'm from Ukraine)

dmvstar commented 6 years ago

@emartynov - yes I am from Ukraine but testing Polish translation and locale. If I select Russian locale, I have same problem )