phetsims / geometric-optics

Geometric Optics is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 5 forks source link

Add support for dynamic locale #441

Closed pixelzoom closed 1 year ago

pixelzoom commented 2 years ago

... similar to what was done in https://github.com/phetsims/natural-selection/issues/319.

This also includes geometric-optics-basics.

pixelzoom commented 2 years ago

In https://github.com/phetsims/geometric-optics-basics/commit/633f7468efd220a6b715d9fac5fd3a2a81626a50, support for geometric-optics-basics was addressed -- it's just the title. That sim has never been published, so has no translations and cannot be tested.

pixelzoom commented 2 years ago

This sim is up next in the list that @kathy-phet gave me, so increasing priority.

pixelzoom commented 2 years ago

Published 1.2.0-dev.2 with brands=phet,phet-io as a baseline before doing this work.

pixelzoom commented 2 years ago

Looks like @zepumph converted some of the strings in this sim, but not others - very inconsistent. And I wasn't aware of this. See 83c13163.

pixelzoom commented 2 years ago

This is done. The only bit that's not supporting dynamic strings in the "Slider Controls" section of the keyboard-help dialog, and that's being tracked in https://github.com/phetsims/scenery-phet/issues/769.

Ready for review by @arouinfar.

pixelzoom commented 2 years ago

Geometric Optics and Natural Selection have roughly the same number of strings (56 vs 55 respectively). But Geometric Optics went a lot faster than Natural Selection https://github.com/phetsims/natural-selection/issues/319 because: (1) The majority of the Text/RichText instances were already instrumented. (2) It's in TypeScript, so I got some help from the type-checker, and imports worked in WebStorm.

arouinfar commented 1 year ago

@pixelzoom I reviewed both sims in Studio, and the dynamic locales look great. I didn't encounter any layout issues when editing strings, and everything was nicely instrumented in the view with labelText and titleText which made the strings very easy to find/edit.