r102417 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102416‎ | r102417 | r102418 >
Date:18:01, 8 November 2011
Author:ialex
Status:ok (Comments)
Tags:
Comment:
* Changed OutputPage's handling of subtitles to use an array and implode it with "<br />" so that callers don't have to bother whether there's already a subtitle when adding new ones
* Make OutputPage::setSubtitle(), OutputPage::addSubtitle() and OutputPage::appendSubtitle() accept a Message object in addition to a string
* Added new method OutputPage::addSubtitle() to replace appendSubtitle() and marked it as deprecated
* Clear the subtitles when showing an error page
* Always show the subtitle from Article::viewRedirect() when showing a page; left the parameter for use in EditPage
* Make Article::setOldSubtitle() add two subtitles and has to set "display:inline;" for the three possible divs to avoid too many spacing
* Removed the six different backlink subtitles and added one new message 'backlinksubtitle' to replace them and added OutputPage::addBacklinkSubtitle() to factorise common code
* Changed EditPage's view source to show "View source for <Page>" with the same backlink in subtitle for consistency with other back links and page titles
Modified paths:
  • /trunk/extensions/Video/RevertVideoAction.php (modified) (history)
  • /trunk/phase3/includes/Article.php (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)
  • /trunk/phase3/includes/FileDeleteForm.php (modified) (history)
  • /trunk/phase3/includes/ProtectionForm.php (modified) (history)
  • /trunk/phase3/includes/actions/RevertAction.php (modified) (history)
  • /trunk/phase3/includes/diff/DifferenceEngine.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialDeletedContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialEditWatchlist.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialLockdb.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMovepage.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchangeslinked.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRevisiondelete.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUnlockdb.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWatchlist.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesQqq.php (modified) (history)
  • /trunk/phase3/maintenance/language/messageTypes.inc (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)
  • /trunk/phase3/skins/common/shared.css (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -301,6 +301,7 @@
302302 'ok',
303303 'pagetitle',
304304 'pagetitle-view-mainpage',
 305+ 'backlinksubtitle',
305306 'retrievedfrom',
306307 'youhavenewmessages',
307308 'newmessageslink',
@@ -393,7 +394,7 @@
394395 'querypage-no-updates',
395396 'wrong_wfQuery_params',
396397 'viewsource',
397 - 'viewsourcefor',
 398+ 'viewsource-title',
398399 'actionthrottled',
399400 'actionthrottledtext',
400401 'protectedpagetext',
@@ -1236,7 +1237,6 @@
12371238 'recentchangeslinked-feed',
12381239 'recentchangeslinked-toolbox',
12391240 'recentchangeslinked-title',
1240 - 'recentchangeslinked-backlink',
12411241 'recentchangeslinked-noresult',
12421242 'recentchangeslinked-summary',
12431243 'recentchangeslinked-page',
@@ -1457,7 +1457,6 @@
14581458 ),
14591459 'filerevert' => array(
14601460 'filerevert',
1461 - 'filerevert-backlink',
14621461 'filerevert-legend',
14631462 'filerevert-intro',
14641463 'filerevert-comment',
@@ -1468,7 +1467,6 @@
14691468 ),
14701469 'filedelete' => array(
14711470 'filedelete',
1472 - 'filedelete-backlink',
14731471 'filedelete-legend',
14741472 'filedelete-intro',
14751473 'filedelete-intro-old',
@@ -1851,7 +1849,6 @@
18521850 'exbeforeblank',
18531851 'exblank',
18541852 'delete-confirm',
1855 - 'delete-backlink',
18561853 'delete-legend',
18571854 'historywarning',
18581855 'confirmdeletetext',
@@ -1898,7 +1895,6 @@
18991896 'prot_1movedto2',
19001897 'protect-badnamespace-title',
19011898 'protect-badnamespace-text',
1902 - 'protect-backlink',
19031899 'protect-legend',
19041900 'protectcomment',
19051901 'protectexpiry',
@@ -2030,7 +2026,6 @@
20312027 'whatlinkshere-title',
20322028 'whatlinkshere-summary',
20332029 'whatlinkshere-page',
2034 - 'whatlinkshere-backlink',
20352030 'linkshere',
20362031 'nolinkshere',
20372032 'nolinkshere-ns',
Index: trunk/phase3/maintenance/language/messageTypes.inc
@@ -315,10 +315,6 @@
316316 'minutes-abbrev',
317317 'hours-abbrev',
318318 'days-abbrev',
319 - 'filerevert-backlink',
320 - 'filedelete-backlink',
321 - 'delete-backlink',
322 - 'protect-backlink',
323319 'pagetitle',
324320 'filename-prefix-blacklist',
325321 'edittools',
@@ -393,11 +389,10 @@
394390 'listgrouprights-right-display',
395391 'listgrouprights-right-revoked',
396392 'timezone-utc',
397 - 'whatlinkshere-backlink',
398 - 'recentchangeslinked-backlink',
399393 'unpatrolledletter',
400394 'diff-with-additional',
401395 'pagetitle-view-mainpage',
 396+ 'backlinksubtitle',
402397 'trackback',
403398 'trackbackexcerpt',
404399 'prefs-registration-date-time',
Index: trunk/phase3/skins/common/shared.css
@@ -970,8 +970,10 @@
971971 }
972972
973973 #mw-revision-info,
 974+#mw-revision-info-current,
