phetsims / build-a-molecule

"Build a Molecule" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
8 stars 7 forks source link

Should molecule names be translatable? #196

Closed KatieWoe closed 4 years ago

KatieWoe commented 4 years ago

Test device Dell Operating System Win 10 Browser Chrome Problem description For https://github.com/phetsims/QA/issues/506 The molecule names that pop up when you build a molecule don't seem to be translatable. For some, such as water, this may be an issue.

Visuals shouldmoleculenamestranslate

Troubleshooting information:

!!!!! DO NOT EDIT !!!!! Name: ‫تست (زبان)‬ URL: https://phet-dev.colorado.edu/html/build-a-molecule/1.0.0-dev.75/phet/build-a-molecule_all_phet.html?stringTest=rtl Version: 1.0.0-dev.75 2020-06-01 13:20:12 UTC Features missing: touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36 Language: en-US Window: 1536x722 Pixel Ratio: 2.5/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 4096 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}
arouinfar commented 4 years ago

In https://github.com/phetsims/build-a-molecule/issues/178, @Denz1994 said:

26 molecules in collectionMoleulesData.js are responsible for the molecules that show in the collection box. These strings are translatable as indicated by the stringTest query parameter.

Looking at @KatieWoe's screenshot, this doesn't appear to be the case.

Denz1994 commented 4 years ago

Sorry I misunderstood. I thought only the strings in the collection panel would be translated and not the strings in the play area. Consider these two reasons:

  1. If a molecule is built on the way to the goal molecule, the intermediate molecules would not be translated. This means once the goal molecule is built it would translate to another language. For example, try building triflouroborane (goal molecule). On the way to building it, fluoroboron and difluoroboron would be in English. This would look odd in my opinion.

  2. A translated molecule in the play area would give away that it is a goal in the collection panel. We decided to limit the blue arrows and cuing for a successfully built molecule to the first collection. This was to serve as a hint for what a user is supposed to accomplish and keep the challenging aspect of the sim on the proceeding collections. If we translate the strings of the goal molecules in the play area it will nullify that decision and may indicate to the user "you've created a goal molecule". A translated molecule title on the 2nd or 3rd collection will essentially serve as a cue that a goal has been completed.

@arouinfar Do we still want to proceed with translating strings for molecules built in the play area?

arouinfar commented 4 years ago

In Java, we allowed for i18n of the molecule names in the play area and the collection panel. image

This is a more consistent experience for users as they try to match up molecules in the play area to the corresponding collection box.

If a molecule is built on the way to the goal molecule, the intermediate molecules would not be translated. This means once the goal molecule is built it would translate to another language. For example, try building triflouroborane (goal molecule). On the way to building it, fluoroboron and difluoroboron would be in English. This would look odd in my opinion.

Looking at the molecules in collectionMoleculesData.js, most of them won't have named/untranslatable transitions. Even so, I think it's really important for the strings to match in the play area and the collection panel and occasional switching between English and another locale is acceptable.

A translated molecule in the play area would give away that it is a goal in the collection panel.

I'm not sure I follow this argument. Naming the molecule in the play area is critical in helping students match it up with the corresponding collection box. Many students using the sim won't yet be fluent with chemical formulas, and pairing the representations of the name, formula, and structure are important. We chose to suppress the cueing behavior in later collections because students will presumably understand the sim mechanics (build a target molecule, drag it into the box).

Do we still want to proceed with translating strings for molecules built in the play area?

Yes, please do @Denz1994!

Denz1994 commented 4 years ago

I was assuming that only the built molecules in the play area that are goals in the collection panel would be translated. This would indicate that if a string is translated into the user's language, it must have a corresponding goal in the collection panel. After implementing the above request, I see that that isn't the case. All of the built molecules in the play area can be translated, whether or not it has a goal in the collection panel.

This also means that in the example I gave above in point 1, a translater could translate molecule names for intermediate molecules (such as fluoroboron and difluoroboron).

So in the above commit, all of the molecules in the play area should be translatable. I also went ahead and translated the strings of the 3D molecule dialog because its title is the molecule name.

Is this the intended behavior @arouinfar? See the images below:

image

image

Denz1994 commented 4 years ago

This dev version can be used for verification @KatieWoe and @arouinfar.

KatieWoe commented 4 years ago

Looks good in the dev version to me

arouinfar commented 4 years ago

Looks great, thanks @Denz1994!