From: madman Date: Mon, 27 Aug 2012 15:39:03 +0000 (+0000) Subject: (bug 38556) Add header and footer messages to MediaWiki's info action X-Git-Tag: 1.31.0-rc.0~22551^2 X-Git-Url: https://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=4eda7be04094cfdd21860e61e5891716672d0fa7;p=lhc%2Fweb%2Fwiklou.git (bug 38556) Add header and footer messages to MediaWiki's info action Change-Id: I5d23d83dabc1f642d2b96a17aabd6b6fc9ece399 --- diff --git a/includes/actions/InfoAction.php b/includes/actions/InfoAction.php index 19a0b06ea4..6c213068fb 100644 --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@ -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; } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 0828bbec0d..9873c68f62 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -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 diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index d89b36a9dd..e460c34252 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -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}} diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 2d0f90f1ff..8a0249bdc6 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -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. */ diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 33c104b1fb..5ac8cf85a5 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -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',