phetsims / circuit-construction-kit-common

"Circuit Construction Kit: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
10 stars 10 forks source link

Units not being translated in sensor display and EditContainerNode number displays #961

Closed matthew-blackman closed 1 year ago

matthew-blackman commented 1 year ago

@samreid and I found this issue while investigating locale switching. It looks like the units of the sensor measurements and the number display of the EditContainerNode are not translating when the locale is changed.

Screen Shot 2023-02-13 at 3 59 11 PM
arouinfar commented 1 year ago

I checked the translation utility and the iw translator did not localize V or A. They did, however, provide a translation for volts which is properly appearing in the published sim:

image

samreid commented 1 year ago

@matthew-blackman and I discovered that the value is correct if you use ?locale=iw for example. But it doesn't dynamically recompute when locale is changed at runtime. We are fixing it now....

samreid commented 1 year ago

@matthew-blackman and I addressed all cases we discovered. SeriesAmmeter, Ammeter, Voltmeter and CircuitElementNumberControl units all update correctly under dynamic locale change.