phetsims / number-line-distance

"Number Line: Distance" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
0 stars 3 forks source link

Improvements to strings file #47

Closed pixelzoom closed 3 years ago

pixelzoom commented 3 years ago

From code review #35:

  • [ ] Make sure the string keys are all perfect, because they are difficult to change after 1.0.0 is published.

Here are some recommend changes.


In number-line-distance-strings_en.json:

  "symbol.degreesCelsius": {
    "value": "° C"
  },

(1) There should be no space between '°' and 'C'. The symbol for "degrees Celsius" is "°C", see https://en.wikipedia.org/wiki/Celsius.

(2) We typically do not put Unicode characters like '°' in files. We use Unicode escapes, to keep the files UTF8-compatible.

For comparison, here's the same string in gas-properties-strings_en.json:

  "degreesCelsius": {
    "value": "\u00B0C"
  },

  "symbol.a": {
    "value": "A"
  },
  "symbol.b": {
    "value": "B"
  },

Highly recommended to change these keys to "symbol.A" and "symbol.B". Use this convention because (a) it will match what the translator sees on the screen, and (b) some sims have both uppercase and lowercase versions of a character. For example, in Fourier:

  "symbol.F": {
    "value": "F"
  },
  "symbol.f": {
    "value": "f"
  },
SaurabhTotey commented 3 years ago

I have implemented both of the suggested changes. I will close this issue.