(bug 38556) Add header and footer messages to MediaWiki's info action
authormadman <madman.enwiki@gmail.com>
Mon, 27 Aug 2012 15:39:03 +0000 (15:39 +0000)
committermadman <madman.enwiki@gmail.com>
Wed, 29 Aug 2012 15:10:12 +0000 (15:10 +0000)
Change-Id: I5d23d83dabc1f642d2b96a17aabd6b6fc9ece399

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

index 19a0b06..6c21306 100644 (file)
@@ -84,6 +84,11 @@ class InfoAction extends FormlessAction {
                $content = '';
                $table = '';
 
+               // Header
+               if ( !$this->msg( 'pageinfo-header' )->isDisabled() ) {
+                       $content .= $this->msg( 'pageinfo-header ' )->parse();
+               }
+
                // Basic information
                $content = $this->addHeader( $content, $this->msg( 'pageinfo-header-basic' )->text() );
 
@@ -304,6 +309,11 @@ class InfoAction extends FormlessAction {
                        $content = $this->addTable( $content, $table );
                }
 
+               // Footer
+               if ( !$this->msg( 'pageinfo-footer' )->isDisabled() ) {
+                       $content .= $this->msg( 'pageinfo-footer' )->parse();
+               }
+
                return $content;
        }
 
index 0828bbe..9873c68 100644 (file)
@@ -3734,6 +3734,7 @@ This is probably caused by a link to a blacklisted external site.',
 'spam_deleting'       => 'All revisions contained links to $1, deleting',
 
 # Info page
+'pageinfo-header'              => '-', # do not translate or duplicate this message to other languages
 'pageinfo-title'               => 'Information for "$1"',
 'pageinfo-header-basic'        => 'Basic information',
 'pageinfo-header-edits'        => 'Edit history',
@@ -3764,6 +3765,7 @@ This is probably caused by a link to a blacklisted external site.',
 'pageinfo-magic-words'         => 'Magic {{PLURAL:$1|word|words}} ($1)',
 'pageinfo-hidden-categories'   => 'Hidden {{PLURAL:$1|category|categories}} ($1)',
 'pageinfo-templates'           => 'Transcluded {{PLURAL:$1|template|templates}} ($1)',
+'pageinfo-footer'              => '-', # do not translate or duplicate this message to other languages
 
 # Skin names
 'skinname-standard'    => 'Classic', # only translate this message to other languages if you have to change it
index d89b36a..e460c34 100644 (file)
@@ -3455,6 +3455,7 @@ See also {{msg-mw|Anonuser}} and {{msg-mw|Siteusers}}.',
 * $1 is a spammed domain name.',
 
 # Info page
+'pageinfo-header' => 'Header for action=info, set by wiki administrator(s).',
 'pageinfo-title' => 'Page title for action=info. Parameters:
 * $1 is the page name',
 'pageinfo-header-basic' => 'Table section header in action=info.',
@@ -3494,6 +3495,7 @@ See also {{msg-mw|Anonuser}} and {{msg-mw|Siteusers}}.',
 * $1 is the number of hidden categories on the page.',
 'pageinfo-templates' => 'The list of templates transcluded within the page. Parameters:
 * $1 is the number of templates transcluded within the page.',
+'pageinfo-footer' => 'Footer for action=info, set by wiki administrator(s).',
 
 # Skin names
 'skinname-standard' => '{{optional}}
index 2d0f90f..8a0249b 100644 (file)
@@ -243,6 +243,8 @@ $wgIgnoredMessages = array(
        'version-entrypoints-api-php',
        'version-entrypoints-load-php',
        'ipb-default-expiry',
+       'pageinfo-header',
+       'pageinfo-footer',
 );
 
 /** Optional messages, which may be translated only if changed in the target language. */
index 33c104b..5ac8cf8 100644 (file)
@@ -2663,6 +2663,7 @@ $wgMessageStructure = array(
                'spam_deleting',
        ),
        'info' => array(
+               'pageinfo-header',
                'pageinfo-title',
                'pageinfo-header-basic',
                'pageinfo-header-edits',
@@ -2693,6 +2694,7 @@ $wgMessageStructure = array(
                'pageinfo-magic-words',
                'pageinfo-hidden-categories',
                'pageinfo-templates',
+               'pageinfo-footer',
        ),
        'skin' => array(
                'skinname-standard',