Sn1per has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/183408

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

Replace deprecated wfMsg*

 - Replaces wfMsg* calls

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticWatchlist 
refs/changes/08/183408/1

diff --git a/includes/SWL_Emailer.php b/includes/SWL_Emailer.php
index 2ea071e..732d744 100644
--- a/includes/SWL_Emailer.php
+++ b/includes/SWL_Emailer.php
@@ -28,32 +28,29 @@
        public static function notifyUser( SWLGroup $group, User $user, 
SWLChangeSet $changeSet, $describeChanges ) {
                global $wgLang, $wgPasswordSender, $wgPasswordSenderName;
 
-               $emailText = wfMsgExt(
+               $emailText = wfMessage(
                        'swl-email-propschanged-long',
-                       'parse',
                        $GLOBALS['wgSitename'],
                        $changeSet->getEdit()->getUser()->getName(),
                        SpecialPage::getTitleFor( 'SemanticWatchlist' 
)->getFullURL(),
                        $wgLang->time( $changeSet->getEdit()->getTime() ),
                        $wgLang->date( $changeSet->getEdit()->getTime() )
-               );
+               )->parseAsBlock();
 
                if ( $describeChanges ) {
-                       $emailText .= '<h3> ' . wfMsgExt(
+                       $emailText .= Html::element( 'h3', array(), wfMessage(
                                'swl-email-changes',
-                               'parse',
                                
$changeSet->getEdit()->getTitle()->getFullText(),
                                $changeSet->getEdit()->getTitle()->getFullURL()
-                       ) . ' </h3>';
+                       )->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' )
+                       ->params( array( 
$changeSet->getEdit()->getTitle()->getFullText() ) )
+                       ->useDatabase( true )
+                       ->inLanguage( $user->getOption( 'language' ) );
                );
 
                wfRunHooks( 'SWLBeforeEmailNotify', array( $group, $user, 
$changeSet, $describeChanges, &$title, &$emailText ) );
diff --git a/specials/SpecialSemanticWatchlist.php 
b/specials/SpecialSemanticWatchlist.php
index 4c24c13..9496c61 100644
--- a/specials/SpecialSemanticWatchlist.php
+++ b/specials/SpecialSemanticWatchlist.php
@@ -76,17 +76,18 @@
                $wgOut->addHTML( '<p>' );
 
                if ( $wgUser->isAllowed( 'semanticwatchgroups' ) ) {
-                       $wgOut->addHTML( wfMsgExt( 
'swl-watchlist-can-mod-groups', 'parseinline', 'Special:WatchlistConditions' ) 
. '&#160' );
+                       $wgOut->addWikiMsg( 'swl-watchlist-can-mod-groups', 
'Special:WatchlistConditions' );
+                       $wgOut->addHTML( '&#160' );
                }
 
                if ( $this->userHasWatchlistGroups( $wgUser ) ) {
-                       $wgOut->addHTML( wfMsgExt( 
'swl-watchlist-can-mod-prefs', 'parseinline', 
'Special:Preferences#mw-prefsection-swl' ) );
+                       $wgOut->addWikiMsg( 'swl-watchlist-can-mod-prefs', 
'Special:Preferences#mw-prefsection-swl' );
                        $wgOut->addHTML( '</p>' );
 
                        $this->getAndDisplaySets( $subPage );
                }
                else {
-                       $wgOut->addHTML( wfMsgExt( 'swl-watchlist-no-groups', 
'parseinline', 'Special:Preferences#mw-prefsection-swl' ) );
+                       $wgOut->addWikiMsg( 'swl-watchlist-no-groups', 
'Special:Preferences#mw-prefsection-swl' );
                        $wgOut->addHTML( '</p>' );
                }
        }
@@ -121,12 +122,10 @@
                }
 
                if ( $offset != 0 || count( $sets ) > 0 ) {
-                       $wgOut->addHTML( '<p>' . wfMsgExt(
-                               'swl-watchlist-position',
-                               array( 'parseinline' ),
+                       $wgOut->wrapWikiText( '<p>$1</p>', array( 
'swl-watchlist-position',
                                $wgLang->formatNum( count( $sets ) ),
                                $wgLang->formatNum( $offset + 1 )
-                       ) . '</p>' );
+                       ) );
 
                        $wgOut->addHTML( $this->getPagingControlHTML( $limit, 
$continue, $subPage, $newContinue, $offset ) );
                }
@@ -168,8 +167,8 @@
        protected function getPagingControlHTML( $limit, $currentContinue, 
$subPage, $newContinue, $offset ) {
                global $wgLang;
 
-               $nextMsg = wfMsgExt( 'nextn', array( 'parsemag', 'escape' ), 
$limit );
-               $firstMsg = wfMsgExt( 'swl-watchlist-firstn', array( 
'parsemag', 'escape' ), $limit );
+               $nextMsg = wfMessage( 'nextn', $limit )->text()->escaped();
+               $firstMsg = wfMessage( 'swl-watchlist-firstn', $limit 
)->text()->escaped();
 
                if ( $newContinue === false ) {
                        $nextLink = $nextMsg;
@@ -183,7 +182,7 @@
                                                'continue' => $newContinue,
                                                'offset' => $offset + $limit
                                        ) ) ),
-                                       'title' => wfMsgExt( 'nextn-title', 
array( 'parsemag', 'escape' ), $limit ),
+                                       'title' => wfMessage( 'nextn-title', 
$limit )->text()->escaped(),
                                        'class' => 'mw-nextlink'
                                ),
                                $nextMsg
@@ -203,7 +202,7 @@
                                'a',
                                array(
                                        'href' => $this->getTitle( $subPage 
)->getLocalURL( wfArrayToCGI( array( 'limit' => $limit ) ) ),
-                                       'title' => wfMsgExt( 
'swl-watchlist-firstn-title', array( 'parsemag', 'escape' ), $limit )
+                                       'title' => wfMessage( 
'swl-watchlist-firstn-title', $limit )->text()->escaped()
                                ),
                                $firstMsg
                        );
@@ -219,7 +218,7 @@
                                'a',
                                array(
                                        'href' => $this->getTitle( $subPage 
)->getLocalURL( wfArrayToCGI( $limitLinkArgs ) ),
-                                       'title' => wfMsgExt( 'shown-title', 
array( 'parsemag', 'escape' ), $limitValue )
+                                       'title' => wfMessage( 'shown-title', 
$limitValue )->text()->escaped()
                                ),
                                $wgLang->formatNum( $limitValue )
                        );
@@ -228,7 +227,7 @@
                return Html::rawElement(
                        'p',
                        array(),
-                       wfMsgHtml( 'swl-watchlist-pagincontrol', 
$wgLang->pipeList( array( $firstLink, $nextLink ) ), $wgLang->pipeList( 
$limitLinks ) )
+                       wfMessage( '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: newchange
Gerrit-Change-Id: Ifac1eceff317390b0197da77d26ec87cc3718d66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticWatchlist
Gerrit-Branch: master
Gerrit-Owner: Sn1per <[email protected]>

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

Reply via email to