phetsims / friction

"Friction" is an educational simulation in HTML5, by PhET Interactive Simulations.
http://phet.colorado.edu/en/simulation/friction
GNU General Public License v3.0
4 stars 6 forks source link

Double check on dynamic layout for localization in the preferences #312

Closed zepumph closed 1 year ago

zepumph commented 1 year ago
arouinfar commented 1 year ago

@zepumph it looks like model.strings.sceneryPhet.key.toGrabOrReleaseStringProperty is associated with this interaction hint. Editing this property in Studio does not actually change the string in the sim, though. image

I spent some time customizing the preferences strings. Generally everything looks good, but I did notice a few things:

zepumph commented 1 year ago
  • strings.joist.preferences.tabs.audio.sounds.extraSounds.descriptionStringProperty doesn't appear to have a maxWidth. I haven't created a realistic layout problem, so this may be just fine.

Right! Here is how it looks with a max height of 100 (lines wrap at 300): image

image

  • When strings.joist.preferences.tabs.audio.voicing.descriptionStringProperty becomes long, the toggle can get too close to the Sounds controls.

I added spacing to the HBox: image

None of the controls under the Voicing toggle (Sim Voicing Options, Toolbar, etc.) have instrumented strings, but I think that's because the strings don't appear in the translation utility. Since Voicing is English-Only, that seems okay to me.

This was a purposeful decision that I was originally confused by over in https://github.com/phetsims/joist/issues/852. Yes we don't want to cause bloat in i18n when it isn't actually supported.

  • We eliminated the General tab in favor of the Overview and Simulation tabs, so model.strings.joist.preferences.tabs.general shouldn't exist, and its current contents need to get moved over to the Overview section.

Yes, but unfortunately it is very very dangerous to rename/change string key names. Since these strings are in published sims, we are a bit stuck. Sorry about that!

arouinfar commented 1 year ago

Right! Here is how it looks with a max height of 100 (lines wrap at 300): I added spacing to the HBox:

Those both look good in master, thanks!

Yes, but unfortunately it is very very dangerous to rename/change string key names. Since these strings are in published sims, we are a bit stuck. Sorry about that!

Good to know! Thanks for the clarification, I'll keep that in mind.

Anything else to do here @zepumph?