From: pjht Date: Sat, 24 Nov 2018 16:39:14 +0000 (-0600) Subject: Add namespace to action=info page X-Git-Tag: 1.34.0-rc.0~3321^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22messagerie%22%29%20.%20%22?a=commitdiff_plain;h=b20e54a20fe3e7927d3691e27fa141f2c2e19e9b;p=lhc%2Fweb%2Fwiklou.git Add namespace to action=info page Bug: T123228 Change-Id: I4f712dc3a80ecb4f53adad69cfcdcf2e1c7f54de --- diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index d0145034c8..27ac96780d 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -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 ]; diff --git a/languages/i18n/en.json b/languages/i18n/en.json index e5de105b5b..1674913f7c 100644 --- a/languages/i18n/en.json +++ b/languages/i18n/en.json @@ -3076,6 +3076,7 @@ "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", diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json index d83152b1fe..63bf2bbecb 100644 --- a/languages/i18n/qqq.json +++ b/languages/i18n/qqq.json @@ -3279,6 +3279,7 @@ "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}}",