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

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

Open
Nancy-Salpepi opened this issue Dec 8, 2023 · 4 comments
Open

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

Nancy-Salpepi opened this issue Dec 8, 2023 · 4 comments

Comments

@Nancy-Salpepi
Copy link

Test device
MacBook Air M1 chip

Operating System
14.1.2

Browser
Safari 17.1.2

Problem description
For phetsims/qa#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:

wordsDontSwitch.mp4

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
Copy link
Contributor

marlitas commented Dec 12, 2023

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.

@marlitas marlitas assigned jbphet and kathy-phet and unassigned marlitas Dec 12, 2023
@marlitas marlitas removed the type:bug Something isn't working label Dec 12, 2023
@jbphet
Copy link
Contributor

jbphet commented Dec 13, 2023

There is a more general GitHub issue that has already been logged for this, please see phetsims/rosetta#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
Copy link
Contributor

jbphet commented Dec 13, 2023

Unassigning myself until this gets prioritized.

@jbphet jbphet removed their assignment Dec 13, 2023
@kathy-phet
Copy link

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.

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

4 participants