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

Change subject: Replace other deprecated wfMsg*
......................................................................


Replace other deprecated wfMsg*

 - Replaces other wfMsg* calls
     e.g. wfMsgReal

Bug: T70750
Change-Id: Ifac1eceff317390b0197da77d26ec87cc3718d66
---
M includes/SWL_Emailer.php
M specials/SpecialSemanticWatchlist.php
2 files changed, 19 insertions(+), 25 deletions(-)

Approvals:
  Siebrand: Looks good to me, approved
  Florianschmidtwelzow: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/includes/SWL_Emailer.php b/includes/SWL_Emailer.php
index 38de3e5..34b0e18 100644
--- a/includes/SWL_Emailer.php
+++ b/includes/SWL_Emailer.php
@@ -38,22 +38,16 @@
                )->parseAsBlock();
 
                if ( $describeChanges ) {
-                       $emailText .= '<h3> ' . wfMessage(
+                       $emailText .= Html::element( 'h3', array(), wfMessage(
                                'swl-email-changes',
-                               
$changeSet->getEdit()->getTitle()->getFullText()->rawParams(
-                                       
$changeSet->getEdit()->getTitle()->getFullURL()
-                               )->escaped() . ' </h3>'
-                       );
+                               
$changeSet->getEdit()->getTitle()->getFullText(),
+                               $changeSet->getEdit()->getTitle()->getFullURL()
+                       )->parseAsBlock() );
 
                        $emailText .= self::getChangeListHTML( $changeSet, 
$group );
                }
 
-               $title = wfMsgReal(
-                       'swl-email-propschanged',
-                       array( $changeSet->getEdit()->getTitle()->getFullText() 
),
-                       true,
-                       $user->getOption( 'language' )
-               );
+               $title = wfMessage( 'swl-email-propschanged', array( 
$changeSet->getEdit()->getTitle()->getFullText() ) )->text();
 
                wfRunHooks( 'SWLBeforeEmailNotify', array( $group, $user, 
$changeSet, $describeChanges, &$title, &$emailText ) );
 
diff --git a/specials/SpecialSemanticWatchlist.php 
b/specials/SpecialSemanticWatchlist.php
index dacb718..5312518 100644
--- a/specials/SpecialSemanticWatchlist.php
+++ b/specials/SpecialSemanticWatchlist.php
@@ -76,17 +76,18 @@
                $wgOut->addHTML( '<p>' );
 
                if ( $wgUser->isAllowed( 'semanticwatchgroups' ) ) {
-                       $wgOut->addHTML( wfMessage( 
'swl-watchlist-can-mod-groups', 'Special:WatchlistConditions' )->parse() . 
'&#160' );
+                       $wgOut->addWikiMsg( 'swl-watchlist-can-mod-groups', 
'Special:WatchlistConditions' );
+                       $wgOut->addHTML( '&#160' );
                }
 
                if ( $this->userHasWatchlistGroups( $wgUser ) ) {
-                       $wgOut->addHTML( wfMessage( 
'swl-watchlist-can-mod-prefs', 'Special:Preferences#mw-prefsection-swl' 
)->parse() );
+                       $wgOut->addWikiMsg( 'swl-watchlist-can-mod-prefs', 
'Special:Preferences#mw-prefsection-swl' );
                        $wgOut->addHTML( '</p>' );
 
                        $this->getAndDisplaySets( $subPage );
                }
                else {
-                       $wgOut->addHTML( wfMessage( 'swl-watchlist-no-groups', 
'Special:Preferences#mw-prefsection-swl' )->parse() );
+                       $wgOut->addWikiMsg( 'swl-watchlist-no-groups', 
'Special:Preferences#mw-prefsection-swl' );
                        $wgOut->addHTML( '</p>' );
                }
        }
