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

Conventions for naming keys for strings related to description #228

Open
pixelzoom opened this issue Oct 20, 2024 · 2 comments
Open

Conventions for naming keys for strings related to description #228

pixelzoom opened this issue Oct 20, 2024 · 2 comments

Comments

@pixelzoom
Copy link
Contributor

pixelzoom commented Oct 20, 2024

Related to phetsims/models-of-the-hydrogen-atom#67 and https://github.com/phetsims/scenery-phet/issues/876 ...

For strings that appear in the UI, PhET's convention is to use the English string as the string key. Some typical examples, from MOTHA:

  "billiardBall": {
    "value": "Billiard Ball"
  },
  "bohr": {
    "value": "Bohr"
  },
  "brightness": {
    "value": "Brightness"
  },
  "classical": {
    "value": "Classical"
  },
  "classicalSolarSystem": {
    "value": "Classical Solar System"
  },
  "deBroglie": {
    "value": "de Broglie"
  },
  "electron": {
    "value": "electron"
  },

For description-related strings, it's not clear if this convention is still appropriate.

In MOTHA, where description strings live under ModelsOfTheHydrogenAtom.a11y, I feel that the UI convention is NOT appropriate for strings related to accessibleName and helpText -- there is not enough information about the string's context. So I experimented with adding a "HelpText" suffix, like this:

 "a11y": {
    "absorptionAndEmission": {
      "value": "Absorption and Emission"
    },
    "absorptionAndEmissionHelpText": {
      "value": "Show Absorption and Emission dialog for electron state transitions and their associated wavelengths."
    },
...

This still does not feel sufficient for the ModelsOfTheHydrogenAtom.a11y approach. And it's hard to know what will be sufficient until decisions are made about how translation will be supported for description.

In any case... Conventions for naming string keys should definitely be a discussed.

@pixelzoom
Copy link
Contributor Author

@jessegreenberg and I discussed this one. Before description strings are publicly released for translation, it's important to have conventions for string keys -- they are almost impossible to change later. Until we know when and how description translation is going to be done, we don't know if this issue is blocking for the MOTHA 1.0 release. My crystal ball says that we will be ready to release MOTHA 1.0 before PhET has a description translation solution, and that we should therefore leave the description strings "as is", under the "a11y" grouping where they are not visible in Rosetta, and can be changed in the future.

@marlitas
Copy link
Contributor

marlitas commented Nov 1, 2024

Meeting 11/1/24:

  • Discuss and determine naming convention between static and dynamic strings
    • Some "static" strings may have dynamic components (ex. MSAB "Ball at {{value}}"), but is simple enough to not require special dynamic string attention
    • Perhaps "simple" a11y?
    • Meet to discuss and decide on a convention that could work for this.
  • Assigning to @jessegreenberg for next steps.

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