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

Values units for existing elements don't change when locale is switched #982

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device MacBook Air M1 chip

Operating System 13.2.1

Browser Chrome/Safari

Problem description For https://github.com/phetsims/qa/issues/908, when I switch locales, the units of existing circuit elements don't change. New Circuit elements added to the play area will display the units for the new locale.

Steps to reproduce

  1. On either screen, check Values Checkbox
  2. Change locale to Screenshot 2023-03-02 at 10 03 11 AM
  3. Add elements to the play area
  4. Change locale to English and add more elements to the play area

Visuals

Screenshot 2023-03-02 at 9 49 23 AM
stemilymill commented 1 year ago

This also applies to language direction rtl/ltr. Elements added with any ltr language will keep units to the right of numbers when locale is changed to any rtl and vice versa.

rtl ltr dynamic locale unit location not change

samreid commented 1 year ago

Code review seems OK. But @arouinfar could you please test readouts for each circuit element type, and switch locales (or use stringTest=dynamic)?

arouinfar commented 1 year ago

Tested with stringTest=dynamic and with the steps originally reported, and everything looks good!

samreid commented 1 year ago

For QA, please show the readout for several different circuit element types, and check if it updates when the locale is changed via the preferences dialog.

Nancy-Salpepi commented 1 year ago

This looks good in rc.3. Closing!!

Screenshot 2023-03-08 at 6 02 02 PM Screenshot 2023-03-08 at 6 05 44 PM