Closed oliver-phet closed 4 years ago
The timing on this request is interesting, since we've just started the RC process for a new version. And that typically means that we're unlikely to add significant new features for quite awhile. That said...
1) the pH test liquids are labeled differently (i.e. "Test liquid 1," etc.) and/or
This can be done via PhET-iO, but is not available in the public version. Under phScale.global.model.solutes
you'll find the solutes, and you modify their nameProperty
. For example, you could change phScale.global.model.solutes.blood.nameProperty
from "Blood" to "Mystery1". Changing a nameProperty
changes it everywhere in the sim, in both screens.
If we wanted to support something like this in the public version, we'd need to provide a query parameter for each solute name, used to initialize nameProperty
. For example `?bloodName=Mystery1". There may also be a general way to override translated strings via a query parameter, but (if there is) I'm not familiar with that approach. We've discussed such an approach before, and it seems like a better way of customizing strings than having to modify Properties via PhET-iO.
2) two different test liquids could be added together
We have intentionally excluded combining solutes in this sim. It's not at all supported by the model. The model supports adding 1 solute to 1 solvent (water). Combining solutes would be a major rewrite.
Assigning to @arouinfar to decide if anything needs to be done now.
On the Slack developer channel, I asked about a general way to override translated strings. @samreid replied:
There used to be a way to change i18n strings with the old requirejs string plugin, but I’m not sure whether we kept that feature in the es6 plugin migration. I’m not too familiar with the new string support, but I don’t see support for query parameter replacements in js/getStringModule.js
Related to previous phet-io conversations in https://github.com/phetsims/phet-io/issues/1565 and https://github.com/phetsims/phet-io/issues/1551
@pixelzoom thanks for evaluating these requests. We will not be making any changes to ph-scale.
- the pH test liquids are labeled differently (i.e. "Test liquid 1," etc.)
Searching the design doc and repo, I haven't seen any previous discussion of unknown/mystery solutes. I'm not sure what goal a mystery solute would serve in the phet-brand version of this simulation. The pH probe immediately reveals the pH of the mystery liquid. This is in contrast to other simulations where the "mystery" would require some calculation, such as:
Perhaps the goal would be to identify the mystery solute by comparing its pH to a list of knowns. If the solution is diluted, this is problematic. If the solute is undiluted, it's trivial.
If we wanted to allow changing the name of solute via query parameter, something like ?bloodName=Mystery1
would reveal the identity of the mystery substance in the URL.
- two different test liquids could be added together
We have intentionally excluded combining solutes in this sim. It's not at all supported by the model. The model supports adding 1 solute to 1 solvent (water). Combining solutes would be a major rewrite.
Agreed. Combining solutes is beyond the scope of this sim, and it's not something we will ever support. This goal would really be better supported by a sim about titration.
Since the bigger picture discussion of customizing strings via query parameters is happening elsewhere, I'll close this issue.
Reopening and reassigning to @oliver-phet, in case he needs to reply to the user. @oliver-phet please close this issue when you're done.
Thanks for the discussion, replied to user!
Is this something that the iO version could accommodate?