unitsofmeasurement / uom-demos

Units of Measurement Demos
Other
21 stars 9 forks source link

HeatRequirementDemo is broken by Indriya 2.0.3 #91

Closed keilw closed 4 years ago

keilw commented 4 years ago

When testing the i18n of the HeatRequirementDemo I stumbled over a problem with that demo because for the RELATIVE heat and similar calculations everything is turned into system units. After the upgrade to Indriya 2.0.3 the sentence "Um 1000l von 50°C auf 70°C zu erhöhen ist eine Arbeit von 23,33KWh nötig." becomes "Um 1000l von 50°C auf 70°C zu erhöhen ist eine Arbeit von 0.02333333333333333333333333333333333kWh nötig." As it seems LITRE gets converted into the SI unit causing this? The only way to fix this currently is to tweak it by multiplying the result by 1000 (line 64), so @andi-huber could you please in JavaDoc or a code comment address this problem by explaining why that's necessary? The original page is German, so it shouldn't be a problem. I know this used at least one or two casts that may seem weird, but similar to e.g. the CO2 demos the results and formulas are mathematically sound and worked up until the changes made to Indriya 2.0.3.

andi-huber commented 4 years ago

fixed

keilw commented 4 years ago

In Indriya or in the demo?

andi-huber commented 4 years ago

demo

keilw commented 4 years ago

That looks very consistent, thanks a lot. I am thinking of adding a locale parameter like "en" or so, but the fallback would be German for this one because of the webpage.