Page MenuHomePhabricator

Implement a "variety of english" edit check using the new TextMatchEditCheck implementation
Closed, ResolvedPublic

Description

MOS:ENGVAR specifies that articles should make a consistent use of the variety of English within an article.

The initial purposes of this task are to (1) be an early user for TextMatchEditCheck and (2) To cross-check documentation I'm writing concurrently. The basics of this task are done when:

  • A page with a Use British English category produces an edit check when a non-British spelling is used, using this list from an old patch
  • The check is implemented using TextMatchEditCheck
  • Appropriate follow-up tickets are created based on the notes below in order to make this "production-ready".

Event Timeline

zoe updated the task description. (Show Details)

See parent ticket for other requirements for a larger ticket.

Here's notes I originally had in the description, which I should also reconcile with the parent ticket:

  • The list of spellings and suggested corrections should be configurable on-wiki
  • The on-wiki configuration is documented on-wiki
  • On-wiki configuration lints or post-process to ensure word lists remain sorted
  • The configuration format should not be British English specific, instead allowing word mappings for any given category
  • Conflicts when a page has multiple categories should be resolved in some way: perhaps with priority or offering a union of all matching options
  • The "deep" level of the configuration mapping between words must be as straightforward as possible for an end user to edit in JSON, ie, try to keep to "match": "replacement", lines. Consider the experience in on-wiki configuration editors.
  • The feedback message should be configurable, and should be able to link to documentation
  • The configuration format should have a version number
  • Consider future expansion: this could readily be adapted to have more complex rules, wiki-wide defaults, other rules for specific words (banning slurs, for example), different message sets, etc.
  • Consider user experience for such an upgrade process: do we run a grand script to update the format for everyone, do we let individual wikis update the format in one go, or do we version each rule so each one can be handled as the need arises?

Related to T391713

Turns out this is (almost) pure TextMatchEditCheck and I've been overthinking. See parent.