Index: trunk/phase3/includes/User.php |
— | — | @@ -217,7 +217,7 @@ |
218 | 218 | |
219 | 219 | static $idCacheByName = array(); |
220 | 220 | |
221 | | - var $mNewtalknumber; |
| 221 | + public $mNewtalknumber; |
222 | 222 | |
223 | 223 | /** |
224 | 224 | * Lightweight constructor for an anonymous user. |
— | — | @@ -1639,7 +1639,7 @@ |
1640 | 1640 | * Return the number of new messages |
1641 | 1641 | * @return \int The number of new messages |
1642 | 1642 | */ |
1643 | | - public function getNewtalkNumber() { |
| 1643 | + public function getnewMessagesCount() { |
1644 | 1644 | global $wgLang; |
1645 | 1645 | return $wgLang->formatNum( $this->mNewtalknumber ); |
1646 | 1646 | } |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -302,6 +302,8 @@ |
303 | 303 | if( count( $newtalks ) == 1 && $newtalks[0]['wiki'] === wfWikiID() ) { |
304 | 304 | $usertitle = $this->mUser->getUserPage(); |
305 | 305 | $usertalktitle = $usertitle->getTalkPage(); |
| 306 | + |
| 307 | + $newmessagescount = $wgUser->getnewMessagesCount(); |
306 | 308 | |
307 | 309 | if( !$usertalktitle->equals( $this->mTitle ) ) { |
308 | 310 | $newmessageslink = $this->link( |
— | — | @@ -314,19 +316,16 @@ |
315 | 317 | |
316 | 318 | $newmessagesdifflink = $this->link( |
317 | 319 | $usertalktitle, |
318 | | - wfMsgHtml( 'newmessagesdifflink' ), |
| 320 | + wfMsgHtml( 'newmessagesdifflink', $newmessagescount ), |
319 | 321 | array(), |
320 | 322 | array( 'diff' => 'cur' ), |
321 | 323 | array( 'known', 'noclasses' ) |
322 | 324 | ); |
323 | | - |
324 | | - $newmessagesnumber = $wgUser->getNewtalkNumber(); |
325 | 325 | |
326 | 326 | $ntl = wfMsg( |
327 | 327 | 'youhavenewmessages', |
328 | 328 | $newmessageslink, |
329 | 329 | $newmessagesdifflink, |
330 | | - $newmessagesnumber |
331 | 330 | ); |
332 | 331 | # Disable Cache |
333 | 332 | $out->setSquidMaxage( 0 ); |
— | — | @@ -538,7 +537,7 @@ |
539 | 538 | # do not show text when we are viewing our |
540 | 539 | # own talk page |
541 | 540 | if( !$title->equals( $wgUser->getTalkPage() ) ) { |
542 | | - $newtalk = $wgUser->getNewtalkNumber(); |
| 541 | + $newtalk = $wgUser->getnewMessagesCount(); |
543 | 542 | |
544 | 543 | # disable caching |
545 | 544 | $wgOut->setSquidMaxage( 0 ); |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -1040,9 +1040,11 @@ |
1041 | 1041 | # do not show "You have new messages" text when we are viewing our |
1042 | 1042 | # own talk page |
1043 | 1043 | if( !$this->mTitle->equals( $wgUser->getTalkPage() ) ) { |
| 1044 | + $nu = $wgUser->getnewMessagesCount(); |
| 1045 | + |
1044 | 1046 | $tl = $this->link( |
1045 | 1047 | $wgUser->getTalkPage(), |
1046 | | - wfMsgHtml( 'newmessageslink' ), |
| 1048 | + wfMsgHtml( 'newmessageslink'), |
1047 | 1049 | array(), |
1048 | 1050 | array( 'redirect' => 'no' ), |
1049 | 1051 | array( 'known', 'noclasses' ) |
— | — | @@ -1050,7 +1052,7 @@ |
1051 | 1053 | |
1052 | 1054 | $dl = $this->link( |
1053 | 1055 | $wgUser->getTalkPage(), |
1054 | | - wfMsgHtml( 'newmessagesdifflink' ), |
| 1056 | + wfMsgHtml( 'newmessagesdifflink', $nu ), |
1055 | 1057 | array(), |
1056 | 1058 | array( 'diff' => 'cur' ), |
1057 | 1059 | array( 'known', 'noclasses' ) |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -895,7 +895,7 @@ |
896 | 896 | 'pagetitle-view-mainpage' => '{{SITENAME}}', # only translate this message to other languages if you have to change it |
897 | 897 | 'retrievedfrom' => 'Retrieved from "$1"', |
898 | 898 | 'youhavenewmessages' => 'You have $3 $1 ($2).', |
899 | | -'newmessageslink' => 'new messages', |
| 899 | +'newmessageslink' => '{{PLURAL:$1|new message|new messages}}', |
900 | 900 | 'newmessagesdifflink' => 'last change', |
901 | 901 | 'youhavenewmessagesmulti' => 'You have new messages on $1', |
902 | 902 | 'newtalkseparator' => ', ', # do not translate or duplicate this message to other languages |