974975 #mw-revision-nav {
975976 direction: ltr;
 977+ display: inline;
976978 }
977979
978980 /* Images */
Index: trunk/phase3/includes/ProtectionForm.php
@@ -236,11 +236,8 @@
237237 wfEscapeWikiText( $this->mTitle->getPrefixedText() ) );
238238 }
239239
240 - $titleLink = Linker::link( $this->mTitle );
241 - $wgOut->setSubtitle( wfMsg( 'protect-backlink', $titleLink ) );
242 -
 240+ $wgOut->addBacklinkSubtitle( $this->mTitle );
243241 $wgOut->addHTML( $this->buildForm() );
244 -
245242 $this->showLogExtract( $wgOut );
246243 }
247244
Index: trunk/phase3/includes/diff/DifferenceEngine.php
@@ -264,7 +264,7 @@
265265 # is the first version of that article. In that case, V' does not exist.
266266 if ( $this->mOldRev === false ) {
267267 $wgOut->setPageTitle( $this->mNewPage->getPrefixedText() );
268 - $wgOut->setSubtitle( wfMsgExt( 'difference', array( 'parseinline' ) ) );
 268+ $wgOut->addSubtitle( wfMessage( 'difference' ) );
269269 $samePage = true;
270270 $oldHeader = '';
271271 } else {
@@ -277,11 +277,11 @@
278278
279279 if ( $this->mNewPage->equals( $this->mOldPage ) ) {
280280 $wgOut->setPageTitle( $this->mNewPage->getPrefixedText() );
281 - $wgOut->setSubtitle( wfMsgExt( 'difference', array( 'parseinline' ) ) );
 281+ $wgOut->addSubtitle( wfMessage( 'difference' ) );
282282 $samePage = true;
283283 } else {
284284 $wgOut->setPageTitle( $this->mOldPage->getPrefixedText() . ', ' . $this->mNewPage->getPrefixedText() );
285 - $wgOut->setSubtitle( wfMsgExt( 'difference-multipage', array( 'parseinline' ) ) );
 285+ $wgOut->addSubtitle( wfMessage( 'difference-multipage' ) );
286286 $samePage = false;
287287 }
288288
Index: trunk/phase3/includes/Article.php
@@ -434,7 +434,7 @@
435435 wfIncrStats( 'pcache_miss_stub' );
436436 }
437437
438 - $wasRedirected = $this->showRedirectedFromHeader();
 438+ $this->showRedirectedFromHeader();
