Merge "Add namespace to action=info page"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 6 Dec 2018 00:28:44 +0000 (00:28 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 6 Dec 2018 00:28:44 +0000 (00:28 +0000)
includes/actions/InfoAction.php
languages/i18n/en.json
languages/i18n/qqq.json

index 25e4aae..49a6bb5 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 24b2c2e..8564d61 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 6ed5a0c..ab58894 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}}",