Add the page content language to the page information
authorrobin <robinp.1273@gmail.com>
Thu, 25 Oct 2012 23:07:42 +0000 (01:07 +0200)
committerrobin <robinp.1273@gmail.com>
Mon, 29 Oct 2012 11:03:15 +0000 (12:03 +0100)
Change-Id: Id2aa19c66b299e3462cf3bea4020827f9f2ee1ef

includes/actions/InfoAction.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

index e986323..29c3d7e 100644 (file)
@@ -234,6 +234,12 @@ class InfoAction extends FormlessAction {
                // Page ID (number not localised, as it's a database ID)
                $pageInfo['header-basic'][] = array( $this->msg( 'pageinfo-article-id' ), $id );
 
+               // Language in which the page content is (supposed to be) written
+               $pageLang = $title->getPageLanguage()->getCode();
+               $pageInfo['header-basic'][] = array( $this->msg( 'pageinfo-language' ),
+                       Language::fetchLanguageName( $pageLang, $lang->getCode() )
+                       . ' ' . $this->msg( 'parentheses', $pageLang ) );
+
                // Search engine status
                $pOutput = new ParserOutput();
                if ( isset( $pageProperties['noindex'] ) ) {
index fcdefda..832f2c6 100644 (file)
@@ -3753,6 +3753,7 @@ This is probably caused by a link to a blacklisted external site.',
 'pageinfo-default-sort'        => 'Default sort key',
 'pageinfo-length'              => 'Page length (in bytes)',
 'pageinfo-article-id'          => 'Page ID',
+'pageinfo-language'            => 'Page content language',
 'pageinfo-robot-policy'        => 'Search engine status',
 'pageinfo-robot-index'         => 'Indexable',
 'pageinfo-robot-noindex'       => 'Not indexable',
index 0a952de..3fea1f1 100644 (file)
@@ -3545,6 +3545,7 @@ See also {{msg-mw|Anonuser}} and {{msg-mw|Siteusers}}.',
 'pageinfo-default-sort' => 'The key by which the page is sorted in categories by default.',
 'pageinfo-length' => 'પૃષ્ઠની લંબાઇ બાઇટમાં',
 'pageinfo-article-id' => 'The numeric identifier of the page.',
+'pageinfo-language' => 'Language in which the page content is written.',
 'pageinfo-robot-policy' => 'The search engine status of the page, e.g. "marked as index".',
 'pageinfo-robot-index' => 'An indication that the page is indexable.',
 'pageinfo-robot-noindex' => 'An indication that the page is not indexable.',
index 391fd99..56cff94 100644 (file)
@@ -2682,6 +2682,7 @@ $wgMessageStructure = array(
                'pageinfo-default-sort',
                'pageinfo-length',
                'pageinfo-article-id',
+               'pageinfo-language',
                'pageinfo-robot-policy',
                'pageinfo-robot-index',
                'pageinfo-robot-noindex',