Open zepumph opened 7 years ago
@zepumph asked:
@pixelzoom is there a pattern that PhET tends to prefer?
I'm not aware of any standard. In my Java sims and their HTML5 ports, I typically gave all units-related strings a "units" prefix. For example in molarity_en.json:
"units.liters": {
"value": "L"
},
"units.molarity": {
"value": "M"
},
"units.moles": {
"value": "mol"
},
Looks like some other devs have been using the "units" prefix too - see blackbody-spectrum, capacitor-lab-basics, coulombs-law, gravity-force-lab, inverse-square-law-common, neuron.
The idea with prefixes ("units", "pattern",...) was to provide context, since the Java/Flash Translation Utility was basic. The plan for Rosetta is to provide more context via metadata, but it's unclear when (or if) that will get off the ground.
In unit-rates, I did not use a "units" prefix. I inherited that sim from another developer, and I decided that I don't feel too strongly about the "units" prefix.
In the strings file there is
It seems like we should solidify the way that we are labeling units strings. Either name them for what they are being used for, or camel case their literal value, but we should choose one. @pixelzoom is there a pattern that PhET tends to prefer?