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

Formulas incorrect with some locales #326

Closed
Tracked by #901 ...
Nancy-Salpepi opened this issue Feb 8, 2023 · 10 comments
Closed
Tracked by #901 ...

Formulas incorrect with some locales #326

Nancy-Salpepi opened this issue Feb 8, 2023 · 10 comments

Comments

@Nancy-Salpepi
Copy link

Test device
MacBook Air and iPad

Operating System
13.1/16.3

Browser
safari/chrome

Problem description
For phetsims/qa#894 on the Beer's Law Screen: The location of the subscripts and parenthesis in the formulas is incorrect with locales iw and ar_MA. Also, Potassium dichromate is the only formula written completely in reverse. Potassium chromate is also out of order, but in a different way.

On the Concentration Screen, the formulas are displayed correctly on the Dropper/Shaker.

Steps to reproduce

  1. Change the locale to iw or ar_MA
  2. On the Beer's Law Screen, open the combobox

Visuals

Screenshot 2023-02-08 at 9 16 45 AM

Screenshot 2023-02-08 at 9 18 08 AM

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‫מעבדת חוק בר‬ URL: https://phet-dev.colorado.edu/html/beers-law-lab/1.7.0-rc.2/phet/beers-law-lab_all_phet.html Version: 1.7.0-rc.2 2023-02-06 23:51:14 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36 Language: en-US Window: 1436x781 Pixel Ratio: 1.7999999523162842/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: 31 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
@arouinfar
Copy link
Contributor

Thanks @Nancy-Salpepi.

This looks like a case of phetsims/chipper#1355 so we may need to consult with @jbphet and/or @jonathanolson.

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 8, 2023

Yes, that's almost certainly the problem. I'll investigate.

pixelzoom added a commit that referenced this issue Feb 8, 2023
@pixelzoom
Copy link
Contributor

Fixed in the above commit. I applied StringUtils.wrapLTR to solute and solution formulas, to preserve left-to-right order. Note that this affects both the shaker label in the Concentration screen, and the Soution combobox items in the Beer's Law screen.

Back to @Nancy-Salpepi for verification. If this looks OK, please change label to "fixed-awaiting-deploy", to be verified in the next RC.

@Nancy-Salpepi
Copy link
Author

@pixelzoom The formulas look good on both screens. However, iw is the only locale where the solute names are written first in the combobox. All other locales have formula then name.

@arouinfar
Copy link
Contributor

However, iw is the only locale where the solute names are written first in the combobox.

There's a pattern that controls the order of the name and formula, which translators can separately control. Looks like iw chose to flip the pattern, so this is to be expected.

beersLawLab.general.model.strings.beersLawLab.pattern.0Formula.1NameStringProperty

@Nancy-Salpepi
Copy link
Author

Thanks @arouinfar!

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 8, 2023

Oops, I still need to cherry-pick this into the 1.7 branches, for both beers-law-lab and concentration. Self assigning.

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 9, 2023

Cherry-picks completed in the above commit. Ready for verification in the next RC.

@pixelzoom
Copy link
Contributor

pixelzoom commented Feb 9, 2023

To verify for beers-law-lab in the next RC:

(1) Run the sim in English.
* Go to the Beer's Law screen. Inspect the items in the Solution combo box, verify that the labels look OK.
* Go to the Concentration screen. Choose items from the Solute combo box. Verify that the shaker labels look OK.
(2) Run the sim with locale=iw, and repeat (1).

To verify for concentration in the next RC:

(3) Run the sim in English. Go to the Concentration screen. Choose items from the Solute combo box. Verify that the shaker labels look OK.
(4) Run the sim with locale=iw, and repeat (3).

@stemilymill
Copy link

looks good in beers law lab and concentration

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

5 participants