Use 'pagetitle' in content language
It often happens that wiki sysops want to change it site wide, especially
when they want to change the format (eg, have {{SITENAME}} removed, or
replace the hyphen with a middot).
Bug: 48701
Change-Id: Iaf00fca1e89ae022c348c4fa0de32b998d7921a1
This commit is contained in:
parent
a4c34030df
commit
c142126fc7
3 changed files with 14 additions and 10 deletions
|
|
@ -891,7 +891,10 @@ class OutputPage extends ContextSource {
|
|||
$this->mPagetitle = $nameWithTags;
|
||||
|
||||
# change "<i>foo&bar</i>" to "foo&bar"
|
||||
$this->setHTMLTitle( $this->msg( 'pagetitle' )->rawParams( Sanitizer::stripAllTags( $nameWithTags ) ) );
|
||||
$this->setHTMLTitle(
|
||||
$this->msg( 'pagetitle' )->rawParams( Sanitizer::stripAllTags( $nameWithTags ) )
|
||||
->inContentLanguage()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -2491,7 +2494,7 @@ $templates
|
|||
$ret = Html::htmlHeader( array( 'lang' => $this->getLanguage()->getHtmlCode(), 'dir' => $userdir, 'class' => 'client-nojs' ) );
|
||||
|
||||
if ( $this->getHTMLTitle() == '' ) {
|
||||
$this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() ) );
|
||||
$this->setHTMLTitle( $this->msg( 'pagetitle', $this->getPageTitle() )->inContentLanguage() );
|
||||
}
|
||||
|
||||
$openHead = Html::openElement( 'head' );
|
||||
|
|
|
|||
|
|
@ -94,14 +94,14 @@ class SpecialContributions extends SpecialPage {
|
|||
$out->setHTMLTitle( $this->msg(
|
||||
'pagetitle',
|
||||
$this->msg( 'contributions-title', $target )->plain()
|
||||
) );
|
||||
)->inContentLanguage() );
|
||||
$this->getSkin()->setRelevantUser( $userObj );
|
||||
} else {
|
||||
$out->addSubtitle( $this->msg( 'sp-contributions-newbies-sub' ) );
|
||||
$out->setHTMLTitle( $this->msg(
|
||||
'pagetitle',
|
||||
$this->msg( 'sp-contributions-newbies-title' )->plain()
|
||||
) );
|
||||
$out->setHTMLTitle(
|
||||
$this->msg( 'pagetitle', $this->msg( 'sp-contributions-newbies-title' ) )
|
||||
->inContentLanguage()->plain()
|
||||
);
|
||||
}
|
||||
|
||||
if ( ( $ns = $request->getVal( 'namespace', null ) ) !== null && $ns !== '' ) {
|
||||
|
|
|
|||
|
|
@ -476,9 +476,10 @@ class SpecialSearch extends SpecialPage {
|
|||
$out = $this->getOutput();
|
||||
if ( strval( $term ) !== '' ) {
|
||||
$out->setPageTitle( $this->msg( 'searchresults' ) );
|
||||
$out->setHTMLTitle( $this->msg( 'pagetitle' )->rawParams(
|
||||
$this->msg( 'searchresults-title' )->rawParams( $term )->text()
|
||||
) );
|
||||
$out->setHTMLTitle( $this->msg( 'pagetitle' )
|
||||
->rawParams( $this->msg( 'searchresults-title' )->rawParams( $term ) )
|
||||
->inContentLanguage()->text()
|
||||
);
|
||||
}
|
||||
// add javascript specific to special:search
|
||||
$out->addModules( 'mediawiki.special.search' );
|
||||
|
|
|
|||
Loading…
Reference in a new issue