@@ -121,7 +122,10 @@
                }
 
                if ( $offset != 0 || count( $sets ) > 0 ) {
-                       $wgOut->addHTML( '<p>' . wfMessage( 
'swl-watchlist-position' )->numParams( count( $sets ), $offset + 1 )->parse() . 
'</p>' );
+                       $wgOut->wrapWikiText( '<p>$1</p>', array( 
'swl-watchlist-position',
+                               $wgLang->formatNum( count( $sets ) ),
+                               $wgLang->formatNum( $offset + 1 )
+                       ) );
 
                        $wgOut->addHTML( $this->getPagingControlHTML( $limit, 
$continue, $subPage, $newContinue, $offset ) );
                }
@@ -163,8 +167,8 @@
        protected function getPagingControlHTML( $limit, $currentContinue, 
$subPage, $newContinue, $offset ) {
                global $wgLang;
 
-               $nextMsg = wfMessage( 'nextn' )->numParams( $limit )->escaped();
-               $firstMsg = wfMessage( 'swl-watchlist-firstn' )->numParams( 
$limit )->escaped();
+               $nextMsg = $this->msg( 'nextn', $limit )->escaped();
+               $firstMsg = $this->msg( 'swl-watchlist-firstn', $limit 
)->escaped();
 
                if ( $newContinue === false ) {
                        $nextLink = $nextMsg;
@@ -178,7 +182,7 @@
                                                'continue' => $newContinue,
                                                'offset' => $offset + $limit
                                        ) ) ),
-                                       'title' => wfMessage( 'nextn-title' 
)->numParams( $limit )->escaped(),
+                                       'title' => $this->msg( 'nextn-title', 
$limit )->escaped(),
                                        'class' => 'mw-nextlink'
                                ),
                                $nextMsg
@@ -198,7 +202,7 @@
                                'a',
                                array(
                                        'href' => $this->getTitle( $subPage 
)->getLocalURL( wfArrayToCGI( array( 'limit' => $limit ) ) ),
-                                       'title' => wfMessage( 
'swl-watchlist-firstn-title' )->numParams( $limit )->escaped()
+                                       'title' => $this->msg( 
'swl-watchlist-firstn-title', $limit )->escaped()
                                ),
                                $firstMsg
                        );
@@ -214,7 +218,7 @@
                                'a',
                                array(
                                        'href' => $this->getTitle( $subPage 
)->getLocalURL( wfArrayToCGI( $limitLinkArgs ) ),
-                                       'title' => wfMessage( 'shown-title' 
)->numParams( $limitValue )->escaped()
+                                       'title' => $this->msg( 'shown-title', 
$limitValue )->escaped()
                                ),
                                $wgLang->formatNum( $limitValue )
                        );
@@ -223,11 +227,7 @@
                return Html::rawElement(
                        'p',
                        array(),
-                       wfMessage( 'swl-watchlist-pagincontrol' )
-                               ->rawParams(
-                               $wgLang->pipeList( array( $firstLink, $nextLink 
) ),
-                               $wgLang->pipeList( $limitLinks )
-                               )->escaped()
+                       $this->msg( 'swl-watchlist-pagincontrol' )->rawParams( 
$wgLang->pipeList( array( $firstLink, $nextLink ) ), $wgLang->pipeList( 
$limitLinks ) )->escaped()
                );
        }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifac1eceff317390b0197da77d26ec87cc3718d66
Gerrit-PatchSet: 12
Gerrit-Project: mediawiki/extensions/SemanticWatchlist
Gerrit-Branch: master
Gerrit-Owner: Sn1per <[email protected]>
Gerrit-Reviewer: Florianschmidtwelzow <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Kghbln <[email protected]>
Gerrit-Reviewer: Markus Kroetzsch <[email protected]>
Gerrit-Reviewer: Nemo bis <[email protected]>
Gerrit-Reviewer: Nischayn22 <[email protected]>
Gerrit-Reviewer: Siebrand <[email protected]>
Gerrit-Reviewer: Sn1per <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to