r45288 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45287‎ | r45288 | r45289 >
Date:15:51, 1 January 2009
Author:raymond
Status:reverted (Comments)
Tags:
Comment:
* Add a new message 'movepage-moved-noredirect' for page moves with suppressed redirects
* Tweak 'movepage-moved' a bit (rename of message seems unnecessary)
Modified paths:
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1878,6 +1878,7 @@
18791879 'movepagebtn',
18801880 'pagemovedsub',
18811881 'movepage-moved',
 1882+ 'movepage-moved-noredirect',
18821883 'articleexists',
18831884 'cantmove-titleprotected',
18841885 'talkexists',
@@ -3088,6 +3089,7 @@
30893090 'exif-orientation-7' => '0th row: right; 0th column: bottom',
30903091 'exif-orientation-8' => '0th row: left; 0th column: bottom',
30913092 'movepage-moved' => 'The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.',
 3093+ 'movepage-moved-noredirect' => 'The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.',
30923094 'ipboptions' => 'display1:time1,display2:time2,...',
30933095 'protect-expiry-options' => 'display1:time1,display2:time2,...',
30943096 'metadata-fields' => 'Do not translate list items',
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -168,8 +168,7 @@
169169
170170 $wgOut->addHTML(
171171 Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) .
172 - Xml::openElement( 'fieldset' ) .
173 - Xml::element( 'legend', null, wfMsg( 'move-page-legend' ) ) .
 172+ Xml::fieldset( wfMsg( 'move-page-legend' ) ) .
174173 Xml::openElement( 'table', array( 'border' => '0', 'id' => 'mw-movepage-table' ) ) .
175174 "<tr>
176175 <td class='mw-label'>" .
@@ -349,7 +348,8 @@
350349 $oldLink = "<span class='plainlinks'>[$oldUrl $oldText]</span>";
351350 $newLink = "<span class='plainlinks'>[$newUrl $newText]</span>";
352351
353 - $wgOut->addWikiMsg( 'movepage-moved', $oldLink, $newLink, $oldText, $newText );
 352+ $msgName = $createRedirect ? 'movepage-moved' : 'movepage-moved-noredirect';
 353+ $wgOut->addWikiMsg( $msgName, $oldLink, $newLink, $oldText, $newText );
354354
355355 # Now we move extra pages we've been asked to move: subpages and talk
356356 # pages. First, if the old page or the new page is a talk page, we
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2699,7 +2699,12 @@
27002700 'move-watch' => 'Watch this page',
27012701 'movepagebtn' => 'Move page',
27022702 'pagemovedsub' => 'Move succeeded',
2703 -'movepage-moved' => '<big>\'\'\'"$1" has been moved to "$2"\'\'\'</big>', # The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.
 2703+'movepage-moved' => '<big>\'\'\'"$1" has been moved to "$2"\'\'\'</big>
 2704+
 2705+A redirect has been created.', # The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.
 2706+'movepage-moved-noredirect' => '<big>\'\'\'"$1" has been moved to "$2"\'\'\'</big>
 2707+
 2708+The creation of a redirect has been suppressed.', # The two titles are passed in plain text as $3 and $4 to allow additional goodies in the message.
27042709 'articleexists' => 'A page of that name already exists, or the name you have chosen is not valid.
27052710 Please choose another name.',
27062711 'cantmove-titleprotected' => 'You cannot move a page to this location, because the new title has been protected from creation',

Follow-up revisions

RevisionCommit summaryAuthorDate
r45460Revert r45288 " * Add a new message 'movepage-moved-noredirect' for page move...brion21:15, 6 January 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   21:02, 6 January 2009

This duplicates a core part of the message in order to have two copies with some additional bit of information? Looks very wrong. Should be done with a core message "page has been moved" and a separate one "a redirect has / has not been created".

#Comment by Brion VIBBER (talk | contribs)   21:13, 6 January 2009

Note I'm partway through reverting this...

#Comment by Brion VIBBER (talk | contribs)   21:15, 6 January 2009

This part and some of the localization updates for it reverted in r45460. Raymond is doing add'l work.

#Comment by Raymond (talk | contribs)   21:45, 6 January 2009

Revert of all message files done with r45461.

Status & tagging log