jenkins-bot has submitted this change and it was merged.

Change subject: Use 'pagetitle' in content language
......................................................................


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
---
M includes/OutputPage.php
M includes/specials/SpecialContributions.php
M includes/specials/SpecialSearch.php
3 files changed, 14 insertions(+), 10 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index b4fda13..6fd5111 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -891,7 +891,10 @@
                $this->mPagetitle = $nameWithTags;
 
                # change "<i>foo&amp;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 @@
                $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' );
diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index 1fe9819..5710dc4 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -94,14 +94,14 @@
                        $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 !== '' ) {
diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index dd32656..08e438f 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -476,9 +476,10 @@
                $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' );

-- 
To view, visit https://gerrit.wikimedia.org/r/94862
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf00fca1e89ae022c348c4fa0de32b998d7921a1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Daniel Friesen <[email protected]>
Gerrit-Reviewer: Liangent <[email protected]>
Gerrit-Reviewer: Nikerabbit <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to