Merge "Add a 'revdelete-selected-file' message on Special:RevisionDelete"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 26 Mar 2014 17:18:57 +0000 (17:18 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 26 Mar 2014 17:18:57 +0000 (17:18 +0000)
1  2 
includes/specials/SpecialRevisiondelete.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

@@@ -67,30 -67,35 +67,35 @@@ class SpecialRevisionDelete extends Unl
                        'success' => 'revdelete-success',
                        'failure' => 'revdelete-failure',
                        'text' => 'revdelete-text-text',
+                       'selected'=> 'revdelete-selected-text',
                ),
                'archive' => array(
                        'check-label' => 'revdelete-hide-text',
                        'success' => 'revdelete-success',
                        'failure' => 'revdelete-failure',
                        'text' => 'revdelete-text-text',
+                       'selected'=> 'revdelete-selected-text',
                ),
                'oldimage' => array(
                        'check-label' => 'revdelete-hide-image',
                        'success' => 'revdelete-success',
                        'failure' => 'revdelete-failure',
                        'text' => 'revdelete-text-file',
+                       'selected'=> 'revdelete-selected-file',
                ),
                'filearchive' => array(
                        'check-label' => 'revdelete-hide-image',
                        'success' => 'revdelete-success',
                        'failure' => 'revdelete-failure',
                        'text' => 'revdelete-text-file',
+                       'selected'=> 'revdelete-selected-file',
                ),
                'logging' => array(
                        'check-label' => 'revdelete-hide-name',
                        'success' => 'logdelete-success',
                        'failure' => 'logdelete-failure',
                        'text' => 'logdelete-text',
+                       'selected' => 'logdelete-selected',
                ),
        );
  
                $this->token = $request->getVal( 'token' );
                if ( $this->archiveName && $this->targetObj ) {
                        $this->tryShowFile( $this->archiveName );
 +
                        return;
                }
  
                # We need a target page!
                if ( is_null( $this->targetObj ) ) {
                        $output->addWikiMsg( 'undelete-header' );
 +
                        return;
                }
                # Give a link to the logs/hist for this page
                $conds['log_action'] = $this->getList()->getLogAction();
                $conds['ls_field'] = RevisionDeleter::getRelationType( $this->typeName );
                $conds['ls_value'] = $this->ids;
 +
                return $conds;
        }
  
                // Check if user is allowed to see this file
                if ( !$oimage->exists() ) {
                        $this->getOutput()->addWikiMsg( 'revdelete-no-file' );
 +
                        return;
                }
                $user = $this->getUser();
                                Xml::submitButton( $this->msg( 'revdelete-show-file-submit' )->text() ) .
                                '</form>'
                        );
 +
                        return;
                }
                $this->getOutput()->disable();
                                $this->typeName, $this->getContext(), $this->targetObj, $this->ids
                        );
                }
 +
                return $this->list;
        }
  
        protected function showForm() {
                $userAllowed = true;
  
-               if ( $this->typeName == 'logging' ) {
-                       $this->getOutput()->addWikiMsg( 'logdelete-selected', $this->getLanguage()->formatNum( count( $this->ids ) ) );
-               } else {
-                       $this->getOutput()->addWikiMsg( 'revdelete-selected',
-                               $this->targetObj->getPrefixedText(), count( $this->ids ) );
-               }
+               $this->getOutput()->wrapWikiMsg( "<strong>$1</strong>", array( $this->typeLabels['selected'],
+                       $this->getLanguage()->formatNum( count( $this->ids ) ), $this->targetObj->getPrefixedText() ) );
  
                $this->getOutput()->addHTML( "<ul>" );
  
                                $line = Xml::tags( 'td', array( 'class' => 'mw-input' ), $innerHTML );
                                $html .= "<tr>$line</tr>\n";
                        }
 -              // Otherwise, use tri-state radios
                } else {
 +                      // Otherwise, use tri-state radios
                        $html .= '<tr>';
                        $html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-same' )->escaped() . '</th>';
                        $html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-unset' )->escaped() . '</th>';
                }
  
                $html .= '</table>';
 +
                return $html;
        }
  
                $token = $this->getRequest()->getVal( 'wpEditToken' );
                if ( $this->submitClicked && !$this->getUser()->matchEditToken( $token ) ) {
                        $this->getOutput()->addWikiMsg( 'sessionfailure' );
 +
                        return false;
                }
                $bitParams = $this->extractBitParams();
                $status = $this->save( $bitParams, $comment, $this->targetObj );
                if ( $status->isGood() ) {
                        $this->success();
 +
                        return true;
 -              # ...otherwise, bounce back to form...
                } else {
 +                      # ...otherwise, bounce back to form...
                        $this->failure( $status );
                }
 +
                return false;
        }
  
                if ( !isset( $bitfield[Revision::DELETED_RESTRICTED] ) ) {
                        $bitfield[Revision::DELETED_RESTRICTED] = 0;
                }
 +
                return $bitfield;
        }
  
