Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dynamic locale #441

Closed
pixelzoom opened this issue Aug 30, 2022 · 7 comments
Closed

Add support for dynamic locale #441

pixelzoom opened this issue Aug 30, 2022 · 7 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Aug 30, 2022

... similar to what was done in phetsims/natural-selection#319.

This also includes geometric-optics-basics.

@pixelzoom pixelzoom self-assigned this Aug 30, 2022
pixelzoom added a commit to phetsims/geometric-optics-basics that referenced this issue Aug 30, 2022
pixelzoom added a commit that referenced this issue Aug 30, 2022
@pixelzoom
Copy link
Contributor Author

In phetsims/geometric-optics-basics@633f746, 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
Copy link
Contributor Author

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

@pixelzoom
Copy link
Contributor Author

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

@pixelzoom
Copy link
Contributor Author

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

pixelzoom added a commit that referenced this issue Aug 30, 2022
pixelzoom added a commit that referenced this issue Aug 30, 2022
pixelzoom added a commit that referenced this issue Aug 30, 2022
pixelzoom added a commit to phetsims/geometric-optics-basics that referenced this issue Aug 30, 2022
pixelzoom added a commit that referenced this issue Aug 30, 2022
pixelzoom added a commit to phetsims/geometric-optics-basics that referenced this issue Aug 30, 2022
pixelzoom added a commit that referenced this issue Aug 30, 2022
pixelzoom added a commit to phetsims/scenery-phet that referenced this issue Aug 30, 2022
pixelzoom added a commit to phetsims/geometric-optics-basics that referenced this issue Aug 30, 2022
pixelzoom added a commit that referenced this issue Aug 30, 2022
pixelzoom added a commit that referenced this issue Aug 30, 2022
pixelzoom added a commit that referenced this issue Aug 30, 2022
@pixelzoom
Copy link
Contributor Author

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 phetsims/scenery-phet#769.

Ready for review by @arouinfar.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Aug 30, 2022

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 phetsims/natural-selection#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
Copy link
Contributor

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants