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

Support for dynamic locale #288

Closed
pixelzoom opened this issue Jun 8, 2023 · 2 comments
Closed

Support for dynamic locale #288

pixelzoom opened this issue Jun 8, 2023 · 2 comments
Assignees

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Jun 8, 2023

There are places in this sim where dynamic locale is not currently supported. Any place where you're getting StringProperty.value will not automatically update when the user changes locale, or when tested with ?stringTest=dynamic.

There are some that are straightforward to identify, like this:

// GreenhouseConcentrationPanel.ts
    const iceAgeLabel = GreenhouseEffectStrings.concentrationPanel.iceAgeStringProperty.value;

The others appear to be related to description, search for "StringProperty.value". Do those need to be dynamic?

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jun 12, 2023

In the above commit, I fixed a problem related to iceAgeStringProperty, and factored out constants for years ('2020', etc.)

The remaining cases where I see StringProperty used in a way that is not dynamic all appear to be related to description. @jbphet does description need to dynamically update when locale changes? If so, there is a lot more work to do here. If not, this issue can be closed.

@pixelzoom
Copy link
Contributor Author

pixelzoom commented Jun 12, 2023

@jbphet and I discussed this. Since there's currently no way to translate descriptions, there's currently no need to make the implementation handle dynamic locale. And doing so might be a big effort. So for now we should just be sure that dynamic locale and description features interact "well" together -- we'll discuss that in #299.

Closing.

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