## 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 [[ https://wishlist-test.toolforge.org/wiki/Template:Community_Wishlist/Wishes | Template:Community Wishlist/Wishes ]] use [[ https://wishlist-test.toolforge.org/wiki/Template:Community_Wishlist/styles.css | 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 [[ https://meta.wikimedia.org/wiki/Template:Dir | Template:Dir ]]. As it turns out, the `{{int:lang}}` thing is a manually built system on Meta, Commons and other wikis (see [[ https://meta.wikimedia.org/w/index.php?title=Special:PrefixIndex&namespace=8&prefix=Lang | 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 [[ https://www.mediawiki.org/wiki/Manual:Grants | grant ]] available in Core that has the `pagelang` permission so that the [[ https://www.mediawiki.org/wiki/API:SetPageLanguage | action=setpagelanguage ]] can be used through [[ https://www.mediawiki.org/wiki/Manual:Bot_passwords | 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)
** …
## Engineering details
Some pages like [[ https://wishlist-test.toolforge.org/wiki/Template:Community_Wishlist/Wishes | Template:Community Wishlist/Wishes ]] use [[ https://wishlist-test.toolforge.org/wiki/Template:Community_Wishlist/styles.css | 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 [[ https://meta.wikimedia.org/wiki/Template:Dir | Template:Dir ]]. As it turns out, the `{{int:lang}}` thing is a manually built system on Meta, Commons and other wikis (see [[ https://meta.wikimedia.org/w/index.php?title=Special:PrefixIndex&namespace=8&prefix=Lang | 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 [[ https://www.mediawiki.org/wiki/Manual:Grants | grant ]] available in Core that has the `pagelang` permission so that the [[ https://www.mediawiki.org/wiki/API:SetPageLanguage | action=setpagelanguage ]] can be used through [[ https://www.mediawiki.org/wiki/Manual:Bot_passwords | bot passwords ]].* `npm run setup` should automate setting up the `{{int:lang}}` hack
## Details for QA
* Please be advised that on [[ https://wishlist-test.toolforge.org/ | 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.