@@@ -423,7 -423,6 +423,7 @@@ $specialPageAliases = array
        'Listfiles'                 => array( 'ListFiles', 'FileList', 'ImageList' ),
        'Listgrouprights'           => array( 'ListGroupRights', 'UserGroupRights' ),
        'Listredirects'             => array( 'ListRedirects' ),
 +      'ListDuplicatedFiles'       => array( 'ListDuplicatedFiles', 'ListFileDuplicates' ),
        'Listusers'                 => array( 'ListUsers', 'UserList' ),
        'Lockdb'                    => array( 'LockDB' ),
        'Log'                       => array( 'Log', 'Logs' ),
        'Redirect'                  => array( 'Redirect' ),
        'ResetTokens'               => array( 'ResetTokens' ),
        'Revisiondelete'            => array( 'RevisionDelete' ),
 +      'RunJobs'                   => array( 'RunJobs' ),
        'Search'                    => array( 'Search' ),
        'Shortpages'                => array( 'ShortPages' ),
        'Specialpages'              => array( 'SpecialPages' ),
@@@ -655,7 -653,6 +655,7 @@@ future releases. Also note that since e
  ** mainpage|mainpage-description
  ** recentchanges-url|recentchanges
  ** randompage-url|randompage
 +** helppage|help
  * SEARCH
  * TOOLBOX
  * LANGUAGES', # do not translate or duplicate this message to other languages
@@@ -915,7 -912,7 +915,7 @@@ $1'
  'disclaimerpage'       => 'Project:General disclaimer',
  'edithelp'             => 'Editing help',
  'edithelppage'         => 'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Editing_pages', # do not translate or duplicate this message to other languages
 -'helppage'             => 'Help:Contents',
 +'helppage'             => 'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents',
  'mainpage'             => 'Main Page',
  'mainpage-description' => 'Main page',
  'policy-url'           => 'Project:Policy',
