Merge "(bug 33928) make diff title page more relevant"
authorNikerabbit <niklas.laxstrom@gmail.com>
Fri, 11 May 2012 09:05:44 +0000 (09:05 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 11 May 2012 09:05:44 +0000 (09:05 +0000)
1  2 
includes/diff/DifferenceEngine.php
languages/messages/MessagesEn.php
languages/messages/MessagesQqq.php
maintenance/language/messages.inc

@@@ -1,21 -1,6 +1,21 @@@
  <?php
  /**
 - * User interface for the difference engine
 + * User interface for the difference engine.
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License as published by
 + * the Free Software Foundation; either version 2 of the License, or
 + * (at your option) any later version.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 + * GNU General Public License for more details.
 + *
 + * You should have received a copy of the GNU General Public License along
 + * with this program; if not, write to the Free Software Foundation, Inc.,
 + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 + * http://www.gnu.org/copyleft/gpl.html
   *
   * @file
   * @ingroup DifferenceEngine
@@@ -254,8 -239,7 +254,7 @@@ class DifferenceEngine extends ContextS
                # a diff between a version V and its previous version V' AND the version V
                # is the first version of that article. In that case, V' does not exist.
                if ( $this->mOldRev === false ) {
-                       $out->setPageTitle( $this->mNewPage->getPrefixedText() );
-                       $out->addSubtitle( $this->msg( 'difference' ) );
+                       $out->setPageTitle( $this->msg( 'difference-title', $this->mNewPage->getPrefixedText() ) );
                        $samePage = true;
                        $oldHeader = '';
                } else {
                        }
  
                        if ( $this->mNewPage->equals( $this->mOldPage ) ) {
-                               $out->setPageTitle( $this->mNewPage->getPrefixedText() );
-                               $out->addSubtitle( $this->msg( 'difference' ) );
+                               $out->setPageTitle( $this->msg( 'difference-title', $this->mNewPage->getPrefixedText() ) );
                                $samePage = true;
                        } else {
-                               $out->setPageTitle( $this->mOldPage->getPrefixedText() . ', ' . $this->mNewPage->getPrefixedText() );
+                               $out->setPageTitle( $this->msg( 'difference-title-multipage', $this->mOldPage->getPrefixedText(),
+                                       $this->mNewPage->getPrefixedText() ) );
                                $out->addSubtitle( $this->msg( 'difference-multipage' ) );
                                $samePage = false;
                        }
@@@ -1039,8 -1039,6 +1039,8 @@@ The reason given is "\'\'$2\'\'".'
  'filereadonlyerror'    => 'Unable to modify the file "$1" because the file repository "$2" is in read-only mode.
  
  The administrator who locked it offered this explanation: "$3".',
 +'invalidtitle-knownnamespace'   => 'Invalid title with namespace "$2" and text "$3"',
 +'invalidtitle-unknownnamespace' => 'Invalid title with unknown namespace number $1 and text "$2"',
  
  # Virus scanner
  'virus-badscanner'     => "Bad configuration: Unknown virus scanner: ''$1''",
@@@ -1484,8 -1482,6 +1484,8 @@@ These arguments have been omitted."
  'node-count-exceeded-warning'             => 'Page exceeded the node-count',
  'expansion-depth-exceeded-category'       => 'Pages where expansion depth is exceeded',
  'expansion-depth-exceeded-warning'        => 'Page exceeded the expansion depth',
 +'parser-unstrip-loop-warning'             => 'Unstrip loop detected',
 +'parser-unstrip-recursion-limit'          => 'Unstrip recursion limit exceeded ($1)',
  
  # "Undo" feature
  'undo-success' => 'The edit can be undone.
@@@ -1669,15 -1665,16 +1669,16 @@@ Note that using the navigation links wi
  'mergelogpagetext'   => 'Below is a list of the most recent merges of one page history into another.',
  
  # Diffs
- 'history-title'            => 'Revision history of "$1"',
- 'difference'               => '(Difference between revisions)',
- 'difference-multipage'     => '(Difference between pages)',
- 'lineno'                   => 'Line $1:',
- 'compareselectedversions'  => 'Compare selected revisions',
- 'showhideselectedversions' => 'Show/hide selected revisions',
- 'editundo'                 => 'undo',
- 'diff-multi'               => '({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} by {{PLURAL:$2|one user|$2 users}} not shown)',
- 'diff-multi-manyusers'     => '({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} by more than $2 {{PLURAL:$2|user|users}} not shown)',
+ 'history-title'              => 'Revision history of "$1"',
+ 'difference-title'           => 'Difference between revisions of "$1"',
+ 'difference-title-multipage' => 'Difference between pages "$1" and "$2"',
+ 'difference-multipage'       => '(Difference between pages)',
+ 'lineno'                     => 'Line $1:',
+ 'compareselectedversions'    => 'Compare selected revisions',
+ 'showhideselectedversions'   => 'Show/hide selected revisions',
+ 'editundo'                   => 'undo',
+ 'diff-multi'                 => '({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} by {{PLURAL:$2|one user|$2 users}} not shown)',
+ 'diff-multi-manyusers'       => '({{PLURAL:$1|One intermediate revision|$1 intermediate revisions}} by more than $2 {{PLURAL:$2|user|users}} not shown)',
  
  # Search results
  'search-summary'                   => '', # do not translate or duplicate this message to other languages
@@@ -2351,7 -2348,6 +2352,7 @@@ For optimal security, img_auth.php is d
  'http-curl-error'       => 'Error fetching URL: $1',
  'http-host-unreachable' => 'Could not reach URL.',
  'http-bad-status'       => 'There was a problem during the HTTP request: $1 $2',
 +'http-truncated-body'   => 'The request body was only partially received.',
  
  # Some likely curl errors. More could be added from <http://curl.haxx.se/libcurl/c/libcurl-errors.html>
  'upload-curl-error6'       => 'Could not reach URL',
   * @author Rancher
   * @author Raymond
   * @author Robby
 + * @author Rotemliss
   * @author Ryan Schmidt
   * @author SPQRobin
   * @author Sanbec
   * @author Sborsody
   * @author Seb35
   * @author Sherbrooke
 + * @author Shirayuki
   * @author Shushruth
   * @author Siebrand
   * @author Singularity
@@@ -684,13 -682,6 +684,13 @@@ $1 is a filename, I think.'
  'editinginterface' => "A message shown when editing pages in the namespace MediaWiki:. In the [http://translatewiki.net/wiki/Main_Page?setlang=en URL], '''change \"setlang=en\" to your own language code.'''",
  'ns-specialprotected' => 'Error message displayed when trying to edit a page in the Special namespace',
  'titleprotected' => 'Use $1 for GENDER.',
 +'invalidtitle-knownnamespace' => 'Displayed when an invalid title was encountered (generally in a list), but the namespace number is known to exist.
 +* $1 is the namespace number
 +* $2 is the namespace name in content language or {{msg-mw|blanknamespace}} for the main namespace
 +* $3 is the part of the title after the namespace (e.g. SomeName for the page User:SomeName)',
 +'invalidtitle-unknownnamespace' => 'Displayed when an invalid title was encountered (generally in a list) and the namespace number is unknown.
 +* $1 is the namespace number
 +* $2 is the part of the title after the namespace (e.g. SomeName for the page User:SomeName)',
  
  # Login and logout pages
  'logouttext' => 'Log out message',
  'nocookieslogin' => "This message is displayed when someone tried to login, but the browser doesn't accept cookies.",
  'nocookiesfornew' => "This message is displayed when the user tried to create a new account, but it failed the cross-site request forgery (CSRF) check. It could be blocking an attack, but most likely, the browser isn't  accepting cookies.",
  'nocookiesforlogin' => "{{optional}}
 -This message is displayed when someone tried to login and the CSRF failed (most likely, the browser doesn't accept cookies). Defaults to nocookieslogin",
 +This message is displayed when someone tried to login and the CSRF failed (most likely, the browser doesn't accept cookies).
 +
 +Defaults to '''nocookieslogin''' ({{int:nocookieslogin}})",
  'loginsuccesstitle' => 'The title of the page saying that you are logged in. The content of the page is the message "[[MediaWiki:Loginsuccess/{{SUBPAGENAME}}]]".',
  'loginsuccess' => 'The content of the page saying that you are logged in. The title of the page is "[[MediaWiki:Loginsuccesstitle/{{SUBPAGENAME}}|{{int:loginsuccesstitle}}]]". $1 is the name of the logged in user.
  
@@@ -1036,18 -1025,11 +1036,18 @@@ When templates are expanded, there is 
  
  * <tt>$1</tt> is the value of the node-count limit
  * <tt>$2</tt> is the value of the max node-count limit',
 -'expansion-depth-exceeded-category' => 'This message is used as a category name for a [[mw:Help:Tracking categories|tracking category]] where pages are placed automatically if the expansion depth of the preprocessor exceeds the limit.',
 -'expansion-depth-exceeded-warning' => 'Error message shown when a page exceeded the expansion depth limit of the preprocessor
 +'expansion-depth-exceeded-category' => 'This message is used as a category name for a [[mw:Help:Tracking categories|tracking category]] where pages are placed automatically if the [http://meta.wikimedia.org/wiki/Help:Expansion_depth expansion depth] of the preprocessor exceeds the limit.',
 +'expansion-depth-exceeded-warning' => 'Error message shown when a page exceeded the [http://meta.wikimedia.org/wiki/Help:Expansion_depth expansion depth limit] of the preprocessor
  
  * <tt>$1</tt> is the value of the depth limit
  * <tt>$2</tt> is the value of the max depth limit',
 +'parser-unstrip-loop-warning' => 'This error is shown when a parser extension tag such as &lt;pre> includes a reference to itself in its own output.
 +The reference must be to the exact same invocation of the tag at the same location in the source, merely writing &lt;pre>&lt;pre>&lt;/pre>&lt;/pre> will not do it.
 +This is usually impossible and unlikely to happen by accident, so translation is not essential.',
 +'parser-unstrip-recursion-limit' => 'This message is shown when the recursion limit for nested parser extension tags is exceeded.
 +This warning may be encountered due to input text like &lt;ref>&lt;ref>&lt;ref>...&lt;/ref>&lt;/ref>&lt;/ref>.
 +
 +* <tt>$1</tt> is the depth limit',
  
  # "Undo" feature
  'undo-success' => 'Text on special page to confirm edit revert. You arrive on this page by clicking on the "undo" link on a revision history special page.
@@@ -1255,7 -1237,8 +1255,8 @@@ Please note that the parameters in a lo
  
  # Diffs
  'history-title' => 'Displayed as page title when you click on the "history" tab. The parameter $1 is the normal page title.',
- 'difference' => 'Displayed under the title when viewing the difference between two or more edits.',
+ 'difference-title'           => 'Displayed as page title when viewing the difference between two edits of the same page. The parameter $1 is the page title of the two revisions.',
+ 'difference-title-multipage' => 'Displayed as page title when viewing the difference between two edits of different pages. The parameter $1 is the page title of the old revision and $2 is the page title of the new revision.',
  'difference-multipage' => 'Displayed under the title when viewing the difference between two or more pages.
  See also {{msg-mw|difference}}.',
  'lineno' => 'Message used when comparing different versions of a page (diff). $1 is a line number.',
@@@ -2031,7 -2014,6 +2032,7 @@@ Siebrand think this has to do with allo
  
  If \'scheme\' is difficult to translate, then you could use \'prefix\' instead.',
  'http-bad-status' => '$1 is an HTTP error code (e.g. 404), $2 is the HTTP error message (e.g. File Not Found)',
 +'http-truncated-body' => 'This is a standard HTTP error message. → Seems the connection closed prematurely. The HTTP response contained a content-length greater than the received body.',
  
  'license' => 'This appears in the upload form for the license drop-down. The header in the file description page is now at {{msg-mw|License-header}}.',
  'nolicense' => '{{Identical|None selected}}',
@@@ -4443,9 -4425,8 +4444,9 @@@ This is being used in [[Special:Version
  'version-license-info' => '[[wikipedia:GNU GPL|GNU GPL]] notice shown at [[Special:Version]]. See //www.gnu.org/licenses/old-licenses/gpl-2.0-translations.html for available translations.',
  'version-software-product' => 'Shown in [[Special:Version]]',
  'version-software-version' => '{{Identical|Version}}',
 -'version-entrypoints' => 'Header on [[Special:Version]] above a table that lists the URLs of various entry points in this MediaWiki installation.',
 -'version-entrypoints-header-entrypoint' => 'Header for the first column in the entry points table on [[Special:Version]].',
 +'version-entrypoints' => 'Header on [[Special:Version]] above a table that lists the URLs of various entry points in this MediaWiki installation. Entry points are the "places" where the wiki\'s content and information can be accessed in various ways, for instance the standard index.php which shows normal pages, histories etc.',
 +'version-entrypoints-header-entrypoint' => 'Header for the first column in the entry points table on [[Special:Version]].
 +See also {{msg-mw|Version-entrypoints}}',
  'version-entrypoints-header-url' => 'Header for the second column in the entry points table on [[Special:Version]].',
  'version-entrypoints-articlepath' => 'A short description of the article path entry point. Links to the mediawiki.org documentation page for $wgArticlePath.',
  'version-entrypoints-scriptpath' => 'A short description of the script path entry point. Links to the mediawiki.org documentation page for $wgScriptPath.',
@@@ -408,9 -408,7 +408,9 @@@ $wgMessageStructure = array
                'customjsprotected',
                'ns-specialprotected',
                'titleprotected',
 -              'filereadonlyerror'
 +              'filereadonlyerror',
 +              'invalidtitle-knownnamespace',
 +              'invalidtitle-unknownnamespace',
        ),
        'virus' => array(
                'virus-badscanner',
                'node-count-exceeded-warning',
                'expansion-depth-exceeded-category',
                'expansion-depth-exceeded-warning',
 +              'parser-unstrip-loop-warning',
 +              'parser-unstrip-recursion-limit',
        ),
        'undo' => array(
                'undo-success',
        ),
        'diffs' => array(
                'history-title',
-               'difference',
+               'difference-title',
+               'difference-title-multipage',
                'difference-multipage',
                'lineno',
                'compareselectedversions',
                'http-curl-error',
                'http-host-unreachable',
                'http-bad-status',
 +              'http-truncated-body',
        ),
  
        'upload-curl-errors' => array(