Page MenuHomePhabricator

Sorting of month names in tables should depend on page content language
Open, Needs TriagePublic

Event Timeline

Fomafix raised the priority of this task from to Needs Triage.
Fomafix updated the task description. (Show Details)
Fomafix subscribed.

Also, the position of the sort buttons should depend on the direction of the page content language instead of the direction of the user interface language.

Change 270324 had a related patch set uploaded (by Gerrit Patch Uploader):
DO NOT MERGE. Use page content language for jquery.tablesorter

https://gerrit.wikimedia.org/r/270324

Change 270324 abandoned by Nikerabbit:

[mediawiki/core@master] DO NOT MERGE. Use page content language for jquery.tablesorter

Reason:

I think this proof of concept has served it's purpose.

https://gerrit.wikimedia.org/r/270324

Cite has a similar problem and solved it by comparing the user interface language with the content language and on mismatch additional content language specific information is added to mw.language.setData: https://gerrit.wikimedia.org/g/mediawiki/extensions/Cite/+/97495c9bf18280305632d62096cca5307135f403/src/ResourceLoader/ContentLanguage.php
This solution works only with a project wide content language but not with a page content language per title by $wgPageLanguageUseDB = true.

A better solution would be to extend the ResourceLoader by an optional URL parameter contentlang for the content language next to the existing URL parameter lang for the user interface language. contentlang is only added when the page content language differs to the project content language. A new function getContentLanguage in MediaWiki\ResourceLoader\Context provides the value of this URL parameter and falls back to $wgLanguageCode if the URL parameter is missing. Modules like ext.cite.visualEditor or jquery.tablesorter can then use the page content language for language operations in the page content.