@@@ -1129,8 -1126,8 +1129,8 @@@ You can change your {{SITENAME}} [[Spec
  'gotaccountlink'                  => 'Log in',
  'userlogin-resetlink'             => 'Forgotten your login details?',
  'userlogin-resetpassword-link'    => 'Forgot your password?',
 -'helplogin-url'                   => 'Help:Logging in',
 -'userlogin-helplink'              => '[[{{MediaWiki:helplogin-url}}|Help with logging in]]',
 +'helplogin-url'                   => 'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Logging_in',
 +'userlogin-helplink2'              => 'Help with logging in',
  'userlogin-loggedin'              => 'You are already logged in as {{GENDER:$1|$1}}.
  Use the form below to log in as another user.',
  'userlogin-createanother'         => 'Create another account',
@@@ -1292,9 -1289,6 +1292,9 @@@ To finish logging in, you must set a ne
  'resetpass-abort-generic'   => 'Password change has been aborted by an extension.',
  'resetpass-expired'         => 'Your password has expired. Please set a new password to log in.',
  'resetpass-expired-soft'    => 'Your password has expired and needs to be reset. Please choose a new password now, or click "{{int:resetpass-submit-cancel}}" to reset it later.',
 +'resetpass-validity-soft'     => 'Your password is not valid: $1
 +
 +Please choose a new password now, or click "{{int:resetpass-submit-cancel}}" to reset it later.',
  
  # Special:PasswordReset
  'passwordreset'                    => 'Reset password',
@@@ -1448,9 -1442,9 +1448,9 @@@ It may have been moved or deleted whil
  'accmailtext'                              => 'A randomly generated password for [[User talk:$1|$1]] has been sent to $2. It can be changed on the <em>[[Special:ChangePassword|change password]]</em> page upon logging in.',
  'newarticle'                               => '(New)',
  'newarticletext'                           => "You have followed a link to a page that does not exist yet.
 -To create the page, start typing in the box below (see the [[{{MediaWiki:Helppage}}|help page]] for more info).
 +To create the page, start typing in the box below (see the [$1 help page] for more info).
  If you are here by mistake, click your browser's <strong>back</strong> button.",
 -'newarticletextanon'                       => '{{int:newarticletext}}', # do not translate or duplicate this message to other languages
 +'newarticletextanon'                       => '{{int:newarticletext|$1}}', # do not translate or duplicate this message to other languages
  'talkpagetext'                             => '<!-- MediaWiki:talkpagetext -->', # do not translate or duplicate this message to other languages
  'anontalkpagetext'                         => '----
  <em>This is the discussion page for an anonymous user who has not created an account yet, or who does not use it.</em>
@@@ -1714,8 -1708,9 +1714,9 @@@ function, the specified revision does n
  'revdelete-no-file'           => 'The file specified does not exist.',
  'revdelete-show-file-confirm' => 'Are you sure you want to view a deleted revision of the file "<nowiki>$1</nowiki>" from $2 at $3?',
  'revdelete-show-file-submit'  => 'Yes',
- 'revdelete-selected'          => '<strong>{{PLURAL:$2|Selected revision|Selected revisions}} of [[:$1]]:</strong>',
- 'logdelete-selected'          => '<strong>{{PLURAL:$1|Selected log event|Selected log events}}:</strong>',
+ 'revdelete-selected-text'     => '{{PLURAL:$1|Selected revision|Selected revisions}} of [[:$2]]:',
+ 'revdelete-selected-file'     => '{{PLURAL:$1|Selected file version|Selected file versions}} of [[:$2]]:',
+ 'logdelete-selected'          => '{{PLURAL:$1|Selected log event|Selected log events}}:',
  '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.',
@@@ -2642,10 -2637,6 +2643,10 @@@ Input: contenttype/subtype, e.g. <code>
  'listredirects'         => 'List of redirects',
  'listredirects-summary' => '', # do not translate or duplicate this message to other languages
  
 +'listduplicatedfiles' => 'List of files with duplicates',
 +'listduplicatedfiles-summary' => 'This is a list of files where the most recent version of the file is a duplicate of the most recent version of some other file. Only local files are considered.',
 +'listduplicatedfiles-entry' => '[[:File:$1|$1]] has [[$3|{{PLURAL:$2|a duplicate|$2 duplicates}}]].',
 +
  # Unused templates
  'unusedtemplates'         => 'Unused templates',
  'unusedtemplates-summary' => '', # do not translate or duplicate this message to other languages
@@@ -2792,7 -2783,7 +2793,7 @@@ It now redirects to [[$2]].'
  'deadendpagestext'                 => 'The following pages do not link to other pages in {{SITENAME}}.',
  'protectedpages'                   => 'Protected pages',
  'protectedpages-indef'             => 'Indefinite protections only',
 -'protectedpages-summary'           => 'This page lists existing pages that are currently protected. For a list of titles that are protected from creation, see [[{{#special:ProtectedTitles}}]].',
 +'protectedpages-summary'           => 'This page lists existing pages that are currently protected. For a list of titles that are protected from creation, see [[{{#special:ProtectedTitles}}|{{int:protectedtitles}}]].',
  'protectedpages-cascade'           => 'Cascading protections only',
  'protectedpages-noredirect'        => 'Hide redirects',
  'protectedpagesempty'              => 'No pages are currently protected with these parameters.',
  'protectedpages-unknown-performer' => 'Unknown user',
  'protectedpages-unknown-reason'    => '—', # do not translate or duplicate this message to other languages
  'protectedtitles'                  => 'Protected titles',
 -'protectedtitles-summary'          => 'This page lists titles that are currently protected from creation. For a list of existing pages that are protected, see [[{{#special:ProtectedPages}}]].',
 +'protectedtitles-summary'          => 'This page lists titles that are currently protected from creation. For a list of existing pages that are protected, see [[{{#special:ProtectedPages}}|{{int:protectedpages}}]].',
  'protectedtitlesempty'             => 'No titles are currently protected with these parameters.',
  'listusers'                        => 'User list',
  'listusers-summary'                => '', # do not translate or duplicate this message to other languages
@@@ -3157,7 -3148,7 +3158,7 @@@ Here are the current settings for the p
  'protect-locked-access'            => 'Your account does not have permission to change page protection levels.
  Here are the current settings for the page <strong>$1</strong>:',
  'protect-cascadeon'                => "This page is currently protected because it is included in the following {{PLURAL:$1|page, which has|pages, which have}} cascading protection turned on.
 -You can change this page's protection level, but it will not affect the cascading protection.",
 +Changes to this page's protection level will not affect the cascading protection.",
  'protect-default'                  => 'Allow all users',
  'protect-fallback'                 => 'Allow only users with "$1" permission',
  'protect-level-autoconfirmed'      => 'Allow only autoconfirmed users',
@@@ -741,6 -741,9 +741,6 @@@ See also
  'disclaimerpage' => '{{doc-important|Do not change the <code>Project:</code> part.}}
  Used as page for that contains the site disclaimer. Used at the bottom of every page on the wiki. Example: [[{{MediaWiki:Disclaimerpage}}|{{MediaWiki:Disclaimers}}]].',
  'edithelp' => 'This is the text that appears on the editing help link that is near the bottom of the editing page',
 -'helppage' => '{{doc-important|Do not change the <code>Help:</code> part.}}
 -The link destination used by default in the sidebar, and in {{msg-mw|Noarticletext}}.
 -{{Identical|HelpContent}}',
  'mainpage' => 'Defines the link and display name of the main page of the wiki. Shown as the top link in the navigation part of the interface. Please do not change it too often, that could break things!
  
  See also:
@@@ -1340,7 -1343,12 +1340,7 @@@ See example: [[Special:UserLogin]
  
  userlogin-resetpassword-link may have to be shorter than the old {{msg-mw|userlogin-resetlink}}.
  {{Identical|Forgot your password}}',
 -'helplogin-url' => '{{doc-important|Do not translate the namespace name <code>Help</code>.}}
 -Used as name of the page that provides information about logging into the wiki.
 -
 -Used as a link target in the message {{msg-mw|Userlogin-helplink}}.',
 -'userlogin-helplink' => '{{doc-important|Do not change <code><nowiki>{{MediaWiki:helplogin-url}}</nowiki></code>.}}
 -Wikitext linking to login help.
 +'userlogin-helplink2' => 'Label for a link to login help.
  
  See example: [[Special:UserLogin]]
  
@@@ -1639,12 -1647,6 +1639,12 @@@ Parameters
  'resetpass-abort-generic' => 'Generic error message shown on [[Special:ChangePassword]] when an extension aborts a password change from a hook.',
  'resetpass-expired' => "Generic error message shown on [[Special:ChangePassword]] when a user's password is expired",
  'resetpass-expired-soft' => 'Generic warning message shown on [[Special:ChangePassword]] when a user needs to reset their password, but they are not prevented from logging in at this time',
 +'resetpass-validity-soft' => 'Warning message shown on [[Special:ChangePassword]] when a user needs to reset their password, because their password is not valid.
 +
 +Refers to {{msg-mw|Resetpass-submit-cancel}}.
 +
 +Parameters:
 +* $1 - error message',
  
  # Special:PasswordReset
  'passwordreset' => 'Title of [[Special:PasswordReset]].
@@@ -1949,9 -1951,10 +1949,9 @@@ Parameters
  * $1 - username
  * $2 - email address",
  'newarticle' => '{{Identical|New}}',
 -'newarticletext' => '{{doc-important|Do not translate <code><nowiki>{{MediaWiki:Helppage}}</nowiki></code>.}}
 -Text displayed above the edit box in editor when trying to create a new page.
 -
 -Refers to {{msg-mw|Helppage}}.',
 +'newarticletext' => 'Text displayed above the edit box in editor when trying to create a new page.
 +Parameters:
 +* $1 - The URL to the help page, defined in {{msg-mw|helppage}}',
  'anontalkpagetext' => 'Displayed at the bottom of talk pages of anonymous users.',
  'noarticletext' => 'This is the message that you get if you search for a term that has not yet got any entries on the wiki.
  
@@@ -2479,44 -2482,40 +2479,55 @@@ Parameters
  'revdelete-show-file-submit' => 'Reply to {{msg-mw|Revdelete-show-file-confirm}}.
  
  {{Identical|Yes}}',
- 'revdelete-selected' => '{{RevisionDelete}}
+ 'revdelete-selected-text' => '{{RevisionDelete}}
  Parameters:
- * $1 - page title
- * $2 - number of revisions
+ * $1 - number of revisions
+ * $2 - page title
+ See also:
+ * {{msg-mw|Logdelete-selected}}
+ * {{msg-mw|Revdelete-selected-file}}
+ [[File:RevDelete Special-RevisionDelete (r60428).png|frame|center|Screenshot of the interface]]',
+ 'revdelete-selected-file' => '{{RevisionDelete}}
+ Parameters:
+ * $1 - number of file versions
+ * $2 - file name
  See also:
  * {{msg-mw|Logdelete-selected}}
+ * {{msg-mw|Revdelete-selected-text}}
  [[File:RevDelete Special-RevisionDelete (r60428).png|frame|center|Screenshot of the interface]]',
  'logdelete-selected' => '{{RevisionDelete}}
  Parameters:
  * $1 - number of log events
+ * $2 - localized name of Special:Log, maybe with type as subpage [unused]
  See also:
- * {{msg-mw|Revdelete-selected}}',
+ * {{msg-mw|Revdelete-selected-text}}
+ * {{msg-mw|Revdelete-selected-file}}',
  '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}}',
 +
 +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}}',
 +
 +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}}',
 +
 +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}}',
 +This message is shown after one of:
 +* {{msg-mw|Revdelete-text-text}}
 +* {{msg-mw|Revdelete-text-file}}
 +* {{msg-mw|Logdelete-text}}',
  'revdelete-confirm' => 'This message is a part of the [[mw:RevisionDelete|RevisionDelete]] feature.
  
  Refers to {{msg-mw|Policy-url}}.