439439 $this->showNamespaceHeader();
440440
441441 # Iterate through the possible ways of constructing the output text.
@@ -524,8 +524,7 @@
525525 if ( $rt ) {
526526 wfDebug( __METHOD__ . ": showing redirect=no page\n" );
527527 # Viewing a redirect page (e.g. with parameter redirect=no)
528 - # Don't append the subtitle if this was an old revision
529 - $wgOut->addHTML( $this->viewRedirect( $rt, !$wasRedirected && $this->isCurrent() ) );
 528+ $wgOut->addHTML( $this->viewRedirect( $rt ) );
530529 # Parse just to get categories, displaytitle, etc.
531530 $this->mParserOutput = $wgParser->parse( $text, $this->getTitle(), $parserOptions );
532531 $wgOut->addParserOutputNoText( $this->mParserOutput );
@@ -772,16 +771,14 @@
773772 // This is an internally redirected page view.
774773 // We'll need a backlink to the source page for navigation.
775774 if ( wfRunHooks( 'ArticleViewRedirect', array( &$this ) ) ) {
776 - $redir = Linker::link(
 775+ $redir = Linker::linkKnown(
777776 $this->mRedirectedFrom,
778777 null,
779778 array(),
780 - array( 'redirect' => 'no' ),
781 - array( 'known', 'noclasses' )
 779+ array( 'redirect' => 'no' )
782780 );
783781
784 - $s = wfMsgExt( 'redirectedfrom', array( 'parseinline', 'replaceafter' ), $redir );
785 - $wgOut->setSubtitle( $s );
 782+ $wgOut->addSubtitle( wfMessage( 'redirectedfrom' )->rawParams( $redir ) );
786783
787784 // Set the fragment if one was specified in the redirect
788785 if ( strval( $this->getTitle()->getFragment() ) != '' ) {
@@ -801,8 +798,7 @@
802799 // If it was reported from a trusted site, supply a backlink.
803800 if ( $wgRedirectSources && preg_match( $wgRedirectSources, $rdfrom ) ) {
804801 $redir = Linker::makeExternalLink( $rdfrom, $rdfrom );
805 - $s = wfMsgExt( 'redirectedfrom', array( 'parseinline', 'replaceafter' ), $redir );
806 - $wgOut->setSubtitle( $s );
 802+ $wgOut->addSubtitle( wfMessage( 'redirectedfrom' )->rawParams( $redir ) );
807803
808804 return true;
809805 }
@@ -1416,8 +1412,7 @@
14171413 wfDebug( "Article::confirmDelete\n" );
14181414
14191415 $wgOut->setPageTitle( wfMessage( 'delete-confirm', $this->getTitle()->getPrefixedText() ) );
1420 - $deleteBackLink = Linker::linkKnown( $this->getTitle() );
1421 - $wgOut->setSubtitle( wfMsgHtml( 'delete-backlink', $deleteBackLink ) );
 1416+ $wgOut->addBacklinkSubtitle( $this->getTitle() );
14221417 $wgOut->setRobotPolicy( 'noindex,nofollow' );
14231418 $wgOut->addWikiMsg( 'confirmdeletetext' );
14241419
@@ -1583,6 +1578,17 @@
15841579 $tddate = $wgLang->date( $timestamp, true );
15851580 $tdtime = $wgLang->time( $timestamp, true );
15861581
 1582+ # Show user links if allowed to see them. If hidden, then show them only if requested...
 1583+ $userlinks = Linker::revUserTools( $revision, !$unhide );
 1584+
 1585+ $infomsg = $current && !wfMessage( 'revision-info-current' )->isDisabled()
 1586+ ? 'revision-info-current'
 1587+ : 'revision-info';
 1588+
 1589+ $wgOut->addSubtitle( "<div id=\"mw-{$infomsg}\">" . wfMessage( $infomsg,
 1590+ $td )->rawParams( $userlinks )->params( $revision->getID(), $tddate,
 1591+ $tdtime, $revision->getUser() )->parse() . "</div>" );
 1592+
15871593 $lnk = $current
15881594 ? wfMsgHtml( 'currentrevisionlink' )
15891595 : Linker::link(
@@ -1672,29 +1678,9 @@
16731679 $cdel .= ' ';
16741680 }
16751681
1676 - # Show user links if allowed to see them. If hidden, then show them only if requested...
1677 - $userlinks = Linker::revUserTools( $revision, !$unhide );
1678 -
1679 - $infomsg = $current && !wfMessage( 'revision-info-current' )->isDisabled()
1680 - ? 'revision-info-current'
1681 - : 'revision-info';
1682 -
1683 - $r = "\n\t\t\t\t<div id=\"mw-{$infomsg}\">" .
1684 - wfMsgExt(
1685 - $infomsg,
1686 - array( 'parseinline', 'replaceafter' ),
1687 - $td,
1688 - $userlinks,
1689 - $revision->getID(),
1690 - $tddate,
1691 - $tdtime,
1692 - $revision->getUser()
1693 - ) .
1694 - "</div>\n" .
1695 - "\n\t\t\t\t<div id=\"mw-revision-nav\">" . $cdel . wfMsgExt( 'revision-nav', array( 'escapenoentities', 'parsemag', 'replaceafter' ),
1696 - $prevdiff, $prevlink, $lnk, $curdiff, $nextlink, $nextdiff ) . "</div>\n\t\t\t";
1697 -
1698 - $wgOut->setSubtitle( $r );
 1682+ $wgOut->addSubtitle( "<div id=\"mw-revision-nav\">" . $cdel .
 1683+ wfMsgExt( 'revision-nav', array( 'escapenoentities', 'parsemag', 'replaceafter' ),
 1684+ $prevdiff, $prevlink, $lnk, $curdiff, $nextlink, $nextdiff ) . "</div>" );
16991685 }
17001686
17011687 /* Caching functions */
Index: trunk/phase3/includes/EditPage.php
@@ -570,10 +570,8 @@
571571 throw new PermissionsError( $action, $permErrors );
572572 }
573573
574 - $wgOut->setPageTitle( wfMessage( 'viewsource' ) );
575 - $wgOut->setSubtitle(
576 - wfMessage( 'viewsourcefor', Linker::linkKnown( $this->mTitle ) )->text()
577 - );
 574+ $wgOut->setPageTitle( wfMessage( 'viewsource-title', $this->getContextTitle()->getPrefixedText() ) );
 575+ $wgOut->addBacklinkSubtitle( $this->getContextTitle() );
578576 $wgOut->addWikiText( $wgOut->formatPermissionsErrorMessage( $permErrors, 'edit' ) );
579577 $wgOut->addHTML( "<hr />\n" );
580578
Index: trunk/phase3/includes/actions/RevertAction.php
@@ -132,9 +132,7 @@
133133 }
134134
135135 protected function getDescription() {
136 - return wfMsg(
137 - 'filerevert-backlink',
138 - Linker::linkKnown( $this->getTitle() )
139 - );
 136+ $this->getOutput()->addBacklinkSubtitle( $this->getTitle() );
 137+ return '';
140138 }
141139 }
Index: trunk/phase3/includes/FileDeleteForm.php
@@ -285,10 +285,7 @@
286286 global $wgOut;
287287 $wgOut->setPageTitle( wfMessage( 'filedelete', $this->title->getText() ) );
288288 $wgOut->setRobotPolicy( 'noindex,nofollow' );
289 - $wgOut->setSubtitle( wfMsg(
290 - 'filedelete-backlink',
291 - Linker::linkKnown( $this->title )
292 - ) );
 289+ $wgOut->addBacklinkSubtitle( $this->title );
