[Bug] Mirror Page Formatting for Languages with Right-To-Left Scripts #16
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: PrivateCoffee/wikimore#16
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Whereas currently Wikimore displays Titles on the left side of the page, and boxes on the right as per the standards of English and most other Wikipedias, this should be the opposite for languages that utilize scripts that are read right-to-left rather than left-to-right.
As an example, here is Adam Sandler's article as it appears on the Arabic language Wikipedia and Wikimore equivalent respectively at the following links:
https://ar.wikipedia.org/wiki/%D8%A2%D8%AF%D9%85_%D8%B3%D8%A7%D9%86%D8%AF%D9%84%D8%B1
https://wikimore.private.coffee/wiki/ar/wiki/%D8%A2%D8%AF%D9%85_%D8%B3%D8%A7%D9%86%D8%AF%D9%84%D8%B1
In the example above, the Infobox should appear on the left-hand side of the page, with the Title appearing on the right-hand side. This not only matches the formatting on Wikipedia, but improves article readability for users fluent in languages that read from right to left.
In total on Wikipedia, there are 22 Wikis with languages that read from right to left, of which one is a closed project, and another supports switching between scripts. Of the 22 Wikis, 17 utilize Arabic scripts (including the case wiki where one can swap language scripts), 2 utilize Hebrew scripts, and then the N'ko, Syriac, and Thaana scripts all have one wiki each.
Here is a table showing which specific languages utilize scripts read from right to left along with their language code for Wikipedia (ar.wikipedia.org for Arabic for example), and the specific script the language utilizes.
In the case of Kurmanji Kurdish (misspelled as Kuranji in the table above, whoops), the default script is Latin, as shown in this image using the recently Featured Article for Prehistory in the aforementioned language at the link below:
https://ku.wikipedia.org/wiki/P%C3%AA%C5%9Fd%C3%AErok
Slightly below the title for the article, there is a button that brings a dropdown menu. This changes the written variation of the article. In this case, choosing "Tîpên erebî" displays the article in the language's written form in Arabic rather than in Latin:
Clicking the button modifies the URL of the article, changing it from the default Latin link at
https://ku.wikipedia.org/wiki/P%C3%AA%C5%9Fd%C3%AErok
to
https://ku.wikipedia.org/w/index.php?title=P%C3%AA%C5%9Fd%C3%AErok&variant=ku-arab
which displays the article in the language's written form in Arabic.
Wikimore currently doesn't support swapping between different written variations of a language for an article, and while I will likely be submitting an issue regarding that functionality in general as multiple Wikis in Wikipedia utilize the function, I figured this case would be important to mention here as this is the only example of such where the script changes from being read left-to-right to right-to-left.
Hmm, the last part is tricky. Because I can get the API to return the article in Arabic instead of Latin, but it's still returning the direction as "ltr" instead of "rtl"...
Specifically:
curl 'https://ku.wikipedia.org/w/rest.php/v1/page/P%C3%AA%C5%9Fd%C3%AErok/html' -H 'Accept-Language: ku-arab'
includes<body id="mwAA" lang="ku" class="mw-content-ltr sitedir-ltr ltr mw-body-content parsoid-body mediawiki mw-parser-output" dir="ltr" data-mw-parsoid-version="0.20.0.0-alpha16" data-mw-html-version="2.8.0" data-mw-variant-lang="ku-latn">
, even though the text is in Arabic script...I'm closing this issue because the positioning issue for titles and sidebars should now be fixed. Please open a new one for the language variants – they theoretically work now (by appending
?variant=xyz
to the URL), but I haven't extensively tested them.I also hope there is a way to automatically fetch the available variants to display a toggle or something. And as for the Kurmanji version, if that's the only one that has a change in writing directions between variants, maybe I'll just add a line of code for that if the API doesn't want to give me that information...