@@@ -4895,14 -4894,6 +4906,14 @@@ See also
  # List redirects
  'listredirects' => '{{doc-special|ListRedirects}}',
  
 +# List duplicated files special page
 +'listduplicatedfiles' => '{{doc-special|ListDuplicatedFiles}}',
 +'listduplicatedfiles-summary' => 'Summary at top of Special:ListDuplicatedFiles',
 +'listduplicatedfiles-entry' => 'A list item on [[Special:ListDuplicatedFiles]]. Parameters:
 +* $1 - the file name (no namespace prefix)
 +* $2 - the number of duplicates this file has
 +* $3 - the name of the duplicate search page (aka "Special:FileDuplicateSearch/Foo.png" or "Spécial:Recherche_fichier_en_double/Firefox.png")',
 +
  # Unused templates
  'unusedtemplates' => '{{doc-special|UnusedTemplates}}',
  'unusedtemplatestext' => 'Shown on top of [[Special:Unusedtemplates]]',
@@@ -471,7 -471,7 +471,7 @@@ $wgMessageStructure = array
                'userlogin-resetlink',
                'userlogin-resetpassword-link',
                'helplogin-url',
 -              'userlogin-helplink',
 +              'userlogin-helplink2',
                'userlogin-loggedin',
                'userlogin-createanother',
                'createacct-join',
                'resetpass-abort-generic',
                'resetpass-expired',
                'resetpass-expired-soft',
 +              'resetpass-validity-soft',
        ),
        'passwordreset' => array(
                'passwordreset',
                'revdelete-no-file',
                'revdelete-show-file-confirm',
                'revdelete-show-file-submit',
-               'revdelete-selected',
+               'revdelete-selected-text',
+               'revdelete-selected-file',
                'logdelete-selected',
                'revdelete-text-text',
                'revdelete-text-file',
                'listredirects',
                'listredirects-summary',
        ),
 +      'listduplicatedfiles' => array(
 +              'listduplicatedfiles',
 +              'listduplicatedfiles-summary',
 +              'listduplicatedfiles-entry',
 +      ),
        'unusedtemplates' => array(
                'unusedtemplates',
                'unusedtemplates-summary',
@@@ -4108,7 -4103,6 +4109,7 @@@ future releases. Also note that since e
        'filedelete' => 'File deletion',
        'mimesearch' => 'MIME search',
        'unwatchedpages' => 'Unwatched pages',
 +      'listduplicatedfiles' => 'List duplicated files special page',
        'listredirects' => 'List redirects',
        'unusedtemplates' => 'Unused templates',
        'randompage' => 'Random page',