293290 }
294291
295292 /**
Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php
@@ -235,8 +235,7 @@
236236 function setTopText( FormOptions $opts ) {
237237 $target = $this->getTargetTitle();
238238 if( $target ) {
239 - $this->getOutput()->setSubtitle( wfMsg( 'recentchangeslinked-backlink', Linker::link( $target,
240 - $target->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) );
 239+ $this->getOutput()->addBacklinkSubtitle( $target );
241240 }
242241 }
243242
Index: trunk/phase3/includes/specials/SpecialLockdb.php
@@ -101,7 +101,7 @@
102102
103103 public function onSuccess() {
104104 $out = $this->getOutput();
105 - $out->setSubtitle( wfMsg( 'lockdbsuccesssub' ) );
 105+ $out->addSubtitle( $this->msg( 'lockdbsuccesssub' ) );
106106 $out->addWikiMsg( 'lockdbsuccesstext' );
107107 }
108108 }
Index: trunk/phase3/includes/specials/SpecialUnlockdb.php
@@ -81,7 +81,7 @@
8282
8383 public function onSuccess() {
8484 $out = $this->getOutput();
85 - $out->setSubtitle( wfMsg( 'unlockdbsuccesssub' ) );
 85+ $out->addSubtitle( $this->msg( 'unlockdbsuccesssub' ) );
8686 $out->addWikiMsg( 'unlockdbsuccesstext' );
8787 }
8888 }
Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -83,11 +83,10 @@
8484
8585 $this->getSkin()->setRelevantTitle( $this->target );
8686
87 -
8887 $this->selfTitle = $this->getTitle( $this->target->getPrefixedDBkey() );
8988
9089 $out->setPageTitle( $this->msg( 'whatlinkshere-title', $this->target->getPrefixedText() ) );
91 - $out->setSubtitle( wfMsg( 'whatlinkshere-backlink', Linker::link( $this->target, $this->target->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) );
 90+ $out->addBacklinkSubtitle( $this->target );
9291
9392 $this->showIndirectLinks( 0, $this->target, $opts->getValue( 'limit' ),
9493 $opts->getValue( 'from' ), $opts->getValue( 'back' ) );
Index: trunk/phase3/includes/specials/SpecialEditWatchlist.php
@@ -53,13 +53,8 @@
5454
5555 $this->outputHeader();
5656
57 - $sub = wfMsgExt(
58 - 'watchlistfor2',
59 - array( 'parseinline', 'replaceafter' ),
60 - $this->getUser()->getName(),
61 - SpecialEditWatchlist::buildTools( null )
62 - );
63 - $out->setSubtitle( $sub );
 57+ $out->addSubtitle( $this->msg( 'watchlistfor2', $this->getUser()->getName()
 58+ )->rawParams( SpecialEditWatchlist::buildTools( null ) ) );
6459
6560 # B/C: $mode used to be waaay down the parameter list, and the first parameter
6661 # was $wgUser
Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php
@@ -248,7 +248,7 @@
249249 }
250250 }
251251 # Logs themselves don't have histories or archived revisions
252 - $this->getOutput()->setSubtitle( '<p>' . $this->getLang()->pipeList( $links ) . '</p>' );
 252+ $this->getOutput()->addSubtitle( $this->getLang()->pipeList( $links ) );
253253 }
254254 }
255255
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -83,14 +83,14 @@
8484
8585 if( $this->opts['contribs'] != 'newbie' ) {
8686 $target = $nt->getText();
87 - $out->setSubtitle( $this->contributionsSub( $nt, $id ) );
 87+ $out->addSubtitle( $this->contributionsSub( $nt, $id ) );
8888 $out->setHTMLTitle( $this->msg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ), $target ) ) );
8989 $userObj = User::newFromName( $target, false );
9090 if ( is_object( $userObj ) ) {
9191 $this->getSkin()->setRelevantUser( $userObj );
9292 }
9393 } else {
94 - $out->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') );
 94+ $out->addSubtitle( $this->msg( 'sp-contributions-newbies-sub') );
9595 $out->setHTMLTitle( $this->msg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) );
9696 }
9797
@@ -252,10 +252,11 @@
253253 // languages that want to put the "for" bit right after $user but before
254254 // $links. If 'contribsub' is around, use it for reverse compatibility,
255255 // otherwise use 'contribsub2'.
256 - if( wfEmptyMsg( 'contribsub' ) ) {
257 - return wfMsgHtml( 'contribsub2', $user, $links );
 256+ $oldMsg = $this->msg( 'contribsub' );
 257+ if ( $oldMsg->exists() ) {
 258+ return $oldMsg->rawParams( "$user ($links)" );
258259 } else {
259 - return wfMsgHtml( 'contribsub', "$user ($links)" );
 260+ return $this->msg( 'contribsub2' )->rawParams( $user, $links );
260261 }
261262 }
262263
Index: trunk/phase3/includes/specials/SpecialDeletedContributions.php
@@ -295,7 +295,7 @@
296296 $id = User::idFromName( $nt->getText() );
297297
298298 $target = $nt->getText();
299 - $out->setSubtitle( $this->getSubTitle( $nt, $id ) );
 299+ $out->addSubtitle( $this->getSubTitle( $nt, $id ) );
300300
301301 if ( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
302302 $options['namespace'] = intval( $ns );
@@ -438,10 +438,11 @@
439439 // languages that want to put the "for" bit right after $user but before
440440 // $links. If 'contribsub' is around, use it for reverse compatibility,
441441 // otherwise use 'contribsub2'.
442 - if( wfEmptyMsg( 'contribsub' ) ) {
443 - return wfMsgHtml( 'contribsub2', $user, $links );
 442+ $oldMsg = $this->msg( 'contribsub' );
 443+ if ( $oldMsg->exists() ) {
 444+ return $oldMsg->rawParams( "$user ($links)" );
444445 } else {
445 - return wfMsgHtml( 'contribsub', "$user ($links)" );
 446+ return $this->msg( 'contribsub2' )->rawParams( $user, $links );
446447 }
447448 }
448449
Index: trunk/phase3/includes/specials/SpecialWatchlist.php
@@ -69,13 +69,8 @@
7070 $this->setHeaders();
7171 $this->outputHeader();
7272
73 - $sub = wfMsgExt(
74 - 'watchlistfor2',
75 - array( 'parseinline', 'replaceafter' ),
76 - $user->getName(),
77 - SpecialEditWatchlist::buildTools( $this->getSkin() )
78 - );
79 - $output->setSubtitle( $sub );
 73+ $output->addSubtitle( $this->msg( 'watchlistfor2', $this->getUser()->getName()
 74+ )->rawParams( SpecialEditWatchlist::buildTools( null ) ) );
8075
8176 $request = $this->getRequest();
8277
Index: trunk/phase3/includes/specials/SpecialMovepage.php
@@ -195,7 +195,7 @@
196196 $token = htmlspecialchars( $user->editToken() );
197197
198198 if ( !empty($err) ) {
199 - $out->setSubtitle( wfMsg( 'formerror' ) );
 199+ $out->addSubtitle( $this->msg( 'formerror' ) );
200200 if( $err[0] == 'hookaborted' ) {
201201 $hookErr = $err[1];
202202 $errMsg = "<p><strong class=\"error\">$hookErr</strong></p>\n";
Index: trunk/phase3/languages/messages/MessagesQqq.php
@@ -517,6 +517,9 @@
518518
519519 Do '''not''' replace SITENAME with a translation of Wikipedia or some encycopedic additions. The message has to be neutral for all projects.",
520520 'pagetitle-view-mainpage' => '{{optional}}',
 521+'backlinksubtitle' => '{{optional}}
 522+Appears in subtitle
 523+* $1 is a link to the page (HTML)',
521524 'retrievedfrom' => 'Message which appears in the source of every page, but it is hidden. It is shown when printing. $1 is a link back to the current page: {{FULLURL:{{FULLPAGENAME}}}}.',
522525 'youhavenewmessages' => 'The blue message appearing when someone edited your user talk page.
523526 The format is: "{{int:youhavenewmessages| [[MediaWiki:Newmessageslink/{{SUBPAGENAME}}|{{int:newmessageslink}}]] |[[MediaWiki:Newmessagesdifflink/{{SUBPAGENAME}}|{{int:newmessagesdifflink}}]]}}"',
@@ -652,9 +655,8 @@
653656 'viewsource' => 'The text displayed in place of the "edit" tab when the user has no permission to edit the page.
654657
655658 {{Identical|View source}}',
656 -'viewsourcefor' => 'Subtitle shown when trying to edit a protected page.
657 -
658 -{{Identical|For $1}}',
 659+'viewsource-title' => 'Page title shown when trying to edit a protected page.
 660+* $1 is the name of the page',
659661 'actionthrottled' => 'This is the title of an error page. Read it in combination with {{msg-mw|actionthrottledtext}}.',
660662 'protectedpagetext' => 'This message is displayed when trying to edit a page you can\'t edit because it has been protected.
661663
@@ -1768,14 +1770,13 @@
17691771 'newsectionsummary' => 'Default summary when adding a new section to a page.',
17701772
17711773 # Recent changes linked
1772 -'recentchangeslinked' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].',
1773 -'recentchangeslinked-feed' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].',
1774 -'recentchangeslinked-toolbox' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].',
1775 -'recentchangeslinked-title' => 'Message used as title and page header on [[Special:RecentChangesLinked]] (needs an argument like "/Main Page"). Related changes are all recent change to pages that are linked from \'\'this page\'\'. "$1" is the name of the page for which related changes as show.',
1776 -'recentchangeslinked-backlink' => '{{optional}}',
1777 -'recentchangeslinked-summary' => 'Summary of [[Special:RecentChangesLinked]].',
1778 -'recentchangeslinked-page' => '{{Identical|Page name}}',
1779 -'recentchangeslinked-to' => 'Checkbox in [[Special:RecentChangesLinked]].',
 1774+'recentchangeslinked' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].',
 1775+'recentchangeslinked-feed' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].',
 1776+'recentchangeslinked-toolbox' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].',
 1777+'recentchangeslinked-title' => 'Message used as title and page header on [[Special:RecentChangesLinked]] (needs an argument like "/Main Page"). Related changes are all recent change to pages that are linked from \'\'this page\'\'. "$1" is the name of the page for which related changes as show.',
 1778+'recentchangeslinked-summary' => 'Summary of [[Special:RecentChangesLinked]].',
 1779+'recentchangeslinked-page' => '{{Identical|Page name}}',
 1780+'recentchangeslinked-to' => 'Checkbox in [[Special:RecentChangesLinked]].',
17801781
17811782 # Upload
17821783 'upload' => 'Display name for link to [[Special:Upload]] for uploading files to the wiki.
@@ -1994,7 +1995,6 @@
19951996
19961997 # File reversion
19971998 'filerevert' => '{{Identical|Revert}}',
1998 -'filerevert-backlink' => '{{optional}}',
19991999 'filerevert-legend' => '{{Identical|Revert}}',
20002000 'filerevert-intro' => 'Message displayed when you try to revert a version of a file.
20012001 * $1 is the name of the media
@@ -2015,7 +2015,6 @@
20162016 {{Identical|Revert}}',
20172017
20182018 # File deletion
2019 -'filedelete-backlink' => '{{optional}}',
20202019 'filedelete-legend' => '{{Identical|Delete}}',
20212020 'filedelete-intro-old' => 'Message displayed when you try to delete a version of a file.
20222021 * $1 is the name of the media
@@ -2459,7 +2458,6 @@
24602459 'delete-confirm' => 'The title of the form to delete a page.
24612460
24622461 $1 = the name of the page',
2463 -'delete-backlink' => '{{optional}}',
24642462 'delete-legend' => '{{Identical|Delete}}',
24652463 'historywarning' => 'Warning when about to delete a page that has history.
24662464 $1 is the <b>approximate</b> number of revisions that the page has, the message should not claim to give an exact count.',
@@ -2527,9 +2525,6 @@
25282526 'prot_1movedto2' => 'Message description: [[mw:Manual:Interface/1movedto2]]',
25292527 'protect-badnamespace-title' => 'Title of error page when trying to access action=protect on a non-protectable namespace (currently this only for the MediaWiki: namespace).',
25302528 'protect-badnamespace-text' => 'Content of the error page that goes with {{msg-mw|protect-badnamespace-title}}.',
2531 -'protect-backlink' => '{{optional|Translate it only if you have to change it, i.e. for RTL wikis}}
2532 -
2533 -Shown as subtitle of the protection form. $1 is the title of the page to be (un)protected.',
25342529 'protect-legend' => 'Legend of the fieldset around the input form of the protection form.',
25352530 'protectcomment' => '{{Identical|Reason}}',
25362531 'protectexpiry' => '{{Identical|Expires}}',
@@ -2684,7 +2679,6 @@
26852680 'whatlinkshere' => 'The text of the link in the toolbox (on the left, below the search menu) going to [[Special:WhatLinksHere]].',
26862681 'whatlinkshere-title' => "Title of the special page [[Special:WhatLinksHere]]. This page appears when you click on the 'What links here' button in the toolbox. $1 is the name of the page concerned.",
26872682 'whatlinkshere-page' => '{{Identical|Page}}',
2688 -'whatlinkshere-backlink' => '{{optional}}',
26892683 'linkshere' => "This message is the header line of the [[Special:WhatLinksHere/$1]] page generated by clicking 'What links here' in the sidebar toolbox. It is followed by a navigation bar built using {{msg-mw|Viewprevnext}}.",
26902684 'nolinkshere' => 'This appears on Whatlinkshere pages which are empty.
26912685
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -889,6 +889,7 @@
890890 'ok' => 'OK',
891891 'pagetitle' => '$1 - {{SITENAME}}', # only translate this message to other languages if you have to change it
892892 'pagetitle-view-mainpage' => '{{SITENAME}}', # only translate this message to other languages if you have to change it
 893+'backlinksubtitle' => '← $1', # only translate this message to other languages if you have to change it
893894 'retrievedfrom' => 'Retrieved from "$1"',
894895 'youhavenewmessages' => 'You have $1 ($2).',
895896 'newmessageslink' => 'new messages',
@@ -1005,7 +1006,7 @@
10061007 Function: $1<br />
10071008 Query: $2',
10081009 'viewsource' => 'View source',
1009 -'viewsourcefor' => 'for $1',
 1010+'viewsource-title' => 'View source for $1',
10101011 'actionthrottled' => 'Action throttled',
10111012 'actionthrottledtext' => 'As an anti-spam measure, you are limited from performing this action too many times in a short space of time, and you have exceeded this limit.
10121013 Please try again in a few minutes.',
@@ -2071,7 +2072,6 @@
20722073 'recentchangeslinked-feed' => 'Related changes',
20732074 'recentchangeslinked-toolbox' => 'Related changes',
20742075 'recentchangeslinked-title' => 'Changes related to "$1"',
2075 -'recentchangeslinked-backlink' => '← $1', # only translate this message to other languages if you have to change it
20762076 'recentchangeslinked-noresult' => 'No changes on linked pages during the given period.',
20772077 'recentchangeslinked-summary' => "This is a list of changes made recently to pages linked from a specified page (or to members of a specified category).
20782078 Pages on [[Special:Watchlist|your watchlist]] are '''bold'''.",
@@ -2356,7 +2356,6 @@
23572357
23582358 # File reversion
23592359 'filerevert' => 'Revert $1',
2360 -'filerevert-backlink' => '← $1', # only translate this message to other languages if you have to change it
23612360 'filerevert-legend' => 'Revert file',
23622361 'filerevert-intro' => "You are about to revert the file '''[[Media:$1|$1]]''' to the [$4 version as of $3, $2].",
23632362 'filerevert-comment' => 'Reason:',
@@ -2367,7 +2366,6 @@
23682367
23692368 # File deletion
23702369 'filedelete' => 'Delete $1',
2371 -'filedelete-backlink' => '← $1', # only translate this message to other languages if you have to change it
23722370 'filedelete-legend' => 'Delete file',
23732371 'filedelete-intro' => "You are about to delete the file '''[[Media:$1|$1]]''' along with all of its history.",
23742372 'filedelete-intro-old' => "You are deleting the version of '''[[Media:$1|$1]]''' as of [$4 $3, $2].",
@@ -2789,7 +2787,6 @@
27902788 'exbeforeblank' => 'content before blanking was: "$1"',
27912789 'exblank' => 'page was empty',
27922790 'delete-confirm' => 'Delete "$1"',
2793 -'delete-backlink' => '← $1', # only translate this message to other languages if you have to change it
27942791 'delete-legend' => 'Delete',
27952792 'historywarning' => "'''Warning:''' The page you are about to delete has a history with approximately $1 {{PLURAL:$1|revision|revisions}}:",
27962793 'confirmdeletetext' => 'You are about to delete a page along with all of its history.
@@ -2852,7 +2849,6 @@
28532850 'prot_1movedto2' => '[[$1]] moved to [[$2]]',
28542851 'protect-badnamespace-title' => 'Non-protectable namespace',
28552852 'protect-badnamespace-text' => 'Pages in this namespace cannot be protected.',
2856 -'protect-backlink' => '← $1', # only translate this message to other languages if you have to change it
28572853 'protect-legend' => 'Confirm protection',
28582854 'protectcomment' => 'Reason:',
28592855 'protectexpiry' => 'Expires:',
@@ -3006,7 +3002,6 @@
30073003 'whatlinkshere-title' => 'Pages that link to "$1"',
30083004 'whatlinkshere-summary' => '', # do not translate or duplicate this message to other languages
30093005 'whatlinkshere-page' => 'Page:',
3010 -'whatlinkshere-backlink' => '← $1', # only translate this message to other languages if you have to change it
30113006 'linkshere' => "The following pages link to '''[[:$1]]''':",
30123007 'nolinkshere' => "No pages link to '''[[:$1]]'''.",
30133008 'nolinkshere-ns' => "No pages link to '''[[:$1]]''' in the chosen namespace.",
Index: trunk/extensions/Video/RevertVideoAction.php
@@ -113,10 +113,8 @@
114114 }
115115
116116 protected function getDescription() {
117 - return wfMsg(
118 - 'filerevert-backlink',
119 - Linker::linkKnown( $this->getTitle() )
120 - );
 117+ $this->getOutput()->addBacklinkSubtitle( $this->getTitle() );
 118+ return '';
121119 }
122120
123121

Follow-up revisions

RevisionCommit summaryAuthorDate
r102418Fix for r102417: commiting OutputPage.php is actually a good ideaialex18:02, 8 November 2011

Comments

#Comment by Bawolff (talk | contribs)   08:39, 20 December 2011

Possibly causing double redirect subtitles on file redirects - see comments on r106752 and [1]

Status & tagging log