phetsims / number-compare

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

The word "language" is translated incorrectly #27

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device MacBook Air M1 chip

Operating System 13.2.1

Browser Safari

Problem description For https://github.com/phetsims/qa/issues/917: I am not sure what is normally done in these cases, but I noticed the word "language" in the preferences menu has been translated incorrectly. This could be very confusing to users.

Example 1: Changing locale to español in the Localization tab results in the word "language" being replaced with "español." This is especially confusing on the Simulation tab:

Screenshot 2023-03-15 at 4 43 38 PM

Example 2: Changing the locale to either Italian or French results in the word "language" being replaced with the Italian/French word for English:

Screenshot 2023-03-15 at 4 44 43 PM Screenshot 2023-03-15 at 4 56 40 PM
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Number Compare‬ URL: https://phet-dev.colorado.edu/html/number-compare/1.0.0-dev.6/phet/number-compare_all_phet.html Version: 1.0.0-dev.6 2023-03-15 01:30:22 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/16.3 Safari/605.1.15 Language: en-US Window: 1203x654 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: {}
chrisklus commented 1 year ago

My apologies, I meant to mention this in the dev test issue. This is a side affect of re-using a string key for a different purpose than its original use in the published sims (which translations in babel). The language string key that is published was used as a label for the language on either side of the locale switch. Now, the word should be translated as literally the word "language" in any given language. I've noted that the current translations should be wiped right before publication over in https://github.com/phetsims/number-suite-common/issues/27#issuecomment-1437668777.

Thanks for opening this issue @Nancy-Salpepi, I'll mark on hold until work is compete in https://github.com/phetsims/number-suite-common/issues/27 and then we can verify that the language string is ready for fresh translations.

zepumph commented 1 year ago

I totally understand if we want to proceed like this, but we could also just change the new string key name. Then there is nothing more to think about or confirm or to hang around looming.

https://github.com/phetsims/number-suite-common/blob/5ba4efd28f2f37791ac38df6295d188267b333b1/number-suite-common-strings_en.json#L80-L82

Could that be "languageTitle"? A small thing, but perhaps worth just doing.

chrisklus commented 1 year ago

@zepumph is making a lot of sense here! Item 2 in https://github.com/phetsims/number-suite-common/issues/27#issuecomment-1437668777 was not revealing of how annoying/risky this change could be. Let's use languageTitle.

chrisklus commented 1 year ago

I took care of this in the above commit. There are no longer incorrect translations filling in now. I think we are good to close here, I'll update https://github.com/phetsims/number-suite-common/issues/27#issuecomment-1437668777