From 3ff5a3da27b75a2de0d5e17bf4b371bfd546699b Mon Sep 17 00:00:00 2001 From: umherirrender Date: Wed, 12 Mar 2014 20:09:01 +0100 Subject: [PATCH] Split revdelete-text on Special:RevisionDelete for each type This allows specific text for each type. Types here are: text, file and log Change-Id: Icb24dfb483f940e90215ecc01f5765185963c7ed --- includes/specials/SpecialRevisiondelete.php | 7 ++++++- languages/messages/MessagesEn.php | 6 ++++-- languages/messages/MessagesQqq.php | 13 +++++++++++-- maintenance/language/messages.inc | 5 ++++- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 1d0a302914..da229f0d06 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -66,26 +66,31 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { 'check-label' => 'revdelete-hide-text', 'success' => 'revdelete-success', 'failure' => 'revdelete-failure', + 'text' => 'revdelete-text-text', ), 'archive' => array( 'check-label' => 'revdelete-hide-text', 'success' => 'revdelete-success', 'failure' => 'revdelete-failure', + 'text' => 'revdelete-text-text', ), 'oldimage' => array( 'check-label' => 'revdelete-hide-image', 'success' => 'revdelete-success', 'failure' => 'revdelete-failure', + 'text' => 'revdelete-text-file', ), 'filearchive' => array( 'check-label' => 'revdelete-hide-image', 'success' => 'revdelete-success', 'failure' => 'revdelete-failure', + 'text' => 'revdelete-text-file', ), 'logging' => array( 'check-label' => 'revdelete-hide-name', 'success' => 'logdelete-success', 'failure' => 'logdelete-failure', + 'text' => 'logdelete-text', ), ); @@ -431,7 +436,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { * @todo FIXME: Wikimedia-specific policy text */ protected function addUsageText() { - $this->getOutput()->addWikiMsg( 'revdelete-text' ); + $this->getOutput()->wrapWikiMsg( "$1\n$2", $this->typeLabels['text'], 'revdelete-text-others' ); if ( $this->getUser()->isAllowed( 'suppressrevision' ) ) { $this->getOutput()->addWikiMsg( 'revdelete-suppress-text' ); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index c78548694c..2c2448d66b 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1709,8 +1709,10 @@ function, the specified revision does not exist, or you are attempting to hide t 'revdelete-show-file-submit' => 'Yes', 'revdelete-selected' => '{{PLURAL:$2|Selected revision|Selected revisions}} of [[:$1]]:', 'logdelete-selected' => '{{PLURAL:$1|Selected log event|Selected log events}}:', -'revdelete-text' => 'Deleted revisions and events will still appear in the page history and logs, but parts of their content will be inaccessible to the public. -Other administrators on {{SITENAME}} will still be able to access the hidden content and can undelete it again through this same interface, unless additional restrictions are set.', +'revdelete-text-text' => 'Deleted revisions will still appear in the page history, but parts of their content will be inaccessible to the public.', +'revdelete-text-file' => 'Deleted file versions will still appear in the file history, but parts of their content will be inaccessible to the public.', +'logdelete-text' => 'Deleted log events will still appear in the logs, but parts of their content will be inaccessible to the public.', +'revdelete-text-others' => 'Other administrators on {{SITENAME}} will still be able to access the hidden content and can undelete it again through this same interface, unless additional restrictions are set.', 'revdelete-confirm' => 'Please confirm that you intend to do this, that you understand the consequences, and that you are doing this in accordance with [[{{MediaWiki:Policy-url}}|the policy]].', 'revdelete-suppress-text' => 'Suppression should only be used for the following cases: * potentially libelous information diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 6ebacd4a42..586ccefda3 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -2491,8 +2491,17 @@ Parameters: * $1 - number of log events See also: * {{msg-mw|Revdelete-selected}}', -'revdelete-text' => '{{RevisionDelete}} -This is the introduction explaining the feature.', +'revdelete-text-text' => '{{RevisionDelete}} +This is the introduction explaining the feature. +See also: {{msg-mw|revdelete-text-file}}, {{msg-mw|logdelete-text}}, {{msg-mw|revdelete-text-others}}', +'revdelete-text-file' => '{{RevisionDelete}} +This is the introduction explaining the feature. +See also: {{msg-mw|revdelete-text-text}}, {{msg-mw|logdelete-text}}, {{msg-mw|revdelete-text-others}}', +'logdelete-text' => '{{RevisionDelete}} +This is the introduction explaining the feature. +See also: {{msg-mw|revdelete-text-text}}, {{msg-mw|revdelete-text-file}}, {{msg-mw|revdelete-text-others}}', +'revdelete-text-others' => '{{RevisionDelete}} +This message is shown after one of: {{msg-mw|revdelete-text-text}}, {{msg-mw|revdelete-text-image}}, {{msg-mw|revdelete-text-logging}}', 'revdelete-confirm' => 'This message is a part of the [[mw:RevisionDelete|RevisionDelete]] feature. Refers to {{msg-mw|Policy-url}}. diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 60cc3a888f..437f6c7102 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -869,7 +869,10 @@ $wgMessageStructure = array( 'revdelete-show-file-submit', 'revdelete-selected', 'logdelete-selected', - 'revdelete-text', + 'revdelete-text-text', + 'revdelete-text-file', + 'logdelete-text', + 'revdelete-text-others', 'revdelete-confirm', 'revdelete-suppress-text', 'revdelete-legend', -- 2.20.1