Page MenuHomePhabricator

Sort special page alises alphabetically
Closed, ResolvedPublic

Description

Overtime, as new special pages were created and MessagesEn.php was updated, the alphabetical order of the special page aliases was not observed. For instance, right now Listgrouprights comes before Listgrants while it should come after that (see current code). By my count, there are five other out-of-order aliases in this file.

Other language files have also been impacted by this, and have also veered away from the order in MessagesEn.php; for example, as of right now, MessagesFa.php lists BlockList after JavaScriptTest which is neither alphabetically correct nor concordant with MessagesEn.php (see current code)

The immediate goal of this task is to update all MessagesXX.php files and sort the special page aliases alphabetically. This makes the code more organized, and may make future additions and updates slightly easier.

The ultimate goal of the task should be to add a code sniffer that would check all MessagesXX.php files and look for out-of-order alias definitions.

Event Timeline

@Umherirrender as someone who knows mediawiki code-sniffer pretty well, do you think the latter part of the above task is doable?

Huji triaged this task as Low priority.
Huji added a project: MediaWiki-Codesniffer.
Huji added a project: User-Huji.

Change 606800 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Sort $specialPageAliases and $magicWords in message files

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

Change 606800 abandoned by Umherirrender:
[mediawiki/core@master] Sort $specialPageAliases and $magicWords in message files

Reason:

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

DannyS712 added a subscriber: DannyS712.

This is a task for the core change, the sniff to add the functionality to codesniffer was done separately

Change 637639 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Sort special page alises alphabetically

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

Change 637639 merged by jenkins-bot:
[mediawiki/core@master] Sort special page alises alphabetically

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

Umherirrender claimed this task.

Change 668140 had a related patch set uploaded (by Umherirrender; owner: Umherirrender):
[mediawiki/core@master] Sort magic words alises alphabetically in static language files

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

Change 668140 merged by jenkins-bot:
[mediawiki/core@master] Sort magic words alises alphabetically in static language files

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