Skip to content

MathQuill fix for RTL languages#686

Merged
pstaabp merged 1 commit intoopenwebwork:PG-2.17from
taniwallach:mathquill-rtl-fix
May 31, 2022
Merged

MathQuill fix for RTL languages#686
pstaabp merged 1 commit intoopenwebwork:PG-2.17from
taniwallach:mathquill-rtl-fix

Conversation

@taniwallach
Copy link
Member

MathQuill when used in an RTL language should still create the input boxes as LTR and the menu should internally be in LTR so the symbols will appear properly.

To test, open a problem (the blankProblem.pg is good enough).
Change the course language to he-il (you can add $language = 'he-il'; to the simple.conf file of the course, and then comment/uncomment that line when testing).

Before the patch:

  1. The MathQuill toolbar (when in Hebrew) will be garbled:
    • the icons for roots and exponents are displayed wrong (sort of partially mirrored right-to-left).
  2. Using those buttons or typing 4^5 or sqrt will get a messed up display inside the formatted input box.
  3. Also 5! will get the factorial displayed on the left side of the 5.
  4. Typing sin(5x) puts the argument on the left of the sin.

The patch tells rtlcss not to mirror the direction settings which were intended to prevent such problems.

After installing the patch you need to run npm install in /opt/webwork/pg/htdocs before checking that the fix works.

the input boxes as LTR and the menu should internally be in
LTR so the symbols will appear properly.
@taniwallach taniwallach requested review from drgrice1 and pstaabp May 29, 2022 12:02
Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

So you have time for a little testing now? That is good. Hopefully you are looking around the user interface for other things like this. The right-to-left styles have changed quite a bit, and I have only done minimal testing with this, partially due to not exactly knowing what to look for.

@pstaabp pstaabp merged commit 7852192 into openwebwork:PG-2.17 May 31, 2022
@taniwallach taniwallach deleted the mathquill-rtl-fix branch June 2, 2022 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants