Help:Proofread/Technical

From Wikisource
Jump to navigation Jump to search
Technical description of the ProofreadPage extension

This page discusses the architecture and customisation of the ProofreadPage extension as applies to English Wikisource.

For instructions on using side-by-side proofreading at Wikisource, see H:SIDE.

The ProofreadPage extension makes up both the front- and back-end of the system for side-by-side proofreading. It consists of a set of server-side PHP and client-side Javascript, as well as MediaWiki messages.

Summary of files

[edit]

PHP/SQL

[edit]
  • includes/Api/ApiQueryProofread.php — the API module. This is what defines what you can interface with over the MediaWiki API.
  • includes/Api/ApiQueryProofreadInfo.php — API module to retrieve the namespace IDs and quality categories
  • ProofreadPage.alias.php — Localisation file for special pages
  • ProofreadPage.i18n.php — Localisation file for strings and messages
  • includes/ProofreadPage.php — The core PHP file which does the server-side processing including initialisations and hooks
  • sql/tables.json — Initialisation of the SQL database holding Page: data such as proofread status
  • includes/Special/SpecialPagesWithoutScans.php — Code for the "pages without scans" Special: page
  • includes/Special/SpecialProofreadPages.php — Code for the "proofread pages" Special: page

Javascript

[edit]
  • modules/page/ext.proofreadpage.page.edit.js — Set up the Page: namespace edit view, with the side-by-side images
  • modules/index/ext.proofreadpage.index.js — Client-side JS to run on Index: pages

Additionally, there is the following locally stored Javascript:

MediaWiki messages

[edit]

MediaWiki messages are used to customise user-facing aspects of the extension which may differ between wikis, such as the template format used to render a header and the descriptions of the proofread levels.

Core messages
Namespace names
Tooltips and user aid
Quality messages

Gadgets

[edit]

The following Gadgets are not part of the extension, but interact directly with side-by-side editing:

  • MediaWiki:Gadget-old LST.js — Use the old-style LT markup ("<section begin/end="Foobar"/>" instead of "## Foobar ##")
  • mul:Wikisource:Google OCR — a Wikisource toolbar gadget, and standalone tool, for OCRing single images with the Google Cloud Vision service.

External resources

[edit]