From f8e2b347a5fa39411b29602f0fad1cb4efe947f4 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 8 Nov 2011 18:01:22 +0000 Subject: [PATCH] * Changed OutputPage's handling of subtitles to use an array and implode it with "
" 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 " with the same backlink in subtitle for consistency with other back links and page titles --- includes/Article.php | 56 +++++++------------ includes/EditPage.php | 6 +- includes/FileDeleteForm.php | 5 +- includes/ProtectionForm.php | 5 +- includes/actions/RevertAction.php | 6 +- includes/diff/DifferenceEngine.php | 6 +- includes/specials/SpecialContributions.php | 11 ++-- .../specials/SpecialDeletedContributions.php | 9 +-- includes/specials/SpecialEditWatchlist.php | 9 +-- includes/specials/SpecialLockdb.php | 2 +- includes/specials/SpecialMovepage.php | 2 +- .../specials/SpecialRecentchangeslinked.php | 3 +- includes/specials/SpecialRevisiondelete.php | 2 +- includes/specials/SpecialUnlockdb.php | 2 +- includes/specials/SpecialWatchlist.php | 9 +-- includes/specials/SpecialWhatlinkshere.php | 3 +- languages/messages/MessagesEn.php | 9 +-- languages/messages/MessagesQqq.php | 30 ++++------ maintenance/language/messageTypes.inc | 7 +-- maintenance/language/messages.inc | 9 +-- skins/common/shared.css | 2 + 21 files changed, 70 insertions(+), 123 deletions(-) diff --git a/includes/Article.php b/includes/Article.php index 06596ec660..b383a3bd90 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -434,7 +434,7 @@ class Article extends Page { wfIncrStats( 'pcache_miss_stub' ); } - $wasRedirected = $this->showRedirectedFromHeader(); + $this->showRedirectedFromHeader(); $this->showNamespaceHeader(); # Iterate through the possible ways of constructing the output text. @@ -524,8 +524,7 @@ class Article extends Page { if ( $rt ) { wfDebug( __METHOD__ . ": showing redirect=no page\n" ); # Viewing a redirect page (e.g. with parameter redirect=no) - # Don't append the subtitle if this was an old revision - $wgOut->addHTML( $this->viewRedirect( $rt, !$wasRedirected && $this->isCurrent() ) ); + $wgOut->addHTML( $this->viewRedirect( $rt ) ); # Parse just to get categories, displaytitle, etc. $this->mParserOutput = $wgParser->parse( $text, $this->getTitle(), $parserOptions ); $wgOut->addParserOutputNoText( $this->mParserOutput ); @@ -772,16 +771,14 @@ class Article extends Page { // This is an internally redirected page view. // We'll need a backlink to the source page for navigation. if ( wfRunHooks( 'ArticleViewRedirect', array( &$this ) ) ) { - $redir = Linker::link( + $redir = Linker::linkKnown( $this->mRedirectedFrom, null, array(), - array( 'redirect' => 'no' ), - array( 'known', 'noclasses' ) + array( 'redirect' => 'no' ) ); - $s = wfMsgExt( 'redirectedfrom', array( 'parseinline', 'replaceafter' ), $redir ); - $wgOut->setSubtitle( $s ); + $wgOut->addSubtitle( wfMessage( 'redirectedfrom' )->rawParams( $redir ) ); // Set the fragment if one was specified in the redirect if ( strval( $this->getTitle()->getFragment() ) != '' ) { @@ -801,8 +798,7 @@ class Article extends Page { // If it was reported from a trusted site, supply a backlink. if ( $wgRedirectSources && preg_match( $wgRedirectSources, $rdfrom ) ) { $redir = Linker::makeExternalLink( $rdfrom, $rdfrom ); - $s = wfMsgExt( 'redirectedfrom', array( 'parseinline', 'replaceafter' ), $redir ); - $wgOut->setSubtitle( $s ); + $wgOut->addSubtitle( wfMessage( 'redirectedfrom' )->rawParams( $redir ) ); return true; } @@ -1416,8 +1412,7 @@ class Article extends Page { wfDebug( "Article::confirmDelete\n" ); $wgOut->setPageTitle( wfMessage( 'delete-confirm', $this->getTitle()->getPrefixedText() ) ); - $deleteBackLink = Linker::linkKnown( $this->getTitle() ); - $wgOut->setSubtitle( wfMsgHtml( 'delete-backlink', $deleteBackLink ) ); + $wgOut->addBacklinkSubtitle( $this->getTitle() ); $wgOut->setRobotPolicy( 'noindex,nofollow' ); $wgOut->addWikiMsg( 'confirmdeletetext' ); @@ -1583,6 +1578,17 @@ class Article extends Page { $tddate = $wgLang->date( $timestamp, true ); $tdtime = $wgLang->time( $timestamp, true ); + # Show user links if allowed to see them. If hidden, then show them only if requested... + $userlinks = Linker::revUserTools( $revision, !$unhide ); + + $infomsg = $current && !wfMessage( 'revision-info-current' )->isDisabled() + ? 'revision-info-current' + : 'revision-info'; + + $wgOut->addSubtitle( "
" . wfMessage( $infomsg, + $td )->rawParams( $userlinks )->params( $revision->getID(), $tddate, + $tdtime, $revision->getUser() )->parse() . "
" ); + $lnk = $current ? wfMsgHtml( 'currentrevisionlink' ) : Linker::link( @@ -1672,29 +1678,9 @@ class Article extends Page { $cdel .= ' '; } - # Show user links if allowed to see them. If hidden, then show them only if requested... - $userlinks = Linker::revUserTools( $revision, !$unhide ); - - $infomsg = $current && !wfMessage( 'revision-info-current' )->isDisabled() - ? 'revision-info-current' - : 'revision-info'; - - $r = "\n\t\t\t\t
" . - wfMsgExt( - $infomsg, - array( 'parseinline', 'replaceafter' ), - $td, - $userlinks, - $revision->getID(), - $tddate, - $tdtime, - $revision->getUser() - ) . - "
\n" . - "\n\t\t\t\t
" . $cdel . wfMsgExt( 'revision-nav', array( 'escapenoentities', 'parsemag', 'replaceafter' ), - $prevdiff, $prevlink, $lnk, $curdiff, $nextlink, $nextdiff ) . "
\n\t\t\t"; - - $wgOut->setSubtitle( $r ); + $wgOut->addSubtitle( "
" . $cdel . + wfMsgExt( 'revision-nav', array( 'escapenoentities', 'parsemag', 'replaceafter' ), + $prevdiff, $prevlink, $lnk, $curdiff, $nextlink, $nextdiff ) . "
" ); } /* Caching functions */ diff --git a/includes/EditPage.php b/includes/EditPage.php index d894e3b99c..ec92b7036e 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -570,10 +570,8 @@ class EditPage { throw new PermissionsError( $action, $permErrors ); } - $wgOut->setPageTitle( wfMessage( 'viewsource' ) ); - $wgOut->setSubtitle( - wfMessage( 'viewsourcefor', Linker::linkKnown( $this->mTitle ) )->text() - ); + $wgOut->setPageTitle( wfMessage( 'viewsource-title', $this->getContextTitle()->getPrefixedText() ) ); + $wgOut->addBacklinkSubtitle( $this->getContextTitle() ); $wgOut->addWikiText( $wgOut->formatPermissionsErrorMessage( $permErrors, 'edit' ) ); $wgOut->addHTML( "
\n" ); diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index ae1450dcaf..900b7d9535 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -285,10 +285,7 @@ class FileDeleteForm { global $wgOut; $wgOut->setPageTitle( wfMessage( 'filedelete', $this->title->getText() ) ); $wgOut->setRobotPolicy( 'noindex,nofollow' ); - $wgOut->setSubtitle( wfMsg( - 'filedelete-backlink', - Linker::linkKnown( $this->title ) - ) ); + $wgOut->addBacklinkSubtitle( $this->title ); } /** diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php index 5341fe58a7..caa949dacc 100644 --- a/includes/ProtectionForm.php +++ b/includes/ProtectionForm.php @@ -236,11 +236,8 @@ class ProtectionForm { wfEscapeWikiText( $this->mTitle->getPrefixedText() ) ); } - $titleLink = Linker::link( $this->mTitle ); - $wgOut->setSubtitle( wfMsg( 'protect-backlink', $titleLink ) ); - + $wgOut->addBacklinkSubtitle( $this->mTitle ); $wgOut->addHTML( $this->buildForm() ); - $this->showLogExtract( $wgOut ); } diff --git a/includes/actions/RevertAction.php b/includes/actions/RevertAction.php index 61403aa947..9c6777a5f4 100644 --- a/includes/actions/RevertAction.php +++ b/includes/actions/RevertAction.php @@ -132,9 +132,7 @@ class RevertFileAction extends FormAction { } protected function getDescription() { - return wfMsg( - 'filerevert-backlink', - Linker::linkKnown( $this->getTitle() ) - ); + $this->getOutput()->addBacklinkSubtitle( $this->getTitle() ); + return ''; } } diff --git a/includes/diff/DifferenceEngine.php b/includes/diff/DifferenceEngine.php index 6d47b98000..c433f89975 100644 --- a/includes/diff/DifferenceEngine.php +++ b/includes/diff/DifferenceEngine.php @@ -264,7 +264,7 @@ CONTROL; # is the first version of that article. In that case, V' does not exist. if ( $this->mOldRev === false ) { $wgOut->setPageTitle( $this->mNewPage->getPrefixedText() ); - $wgOut->setSubtitle( wfMsgExt( 'difference', array( 'parseinline' ) ) ); + $wgOut->addSubtitle( wfMessage( 'difference' ) ); $samePage = true; $oldHeader = ''; } else { @@ -277,11 +277,11 @@ CONTROL; if ( $this->mNewPage->equals( $this->mOldPage ) ) { $wgOut->setPageTitle( $this->mNewPage->getPrefixedText() ); - $wgOut->setSubtitle( wfMsgExt( 'difference', array( 'parseinline' ) ) ); + $wgOut->addSubtitle( wfMessage( 'difference' ) ); $samePage = true; } else { $wgOut->setPageTitle( $this->mOldPage->getPrefixedText() . ', ' . $this->mNewPage->getPrefixedText() ); - $wgOut->setSubtitle( wfMsgExt( 'difference-multipage', array( 'parseinline' ) ) ); + $wgOut->addSubtitle( wfMessage( 'difference-multipage' ) ); $samePage = false; } diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index 03aa64991b..b0973a18a3 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -83,14 +83,14 @@ class SpecialContributions extends SpecialPage { if( $this->opts['contribs'] != 'newbie' ) { $target = $nt->getText(); - $out->setSubtitle( $this->contributionsSub( $nt, $id ) ); + $out->addSubtitle( $this->contributionsSub( $nt, $id ) ); $out->setHTMLTitle( $this->msg( 'pagetitle', wfMsgExt( 'contributions-title', array( 'parsemag' ), $target ) ) ); $userObj = User::newFromName( $target, false ); if ( is_object( $userObj ) ) { $this->getSkin()->setRelevantUser( $userObj ); } } else { - $out->setSubtitle( wfMsgHtml( 'sp-contributions-newbies-sub') ); + $out->addSubtitle( $this->msg( 'sp-contributions-newbies-sub') ); $out->setHTMLTitle( $this->msg( 'pagetitle', wfMsg( 'sp-contributions-newbies-title' ) ) ); } @@ -252,10 +252,11 @@ class SpecialContributions extends SpecialPage { // languages that want to put the "for" bit right after $user but before // $links. If 'contribsub' is around, use it for reverse compatibility, // otherwise use 'contribsub2'. - if( wfEmptyMsg( 'contribsub' ) ) { - return wfMsgHtml( 'contribsub2', $user, $links ); + $oldMsg = $this->msg( 'contribsub' ); + if ( $oldMsg->exists() ) { + return $oldMsg->rawParams( "$user ($links)" ); } else { - return wfMsgHtml( 'contribsub', "$user ($links)" ); + return $this->msg( 'contribsub2' )->rawParams( $user, $links ); } } diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 52946dd1f4..d8e10638ee 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -295,7 +295,7 @@ class DeletedContributionsPage extends SpecialPage { $id = User::idFromName( $nt->getText() ); $target = $nt->getText(); - $out->setSubtitle( $this->getSubTitle( $nt, $id ) ); + $out->addSubtitle( $this->getSubTitle( $nt, $id ) ); if ( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) { $options['namespace'] = intval( $ns ); @@ -438,10 +438,11 @@ class DeletedContributionsPage extends SpecialPage { // languages that want to put the "for" bit right after $user but before // $links. If 'contribsub' is around, use it for reverse compatibility, // otherwise use 'contribsub2'. - if( wfEmptyMsg( 'contribsub' ) ) { - return wfMsgHtml( 'contribsub2', $user, $links ); + $oldMsg = $this->msg( 'contribsub' ); + if ( $oldMsg->exists() ) { + return $oldMsg->rawParams( "$user ($links)" ); } else { - return wfMsgHtml( 'contribsub', "$user ($links)" ); + return $this->msg( 'contribsub2' )->rawParams( $user, $links ); } } diff --git a/includes/specials/SpecialEditWatchlist.php b/includes/specials/SpecialEditWatchlist.php index bf69607aab..c753f8fbdc 100644 --- a/includes/specials/SpecialEditWatchlist.php +++ b/includes/specials/SpecialEditWatchlist.php @@ -53,13 +53,8 @@ class SpecialEditWatchlist extends UnlistedSpecialPage { $this->outputHeader(); - $sub = wfMsgExt( - 'watchlistfor2', - array( 'parseinline', 'replaceafter' ), - $this->getUser()->getName(), - SpecialEditWatchlist::buildTools( null ) - ); - $out->setSubtitle( $sub ); + $out->addSubtitle( $this->msg( 'watchlistfor2', $this->getUser()->getName() + )->rawParams( SpecialEditWatchlist::buildTools( null ) ) ); # B/C: $mode used to be waaay down the parameter list, and the first parameter # was $wgUser diff --git a/includes/specials/SpecialLockdb.php b/includes/specials/SpecialLockdb.php index 53fddc4f10..c1453518e9 100644 --- a/includes/specials/SpecialLockdb.php +++ b/includes/specials/SpecialLockdb.php @@ -101,7 +101,7 @@ class SpecialLockdb extends FormSpecialPage { public function onSuccess() { $out = $this->getOutput(); - $out->setSubtitle( wfMsg( 'lockdbsuccesssub' ) ); + $out->addSubtitle( $this->msg( 'lockdbsuccesssub' ) ); $out->addWikiMsg( 'lockdbsuccesstext' ); } } diff --git a/includes/specials/SpecialMovepage.php b/includes/specials/SpecialMovepage.php index bbf2dbe9df..98c169e538 100644 --- a/includes/specials/SpecialMovepage.php +++ b/includes/specials/SpecialMovepage.php @@ -195,7 +195,7 @@ class MovePageForm extends UnlistedSpecialPage { $token = htmlspecialchars( $user->editToken() ); if ( !empty($err) ) { - $out->setSubtitle( wfMsg( 'formerror' ) ); + $out->addSubtitle( $this->msg( 'formerror' ) ); if( $err[0] == 'hookaborted' ) { $hookErr = $err[1]; $errMsg = "

