Umherirrender has uploaded a new change for review.

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


Change subject: Add content model to the page information
......................................................................

Add content model to the page information

This patch adds a new table row with the content model of the page, this
is usally wikitext, can also be javascript or CSS.

Bug: 56033
Change-Id: If91f6c20d79cd7b3b8924ab6c3df5f90acd8c7a1
---
M RELEASE-NOTES-1.23
M includes/actions/InfoAction.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
M maintenance/language/messages.inc
5 files changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/13/94513/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 7dad672..5ffb98f 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -34,6 +34,7 @@
   and {{REVISIONTIMESTAMP:}} (with friends).
 * Add "wgRelevantUserName" to mw.config containing the current
   Skin::getRelevantUser value.
+* (bug 56033) Add content model to the page information.
 
 === Bug fixes in 1.23 ===
 * (bug 41759) The "updated since last visit" markers (on history pages, recent
diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php
index 7fc9033..17b4dd6 100644
--- a/includes/actions/InfoAction.php
+++ b/includes/actions/InfoAction.php
@@ -277,6 +277,11 @@
                        Language::fetchLanguageName( $pageLang, 
$lang->getCode() )
                        . ' ' . $this->msg( 'parentheses', $pageLang ) );
 
+               // Content model of the page
+               $pageInfo['header-basic'][] = array(
+                       $this->msg( 'pageinfo-content-model' ), 
ContentHandler::getLocalizedName( $title->getContentModel() )
+               );
+
                // Search engine status
                $pOutput = new ParserOutput();
                if ( isset( $pageProperties['noindex'] ) ) {
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 39f0b8a..2baccf5 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -3871,6 +3871,7 @@
 'pageinfo-length'                 => 'Page length (in bytes)',
 'pageinfo-article-id'             => 'Page ID',
 'pageinfo-language'               => 'Page content language',
+'pageinfo-content-model'          => 'Page content model',
 'pageinfo-robot-policy'           => 'Indexing by robots',
 'pageinfo-robot-index'            => 'Allowed',
 'pageinfo-robot-noindex'          => 'Disallowed',
diff --git a/languages/messages/MessagesQqq.php 
b/languages/messages/MessagesQqq.php
index d7123a0..e0ffcc1 100644
--- a/languages/messages/MessagesQqq.php
+++ b/languages/messages/MessagesQqq.php
@@ -8010,6 +8010,13 @@
 'pageinfo-length' => 'The length of the page, in bytes.',
 'pageinfo-article-id' => 'The numeric identifier of the page.',
 'pageinfo-language' => 'Language in which the page content is written.',
+'pageinfo-content-model' => 'The model in which the page content is written.
+
+Used as label. Followed by one of the following messages:
+* {{msg-mw|Content-model-wikitext}}
+* {{msg-mw|Content-model-javascript}}
+* {{msg-mw|Content-model-css}}
+* {{msg-mw|Content-model-text}}',
 'pageinfo-robot-policy' => 'The search engine status of the page.
 
 Used as label. Followed by any one of the following messages:
diff --git a/maintenance/language/messages.inc 
b/maintenance/language/messages.inc
index 1ac9500..17658a0 100644
--- a/maintenance/language/messages.inc
+++ b/maintenance/language/messages.inc
@@ -2788,6 +2788,7 @@
                'pageinfo-length',
                'pageinfo-article-id',
                'pageinfo-language',
+               'pageinfo-content-model',
                'pageinfo-robot-policy',
                'pageinfo-robot-index',
                'pageinfo-robot-noindex',

-- 
To view, visit https://gerrit.wikimedia.org/r/94513
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If91f6c20d79cd7b3b8924ab6c3df5f90acd8c7a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to