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

the word meaning "the" needs to be linked with its noun #86

Open Nancy-Salpepi opened 9 months ago

Nancy-Salpepi commented 9 months ago

Test device MacBook Air M1 chip

Operating System 14.1.2

Browser Safari 17.1.2

Problem description For https://github.com/phetsims/qa/issues/1009, in some locales other than English there are several forms of the word "the". After switching which item is assigned to each variable, those items switch places in the Distance Statement but the word meaning "the" doesn't, leading to incorrect translations. I noticed this in the third scene of the Explore Screen with Italian and French (but I'm sure there are others).

Steps to reproduce

  1. Change the locale to Italian
  2. Go to the third scene of the Explore Screen
  3. Place both the bird and fish in the scene
  4. Switch the variables they are assigned to

This also happens with "directed distance" selected.

Visuals In Italian:

https://github.com/phetsims/number-line-distance/assets/87318828/daf1f60c-38ed-464f-a078-5246f708ca43

In French:

Screenshot 2023-12-08 at 10 42 55 AM Screenshot 2023-12-08 at 10 43 02 AM
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Droite numérique: Distance‬ URL: https://phet-dev.colorado.edu/html/number-line-distance/1.1.0-rc.2/phet/number-line-distance_all_phet.html Version: 1.1.0-rc.2 2023-12-01 00:37:11 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15 Language: en-US Window: 1403x710 Pixel Ratio: 2/1 WebGL: WebGL 1.0 GLSL: WebGL GLSL ES 1.0 (1.0) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
marlitas commented 9 months ago

This is a translation issue and I don't believe I can address in the code. The pattern string includes the and the noun is the one that gets switched around. You can see the same thing happening in the published version: image

The translation for fish looks like the following in babel: image

And the pattern string in question looks like the following in babel: image

You can see that the le and l' orders are always preserved and I have no way of flipping them around.

Perhaps this is something that should be communicated to translators, so they know how pattern strings work in those scenarios... it might also be good for developers to keep this in mind so that whenever we have pattern strings with nouns that may move around, the the is included in the pattern value instead of the overarching string.

Assigning to @kathy-phet and @jbphet to see if they have any additional thoughts or recommendations here.

jbphet commented 9 months ago

There is a more general GitHub issue that has already been logged for this, please see https://github.com/phetsims/rosetta/issues/314. I think we can and should keep both open, I just wanted to make sure they were linked.

The most direct and immediate way to address this would be to give the user more complete control over the string, using either more complex patterns or fully strings. The tradeoff is that it will likely be a bit more challenging for translators to understand, and also more likely that mistakes will be made.

By the way, this is exactly why we can't apply Rosetta to the translation of accessibility strings. As strings get longer we begin to encounter a lot of grammar and punctuation challenges.

I'm happy to work on this if we collectively decide it's a priority. I don't think it would take too long to work out, but I'd have to go back through and fix up all the existing translations and either do a maintenance release or a re-release off of main (maybe this could be coupled with the release for new characters?), so it's not trivial. It would probably take a couple of focused days.

jbphet commented 9 months ago

Unassigning myself until this gets prioritized.

kathy-phet commented 9 months ago

Let's continue to defer this issue. It's a great catch! And a point that we should keep in mind for sims, but we can't afford the effort to fix it at the moment.