Open pixelzoom opened 2 years ago
For equations, it might be easier (certainly more efficient) to observe
localeProperty
, and rebuilt the equations when the locale changes.
Probably not a good idea, because it creates listener-order dependencies. Something is presumably observing localeProperty
and updating the sim's localized StringProperties. And that observer would need to run first, so that the StringProperties were updated before Fourier's equation were updated. That will certainly happen with the current order that observers are added, but would presumably fail if the observers list is shuffled.
Support for dynamic locale has been completed. This will need to be reviewed before the sim is republished from main.
Ready for testing in https://github.com/phetsims/qa/issues/1178. You may close this issue if it looks OK.
This sim mostly supports dynamic locale. But there's still one remaining task. In
EquationMarkup
, all occurrences of "StringProperty.value" should just be "StringProperty".This will be a significant chunk of work.
EquationMarkup
is a set of utility functions that create fragments of various equations. And when locale changes, those equations need to update their translated symbols.For equations, it might be easier (certainly more efficient) to observe
localeProperty
, and rebuilt the equations when the locale changes.localeProperty
is a singleton, imported via: