Add namespace to action=info page
authorpjht <terppa05@gmail.com>
Sat, 24 Nov 2018 16:39:14 +0000 (10:39 -0600)
committerpjht <terppa05@gmail.com>
Sat, 24 Nov 2018 16:39:14 +0000 (10:39 -0600)
Bug: T123228
Change-Id: I4f712dc3a80ecb4f53adad69cfcdcf2e1c7f54de

includes/actions/InfoAction.php
languages/i18n/en.json
languages/i18n/qqq.json

index d014503..27ac967 100644 (file)
@@ -264,6 +264,12 @@ class InfoAction extends FormlessAction {
                        $this->msg( 'pageinfo-length' ), $lang->formatNum( $title->getLength() )
                ];
 
+               // Page namespace
+               $pageNamespace = $title->getNsText();
+               if ( $pageNamespace ) {
+                       $pageInfo['header-basic'][] = [ $this->msg( 'pageinfo-namespace' ), $pageNamespace ];
+               }
+
                // Page ID (number not localised, as it's a database ID)
                $pageInfo['header-basic'][] = [ $this->msg( 'pageinfo-article-id' ), $id ];
 
index e5de105..1674913 100644 (file)
        "pageinfo-display-title": "Display title",
        "pageinfo-default-sort": "Default sort key",
        "pageinfo-length": "Page length (in bytes)",
+       "pageinfo-namespace": "Namespace",
        "pageinfo-article-id": "Page ID",
        "pageinfo-language": "Page content language",
        "pageinfo-language-change": "change",
index d83152b..63bf2bb 100644 (file)
        "pageinfo-display-title": "The title that is displayed when the page is viewed.",
        "pageinfo-default-sort": "The key by which the page is sorted in categories by default.",
        "pageinfo-length": "The length of the page, in bytes.",
+       "pageinfo-namespace": "The name of the namespace of the page.",
        "pageinfo-article-id": "The numeric identifier of the page.\n{{Identical|Page ID}}",
        "pageinfo-language": "Language in which the page content is written.",
        "pageinfo-language-change": "Link text for a link to Special:PageLanguage. The link will be wrapped in parenthesis.\n{{Identical|Change}}",