User Story
As a user who views the wishlist in an RTL language, the directionality of the content should always match that of my language.
Engineering details
Some pages like Template:Community Wishlist/Wishes use TemplateStyles. TemplateStyles can only be applied to parser output. As such, we can't use i.e. [dir='rtl'] .some-selector because the only elements with [dir='rtl'] are outside the .mw-parser-output.
To get around this, we can use the {{int:lang}] hack in conjunction with Template:Dir. As it turns out, the {{int:lang}} thing is a manually built system on Meta, Commons and other wikis (see list of lang pages). We will implement the same hack on our staging wiki, and have the Wishlist Intake setup task set this up automatically. However, in order to do so, we need a grant available in Core that has the pagelang permission so that the action=setpagelanguage can be used through bot passwords.
Acceptance criteria
- Any left/right styling should be flipped, for example:
- The checkboxes in the Projects section of the intake form.
- The padding around the chevrons in table headers (T368367)
- …
- npm run setup should automate setting up the {{int:lang}} hack
Details for QA
- Please be advised that on staging, the only languages currently supported (for the purposes of RTL/LTR testing) are en, en-rtl, ar, de, and es.
- Also note table sorting does not work for en-rtl, which is expected.