$hookErr

\n"; diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index 000ef3e5e3..6ad82f1400 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -235,8 +235,7 @@ class SpecialRecentchangeslinked extends SpecialRecentChanges { function setTopText( FormOptions $opts ) { $target = $this->getTargetTitle(); if( $target ) { - $this->getOutput()->setSubtitle( wfMsg( 'recentchangeslinked-backlink', Linker::link( $target, - $target->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) ); + $this->getOutput()->addBacklinkSubtitle( $target ); } } diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 0cfc4bbfaf..28aa3587b7 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -248,7 +248,7 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { } } # Logs themselves don't have histories or archived revisions - $this->getOutput()->setSubtitle( '

' . $this->getLang()->pipeList( $links ) . '

' ); + $this->getOutput()->addSubtitle( $this->getLang()->pipeList( $links ) ); } } diff --git a/includes/specials/SpecialUnlockdb.php b/includes/specials/SpecialUnlockdb.php index d3da785458..2e77254014 100644 --- a/includes/specials/SpecialUnlockdb.php +++ b/includes/specials/SpecialUnlockdb.php @@ -81,7 +81,7 @@ class SpecialUnlockdb extends FormSpecialPage { public function onSuccess() { $out = $this->getOutput(); - $out->setSubtitle( wfMsg( 'unlockdbsuccesssub' ) ); + $out->addSubtitle( $this->msg( 'unlockdbsuccesssub' ) ); $out->addWikiMsg( 'unlockdbsuccesstext' ); } } diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 330f0b40f2..3e4bdd9a3f 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -69,13 +69,8 @@ class SpecialWatchlist extends SpecialPage { $this->setHeaders(); $this->outputHeader(); - $sub = wfMsgExt( - 'watchlistfor2', - array( 'parseinline', 'replaceafter' ), - $user->getName(), - SpecialEditWatchlist::buildTools( $this->getSkin() ) - ); - $output->setSubtitle( $sub ); + $output->addSubtitle( $this->msg( 'watchlistfor2', $this->getUser()->getName() + )->rawParams( SpecialEditWatchlist::buildTools( null ) ) ); $request = $this->getRequest(); diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index e88a16f6c3..a5b605a077 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -83,11 +83,10 @@ class SpecialWhatLinksHere extends SpecialPage { $this->getSkin()->setRelevantTitle( $this->target ); - $this->selfTitle = $this->getTitle( $this->target->getPrefixedDBkey() ); $out->setPageTitle( $this->msg( 'whatlinkshere-title', $this->target->getPrefixedText() ) ); - $out->setSubtitle( wfMsg( 'whatlinkshere-backlink', Linker::link( $this->target, $this->target->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) ); + $out->addBacklinkSubtitle( $this->target ); $this->showIndirectLinks( 0, $this->target, $opts->getValue( 'limit' ), $opts->getValue( 'from' ), $opts->getValue( 'back' ) ); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 3d5d7444a2..03a60f08f9 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -889,6 +889,7 @@ See [[Special:Version|version page]].', 'ok' => 'OK', 'pagetitle' => '$1 - {{SITENAME}}', # only translate this message to other languages if you have to change it 'pagetitle-view-mainpage' => '{{SITENAME}}', # only translate this message to other languages if you have to change it +'backlinksubtitle' => '← $1', # only translate this message to other languages if you have to change it 'retrievedfrom' => 'Retrieved from "$1"', 'youhavenewmessages' => 'You have $1 ($2).', 'newmessageslink' => 'new messages', @@ -1005,7 +1006,7 @@ Data here will not presently be refreshed.', Function: $1
Query: $2', 'viewsource' => 'View source', -'viewsourcefor' => 'for $1', +'viewsource-title' => 'View source for $1', 'actionthrottled' => 'Action throttled', '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. Please try again in a few minutes.', @@ -2071,7 +2072,6 @@ Your e-mail address is not revealed when other users contact you.', 'recentchangeslinked-feed' => 'Related changes', 'recentchangeslinked-toolbox' => 'Related changes', 'recentchangeslinked-title' => 'Changes related to "$1"', -'recentchangeslinked-backlink' => '← $1', # only translate this message to other languages if you have to change it 'recentchangeslinked-noresult' => 'No changes on linked pages during the given period.', 'recentchangeslinked-summary' => "This is a list of changes made recently to pages linked from a specified page (or to members of a specified category). Pages on [[Special:Watchlist|your watchlist]] are '''bold'''.", @@ -2356,7 +2356,6 @@ The description on its [$2 file description page] there is shown below.', # File reversion 'filerevert' => 'Revert $1', -'filerevert-backlink' => '← $1', # only translate this message to other languages if you have to change it 'filerevert-legend' => 'Revert file', 'filerevert-intro' => "You are about to revert the file '''[[Media:$1|$1]]''' to the [$4 version as of $3, $2].", 'filerevert-comment' => 'Reason:', @@ -2367,7 +2366,6 @@ The description on its [$2 file description page] there is shown below.', # File deletion 'filedelete' => 'Delete $1', -'filedelete-backlink' => '← $1', # only translate this message to other languages if you have to change it 'filedelete-legend' => 'Delete file', 'filedelete-intro' => "You are about to delete the file '''[[Media:$1|$1]]''' along with all of its history.", 'filedelete-intro-old' => "You are deleting the version of '''[[Media:$1|$1]]''' as of [$4 $3, $2].", @@ -2789,7 +2787,6 @@ Feedback and further assistance: 'exbeforeblank' => 'content before blanking was: "$1"', 'exblank' => 'page was empty', 'delete-confirm' => 'Delete "$1"', -'delete-backlink' => '← $1', # only translate this message to other languages if you have to change it 'delete-legend' => 'Delete', 'historywarning' => "'''Warning:''' The page you are about to delete has a history with approximately $1 {{PLURAL:$1|revision|revisions}}:", 'confirmdeletetext' => 'You are about to delete a page along with all of its history. @@ -2852,7 +2849,6 @@ See the [[Special:ProtectedPages|protected pages list]] for the list of currentl 'prot_1movedto2' => '[[$1]] moved to [[$2]]', 'protect-badnamespace-title' => 'Non-protectable namespace', 'protect-badnamespace-text' => 'Pages in this namespace cannot be protected.', -'protect-backlink' => '← $1', # only translate this message to other languages if you have to change it 'protect-legend' => 'Confirm protection', 'protectcomment' => 'Reason:', 'protectexpiry' => 'Expires:', @@ -3006,7 +3002,6 @@ The latest block log entry is provided below for reference:', 'whatlinkshere-title' => 'Pages that link to "$1"', 'whatlinkshere-summary' => '', # do not translate or duplicate this message to other languages 'whatlinkshere-page' => 'Page:', -'whatlinkshere-backlink' => '← $1', # only translate this message to other languages if you have to change it 'linkshere' => "The following pages link to '''[[:$1]]''':", 'nolinkshere' => "No pages link to '''[[:$1]]'''.", 'nolinkshere-ns' => "No pages link to '''[[:$1]]''' in the chosen namespace.", diff --git a/languages/messages/MessagesQqq.php b/languages/messages/MessagesQqq.php index 08a67960ed..93fe270582 100644 --- a/languages/messages/MessagesQqq.php +++ b/languages/messages/MessagesQqq.php @@ -517,6 +517,9 @@ See also [[MediaWiki:Lastmodifiedatby/{{SUBPAGENAME}}]].', Do '''not''' replace SITENAME with a translation of Wikipedia or some encycopedic additions. The message has to be neutral for all projects.", 'pagetitle-view-mainpage' => '{{optional}}', +'backlinksubtitle' => '{{optional}} +Appears in subtitle +* $1 is a link to the page (HTML)', '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}}}}.', 'youhavenewmessages' => 'The blue message appearing when someone edited your user talk page. The format is: "{{int:youhavenewmessages| [[MediaWiki:Newmessageslink/{{SUBPAGENAME}}|{{int:newmessageslink}}]] |[[MediaWiki:Newmessagesdifflink/{{SUBPAGENAME}}|{{int:newmessagesdifflink}}]]}}"', @@ -652,9 +655,8 @@ $1 is a filename, I think.', 'viewsource' => 'The text displayed in place of the "edit" tab when the user has no permission to edit the page. {{Identical|View source}}', -'viewsourcefor' => 'Subtitle shown when trying to edit a protected page. - -{{Identical|For $1}}', +'viewsource-title' => 'Page title shown when trying to edit a protected page. +* $1 is the name of the page', 'actionthrottled' => 'This is the title of an error page. Read it in combination with {{msg-mw|actionthrottledtext}}.', 'protectedpagetext' => 'This message is displayed when trying to edit a page you can\'t edit because it has been protected. @@ -1768,14 +1770,13 @@ Does not work under $wgMiserMode ([[mwr:48986|r48986]]).', 'newsectionsummary' => 'Default summary when adding a new section to a page.', # Recent changes linked -'recentchangeslinked' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].', -'recentchangeslinked-feed' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].', -'recentchangeslinked-toolbox' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].', -'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.', -'recentchangeslinked-backlink' => '{{optional}}', -'recentchangeslinked-summary' => 'Summary of [[Special:RecentChangesLinked]].', -'recentchangeslinked-page' => '{{Identical|Page name}}', -'recentchangeslinked-to' => 'Checkbox in [[Special:RecentChangesLinked]].', +'recentchangeslinked' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].', +'recentchangeslinked-feed' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].', +'recentchangeslinked-toolbox' => 'Title of [[Special:RecentChangesLinked]] and display name of page on [[Special:SpecialPages]].', +'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.', +'recentchangeslinked-summary' => 'Summary of [[Special:RecentChangesLinked]].', +'recentchangeslinked-page' => '{{Identical|Page name}}', +'recentchangeslinked-to' => 'Checkbox in [[Special:RecentChangesLinked]].', # Upload 'upload' => 'Display name for link to [[Special:Upload]] for uploading files to the wiki. @@ -1994,7 +1995,6 @@ $1 is the name of the shared repository. On wikimedia sites, $1 is {{msg-mw|shar # File reversion 'filerevert' => '{{Identical|Revert}}', -'filerevert-backlink' => '{{optional}}', 'filerevert-legend' => '{{Identical|Revert}}', 'filerevert-intro' => 'Message displayed when you try to revert a version of a file. * $1 is the name of the media @@ -2015,7 +2015,6 @@ $1 is the name of the shared repository. On wikimedia sites, $1 is {{msg-mw|shar {{Identical|Revert}}', # File deletion -'filedelete-backlink' => '{{optional}}', 'filedelete-legend' => '{{Identical|Delete}}', 'filedelete-intro-old' => 'Message displayed when you try to delete a version of a file. * $1 is the name of the media @@ -2459,7 +2458,6 @@ Shoulds looks like the message {{msg-mw|rcnote}} used similary but on [[Special: 'delete-confirm' => 'The title of the form to delete a page. $1 = the name of the page', -'delete-backlink' => '{{optional}}', 'delete-legend' => '{{Identical|Delete}}', 'historywarning' => 'Warning when about to delete a page that has history. $1 is the approximate number of revisions that the page has, the message should not claim to give an exact count.', @@ -2527,9 +2525,6 @@ Example: 'prot_1movedto2' => 'Message description: [[mw:Manual:Interface/1movedto2]]', '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).', 'protect-badnamespace-text' => 'Content of the error page that goes with {{msg-mw|protect-badnamespace-title}}.', -'protect-backlink' => '{{optional|Translate it only if you have to change it, i.e. for RTL wikis}} - -Shown as subtitle of the protection form. $1 is the title of the page to be (un)protected.', 'protect-legend' => 'Legend of the fieldset around the input form of the protection form.', 'protectcomment' => '{{Identical|Reason}}', 'protectexpiry' => '{{Identical|Expires}}', @@ -2684,7 +2679,6 @@ Anon version: {{msg-mw|Sp-contributions-blocked-notice-anon}}', 'whatlinkshere' => 'The text of the link in the toolbox (on the left, below the search menu) going to [[Special:WhatLinksHere]].', '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.", 'whatlinkshere-page' => '{{Identical|Page}}', -'whatlinkshere-backlink' => '{{optional}}', '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}}.", 'nolinkshere' => 'This appears on Whatlinkshere pages which are empty. diff --git a/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 75b4a60397..946ae7de1e 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -315,10 +315,6 @@ $wgOptionalMessages = array( 'minutes-abbrev', 'hours-abbrev', 'days-abbrev', - 'filerevert-backlink', - 'filedelete-backlink', - 'delete-backlink', - 'protect-backlink', 'pagetitle', 'filename-prefix-blacklist', 'edittools', @@ -393,11 +389,10 @@ $wgOptionalMessages = array( 'listgrouprights-right-display', 'listgrouprights-right-revoked', 'timezone-utc', - 'whatlinkshere-backlink', - 'recentchangeslinked-backlink', 'unpatrolledletter', 'diff-with-additional', 'pagetitle-view-mainpage', + 'backlinksubtitle', 'trackback', 'trackbackexcerpt', 'prefs-registration-date-time', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index e10785301c..42fd76bc76 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -301,6 +301,7 @@ $wgMessageStructure = array( 'ok', 'pagetitle', 'pagetitle-view-mainpage', + 'backlinksubtitle', 'retrievedfrom', 'youhavenewmessages', 'newmessageslink', @@ -393,7 +394,7 @@ $wgMessageStructure = array( 'querypage-no-updates', 'wrong_wfQuery_params', 'viewsource', - 'viewsourcefor', + 'viewsource-title', 'actionthrottled', 'actionthrottledtext', 'protectedpagetext', @@ -1236,7 +1237,6 @@ $wgMessageStructure = array( 'recentchangeslinked-feed', 'recentchangeslinked-toolbox', 'recentchangeslinked-title', - 'recentchangeslinked-backlink', 'recentchangeslinked-noresult', 'recentchangeslinked-summary', 'recentchangeslinked-page', @@ -1457,7 +1457,6 @@ $wgMessageStructure = array( ), 'filerevert' => array( 'filerevert', - 'filerevert-backlink', 'filerevert-legend', 'filerevert-intro', 'filerevert-comment', @@ -1468,7 +1467,6 @@ $wgMessageStructure = array( ), 'filedelete' => array( 'filedelete', - 'filedelete-backlink', 'filedelete-legend', 'filedelete-intro', 'filedelete-intro-old', @@ -1851,7 +1849,6 @@ $wgMessageStructure = array( 'exbeforeblank', 'exblank', 'delete-confirm', - 'delete-backlink', 'delete-legend', 'historywarning', 'confirmdeletetext', @@ -1898,7 +1895,6 @@ $wgMessageStructure = array( 'prot_1movedto2', 'protect-badnamespace-title', 'protect-badnamespace-text', - 'protect-backlink', 'protect-legend', 'protectcomment', 'protectexpiry', @@ -2030,7 +2026,6 @@ $wgMessageStructure = array( 'whatlinkshere-title', 'whatlinkshere-summary', 'whatlinkshere-page', - 'whatlinkshere-backlink', 'linkshere', 'nolinkshere', 'nolinkshere-ns', diff --git a/skins/common/shared.css b/skins/common/shared.css index ecc67e0f41..60eb95eaf8 100644 --- a/skins/common/shared.css +++ b/skins/common/shared.css @@ -970,8 +970,10 @@ ol:lang(or) li { } #mw-revision-info, +#mw-revision-info-current, #mw-revision-nav { direction: ltr; + display: inline; } /* Images */ -- 2.20.1