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

[Atomic Scale] Use MathSymbols.TIMES in scale bar readout #99

Closed
arouinfar opened this issue Dec 20, 2018 · 6 comments
Closed

[Atomic Scale] Use MathSymbols.TIMES in scale bar readout #99

arouinfar opened this issue Dec 20, 2018 · 6 comments
Assignees

Comments

@arouinfar
Copy link
Contributor

arouinfar commented Dec 20, 2018

For phetsims/qa#243

@phet-steele noticed that the multiplication symbol used in the scale bar on the Atomic Scale screen is the letter x, not MathSymbols.TIMES. This was addressed for scientific notation in phetsims/inverse-square-law-common#50, but it looks like we missed this one.

image

@jessegreenberg
Copy link
Contributor

@mbarlow12 is it possible to use MathSymbols.TIMES for this?

@mbarlow12
Copy link
Contributor

My hesitation there is that the text is coming from the ...string_en.json file at the moment, so I can't use the MathSymbols object. Since it's static, I'd prefer to keep it in the strings file, and there is ample precedent for including minor HTML within the translatable strings.

I can still split the text into different nodes to allow for using MathSymbols, but that seems overkill for this case. Unless, I hear otherwise, I'll plan to move forward with × in the string.

@arouinfar
Copy link
Contributor Author

arouinfar commented Dec 22, 2018

That all sounds reasonable to me @mbarlow12.

I noticed the atomicLegendScale and macroLegendScale look a bit odd in the string file. Only the units should be translatable, not the numbers.

 "units.atomicLegendScale": {
    "value": "10 pm"
  },
  "units.macroLegendScale": {
    "value": "1 cm"
  },

Compare to the cmValue and nmValue in wave-interference.
screen shot 2018-12-22 at 3 00 54 pm screen shot 2018-12-22 at 3 01 09 pm

"cmValue": {
    "value": "{0} cm"
  },
  "nmValue": {
    "value": "{0} nm"
  },

This seems like a really minor change, so I would be happy to test on master before we proceed with 1.0.

@mbarlow12
Copy link
Contributor

mbarlow12 commented Dec 27, 2018

@arouinfar I think the use case is a little different. Those patterns are reused throughout the wave interference sim with varying values (e.g. see the double slit screen control panel). Since the string for the CL legend never changes, it seems unnecessary to dynamically fill it with a constant value.

I'd say it's more similar to the millisecond or femtosecond conversion strings:

  "millisecondConversion": {
    "value": "1 ms = 10<sup>-3</sup> s"
  },
  "femtosecondConversion": {
    "value": "1 fs = 10<sup>-15</sup> s"
  }

@mbarlow12
Copy link
Contributor

@arouinfar I went forward with publishing the sim as-is since there appears to be precedent for not using patterns for static strings.

@mbarlow12 mbarlow12 assigned arouinfar and unassigned mbarlow12 Dec 27, 2018
@arouinfar
Copy link
Contributor Author

Thanks for the clarification @mbarlow12. It seemed odd that the numbers were included in the string to be translated, but the secondConversion strings are an interesting parallel.

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

3 participants