aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/specials/SpecialVersion.php40
-rw-r--r--languages/i18n/en.json1
-rw-r--r--languages/i18n/qqq.json1
3 files changed, 42 insertions, 0 deletions
diff --git a/includes/specials/SpecialVersion.php b/includes/specials/SpecialVersion.php
index 8584e96567dc..e1c9388f1884 100644
--- a/includes/specials/SpecialVersion.php
+++ b/includes/specials/SpecialVersion.php
@@ -225,6 +225,7 @@ class SpecialVersion extends SpecialPage {
$this->getLibraries( $credits ),
$this->getParserTags(),
$this->getParserFunctionHooks(),
+ $this->getParsoidModules(),
$this->getHooks(),
$this->IPInfo(),
];
@@ -954,6 +955,45 @@ class SpecialVersion extends SpecialPage {
}
/**
+ * Obtains a list of installed Parsoid Modules and the associated H2 header
+ *
+ * @return string HTML output
+ */
+ protected function getParsoidModules() {
+ $siteConfig = MediaWikiServices::getInstance()->getParsoidSiteConfig();
+ $modules = $siteConfig->getExtensionModules();
+
+ if ( !$modules ) {
+ return '';
+ }
+
+ $this->addTocSection( 'version-parsoid-modules', 'mw-version-parsoid-modules' );
+
+ $out = Html::rawElement(
+ 'h2',
+ [ 'id' => 'mw-version-parsoid-modules' ],
+ Html::rawElement(
+ 'span',
+ [ 'class' => 'plainlinks' ],
+ $this->getLinkRenderer()->makeExternalLink(
+ 'https://www.mediawiki.org/wiki/Special:MyLanguage/Parsoid',
+ $this->msg( 'version-parsoid-modules' ),
+ $this->getFullTitle()
+ )
+ )
+ );
+
+ $moduleNames = array_map(
+ static fn ( $m )=>Html::element( 'code', [], $m->getConfig()['name'] ),
+ $modules
+ );
+
+ $out .= $this->getLanguage()->listToText( $moduleNames );
+
+ return $out;
+ }
+
+ /**
* Creates and returns the HTML for a single extension category.
*
* @since 1.17
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index b75303234f09..f485c223872e 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -3565,6 +3565,7 @@
"version-hooks": "Hooks",
"version-parser-extensiontags": "Parser extension tags",
"version-parser-function-hooks": "Parser function hooks",
+ "version-parsoid-modules": "Parsoid extension modules",
"version-hook-name": "Hook name",
"version-hook-subscribedby": "Subscribed by",
"version-version": "($1)",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index ab1f44781fb6..18d7f0850674 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -3832,6 +3832,7 @@
"version-hooks": "Shown in [[Special:Version]]\n{{Identical|Hook}}",
"version-parser-extensiontags": "Part of [[Special:Version]].\nThis message is followed by the list of parser extension tags like <code><nowiki><charinsert></nowiki></code>, <code><nowiki><coordinates></nowiki></code>, etc.",
"version-parser-function-hooks": "Shown in [[Special:Version]]",
+ "version-parsoid-modules": "Part of [[Special:Version]].\nThis message is followed by the list of registered Parsoid extension modules.",
"version-hook-name": "Shown in [[Special:Version]].\n\nFor meaning of hook see [[mw:Special:MyLanguage/Manual:Hooks|mw:Manual:Hooks]] and [[w:Hooking]].",
"version-hook-subscribedby": "Shown in [[Special:Version]]",
"version-version": "{{Optional}}\nUsed in [[Special:Version]]. Preceded by the MediaWiki extension name.\n\nParameters:\n* $1 - version number of the extension",