From 9e7d843185d92c49e3a37d7cdb9d254989a3268c Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Wed, 6 Aug 2008 12:49:16 +0000 Subject: [PATCH] * Consistency tweaks with other special pages like move/protect/delete: ** Add a backlink subtitle ** Remove 1 hardcoded '<' backlink and 1 '>' backlink --- includes/specials/SpecialRecentchangeslinked.php | 11 +++++++---- includes/specials/SpecialWhatlinkshere.php | 4 +--- languages/messages/MessagesEn.php | 6 +++--- maintenance/language/messageTypes.inc | 3 ++- maintenance/language/messages.inc | 4 ++-- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/includes/specials/SpecialRecentchangeslinked.php b/includes/specials/SpecialRecentchangeslinked.php index e5f5b6020f..525afc3dff 100644 --- a/includes/specials/SpecialRecentchangeslinked.php +++ b/includes/specials/SpecialRecentchangeslinked.php @@ -162,14 +162,17 @@ class SpecialRecentchangeslinked extends SpecialRecentchanges { $extraOpts['submit'] = Xml::submitbutton( wfMsg('allpagessubmit') ); return $extraOpts; } - - function setTopText( &$out, $opts ){} - + + function setTopText( &$out, $opts ) { + global $wgOut, $wgUser; + $skin = $wgUser->getSkin(); + $wgOut->setSubtitle( wfMsg( 'recentchangeslinked-backlink', $skin->link( $this->mTargetTitle, $this->mTargetTitle->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) ); + } + function setBottomText( &$out, $opts ){ if( isset( $this->mTargetTitle ) && is_object( $this->mTargetTitle ) ){ global $wgUser; $out->setFeedAppendQuery( "target=" . urlencode( $this->mTargetTitle->getPrefixedDBkey() ) ); - $out->addHTML("< ".$wgUser->getSkin()->makeLinkObj( $this->mTargetTitle, "", "redirect=no" )."
\n"); } if( isset( $this->mResultEmpty ) && $this->mResultEmpty ){ $out->addWikiMsg( 'recentchangeslinked-noresult' ); diff --git a/includes/specials/SpecialWhatlinkshere.php b/includes/specials/SpecialWhatlinkshere.php index 3502e33ced..2f9ca2b686 100644 --- a/includes/specials/SpecialWhatlinkshere.php +++ b/includes/specials/SpecialWhatlinkshere.php @@ -74,9 +74,7 @@ class WhatLinksHerePage { $this->selfTitle = SpecialPage::getTitleFor( 'Whatlinkshere', $this->target->getPrefixedDBkey() ); $wgOut->setPageTitle( wfMsg( 'whatlinkshere-title', $this->target->getPrefixedText() ) ); - $wgOut->setSubtitle( wfMsgHtml( 'linklistsub' ) ); - - $wgOut->addHTML( wfMsgExt( 'whatlinkshere-barrow', array( 'escapenoentities') ) . ' ' .$this->skin->makeLinkObj($this->target, '', 'redirect=no' )."
\n"); + $wgOut->setSubtitle( wfMsg( 'whatlinkshere-backlink', $this->skin->link( $this->target, $this->target->getPrefixedText(), array(), array( 'redirect' => 'no' ) ) ) ); $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 14ab36ec6a..a04bd7a682 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1592,6 +1592,7 @@ please see math/README to configure.', # Recent changes linked 'recentchangeslinked' => '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'''.", @@ -2306,11 +2307,10 @@ $1', # What links here 'whatlinkshere' => 'What links here', -'whatlinkshere-title' => 'Pages that link to $1', +'whatlinkshere-title' => 'Pages that link to "$1"', 'whatlinkshere-summary' => '', # do not translate or duplicate this message to other languages 'whatlinkshere-page' => 'Page:', -'whatlinkshere-barrow' => '>', # only translate this message to other languages if you have to change it -'linklistsub' => '(List of links)', +'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/maintenance/language/messageTypes.inc b/maintenance/language/messageTypes.inc index 67caadddcc..56e0f1a40a 100644 --- a/maintenance/language/messageTypes.inc +++ b/maintenance/language/messageTypes.inc @@ -310,7 +310,8 @@ $wgOptionalMessages = array( 'autocomment-prefix', 'listgrouprights-right-display', 'timezone-utc', - 'whatlinkshere-barrow', + 'whatlinkshere-backlink', + 'recentchangeslinked-backlink', ); /** EXIF messages, which may be set as optional in several checks, but are generally mandatory */ diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 976942155c..e07a274d1d 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -937,6 +937,7 @@ $wgMessageStructure = array( 'recentchangeslinked' => array( 'recentchangeslinked', 'recentchangeslinked-title', + 'recentchangeslinked-backlink', 'recentchangeslinked-noresult', 'recentchangeslinked-summary', 'recentchangeslinked-page', @@ -1534,8 +1535,7 @@ $wgMessageStructure = array( 'whatlinkshere-title', 'whatlinkshere-summary', 'whatlinkshere-page', - 'whatlinkshere-barrow', - 'linklistsub', + 'whatlinkshere-backlink', 'linkshere', 'nolinkshere', 'nolinkshere-ns', -- 2.20.1