unitsofmeasurement / uom-demos

Units of Measurement Demos
Other
21 stars 9 forks source link

Use ResourceBundles to handle internationalization for the HeatRequirementDemo #76

Closed teobais closed 4 years ago

teobais commented 4 years ago

The HeatRequirementDemo printout is currently hardcoded in German.

Using ResourceBundle to provide internationalization would be nice.

sukanth commented 4 years ago

@keilw @thodorisbais Added Internationalization using ResourceBundle in PR https://github.com/unitsofmeasurement/uom-demos/pull/90

keilw commented 4 years ago

@sukanth Unfortunately the properties are not working, will fix them, if possible in future please use Unicode characters for umlauts etc. that usually works.

sukanth commented 4 years ago

Hey, @keilw it works on my machine.. not sure why it's not working for you. Next time will make sure i use Unicode Characters image

keilw commented 4 years ago

@sukanth Your console already shows the problem, it should say:

Welche Arbeit ist nötig um 1000 l Wasser von 50°C auf 70°C zu erhitzen?
23.33333333333333333333333333333333 kWh
Wenn nur 9.5 kW zur Verfügung stehen dauert es entsprechend länger.
Nämlich: 2.456140350877192982456140350877193 h

And not something like "Nämlich".

Please leave #91 to @andi-huber since it not only requires to understand the German formulas in the original page, he also made changes to the RI, but that has nothing to do with the i18n.

sukanth commented 4 years ago

@sukanth Your console shows the problem already, it should say:

Welche Arbeit ist nötig um 1000 l Wasser von 50°C auf 70°C zu erhitzen?
23.33333333333333333333333333333333 kWh
Wenn nur 9.5 kW zur Verfügung stehen dauert es entsprechend länger.
Nämlich: 2.456140350877192982456140350877193 h

And not something like "Nämlich".

Aww !! Got it. Thanks for fixing it.

keilw commented 4 years ago

Installing the ResourceBundle Editor from the MarketPlace can help if you use Eclipse. I assume there must be a similar plugin for IntelliJ, but I have not tried that so far.