From 873a2ee80ba219ea354063ede0b7c3d8c7777f81 Mon Sep 17 00:00:00 2001 From: Jimmy Collins Date: Sun, 8 Oct 2006 01:14:16 +0000 Subject: [PATCH] * (bug 7519) Add plural in SpecialWatchlist --- RELEASE-NOTES | 1 + includes/SpecialWatchlist.php | 8 +++++--- languages/messages/MessagesDe.php | 6 +++--- languages/messages/MessagesEn.php | 6 +++--- 4 files changed, 12 insertions(+), 9 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index e1d010139c..5001e13c30 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -270,6 +270,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN excessive metadata in thumbs (requires ImageMagick 6.0.0 or newer). * (bug 7499) Corrections to Swedish talk namespace names * (bug 7508) Added option to compress HTML pages by dumpHTML.php +* (bug 7519) Add plural in SpecialWatchlist == Languages updated == diff --git a/includes/SpecialWatchlist.php b/includes/SpecialWatchlist.php index 3825675b61..9f709cc71a 100644 --- a/includes/SpecialWatchlist.php +++ b/includes/SpecialWatchlist.php @@ -273,7 +273,7 @@ function wfSpecialWatchlist( $par ) { } # TODO: Consider removing the third parameter - $header .= wfMsg( 'watchdetails', $wgLang->formatNum( $nitems ), + $header .= wfMsgExt( 'watchdetails', array( 'parsemag', 'escape'), $wgLang->formatNum( $nitems ), $wgLang->formatNum( $npages ), '', $specialTitle->getFullUrl( 'edit=yes' ) ); $wgOut->addWikiText( $header ); @@ -476,6 +476,8 @@ function wlCountItems( &$user, $talk = true ) { * code needs to do something further */ function wlHandleClear( &$out, &$request, $par ) { + global $wgLang; + # Check this function has something to do if( $request->getText( 'action' ) == 'clear' || $par == 'clear' ) { global $wgUser; @@ -487,13 +489,13 @@ function wlHandleClear( &$out, &$request, $par ) { # Clearing, so do it and report the result $dbw =& wfGetDB( DB_MASTER ); $dbw->delete( 'watchlist', array( 'wl_user' => $wgUser->mId ), 'wlHandleClear' ); - $out->addWikiText( wfMsg( 'watchlistcleardone', $count ) ); + $out->addWikiText( wfMsgExt( 'watchlistcleardone', array( 'parsemag', 'escape'), $wgLang->formatNum( $count ) ) ); $out->returnToMain(); } else { # Confirming, so show a form $wlTitle = Title::makeTitle( NS_SPECIAL, 'Watchlist' ); $out->addHTML( wfElement( 'form', array( 'method' => 'post', 'action' => $wlTitle->getLocalUrl( 'action=clear' ) ), NULL ) ); - $out->addWikiText( wfMsg( 'watchlistcount', $count ) ); + $out->addWikiText( wfMsgExt( 'watchlistcount', array( 'parsemag', 'escape'), $wgLang->formatNum( $count ) ) ); $out->addWikiText( wfMsg( 'watchlistcleartext' ) ); $out->addHTML( wfHidden( 'token', $wgUser->editToken( 'clearwatchlist' ) ) . diff --git a/languages/messages/MessagesDe.php b/languages/messages/MessagesDe.php index 2e28b57a78..dc8d778b1e 100644 --- a/languages/messages/MessagesDe.php +++ b/languages/messages/MessagesDe.php @@ -1018,11 +1018,11 @@ Davon sind \'\'\'$2\'\'\' (=$4%) $5.', 'watchlistfor' => '(für \'\'\'$1\'\'\')', "nowatchlist" => "Sie haben keine Einträge auf Ihrer Beobachtungsliste.", 'watchlistanontext' => 'Sie müssen sich $1, um Ihre Beobachtungsliste zu sehen oder Einträge auf ihr zu bearbeiten.', // $1 -> 'loginreqlink' -'watchlistcount' => '\'\'\'Sie haben $1 Einträge auf Ihrer Beobachtungsliste (inkl. Diskussionsseiten).\'\'\'', +'watchlistcount' => '\'\'\'Sie haben {{PLURAL:$1|einen Eintrag|$1 Einträge}} auf Ihrer Beobachtungsliste (inkl. Diskussionsseiten).\'\'\'', 'clearwatchlist' => 'Beobachtungsliste löschen', 'watchlistcleartext' => 'Sind Sie sicher, dass Sie diese vollständig löschen wollen?', 'watchlistclearbutton' => 'Beobachtungsliste löschen', -'watchlistcleardone' => 'Ihre Beobachtungsliste wurde gelöscht. $1 Einträge wurden entfernt.', +'watchlistcleardone' => 'Ihre Beobachtungsliste wurde gelöscht. {{PLURAL:$1|Ein Eintrag wurde|$1 Einträge wurden}} entfernt.', "watchnologin" => "Sie sind nicht angemeldet", 'watchnologintext' => 'Sie müssen [[{{ns:special}}:Userlogin|angemeldet]] sein, um Ihre Beobachtungsliste zu bearbeiten.', @@ -1039,7 +1039,7 @@ Wenn Sie die Seite wieder von Ihrer Beobachtungsliste entfernen möchten, klicke "unwatchthispage" => "Nicht mehr beobachten", "notanarticle" => "Keine Seite", 'watchnochange' => 'Keine der von Ihnen beobachteten Seiten wurde während des angezeigten Zeitraums bearbeitet.', -'watchdetails' => 'Sie beobachten $1 Seiten | [[{{ns:special}}:Watchlist/edit|Komplette Liste zeigen und bearbeiten]] | [[{{ns:special}}:Watchlist/clear|Komplette Liste leeren]]', +'watchdetails' => 'Sie beobachten {{PLURAL:$1|eine Seite|$1 Seiten}} | [[{{ns:special}}:Watchlist/edit|Komplette Liste zeigen und bearbeiten]] | [[{{ns:special}}:Watchlist/clear|Komplette Liste leeren]]', 'wlheader-enotif' => 'Der E-Mail-Benachrichtigungsdienst ist aktiviert.
', 'wlheader-showupdated' => 'Seiten mit noch nicht gesehenen Änderungen werden \'\'\'fett\'\'\' dargestellt.
', "watchmethod-recent" => "Überprüfen der letzten Bearbeitungen für die Beobachtungsliste", diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 681ac70b84..dbbce49969 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1413,11 +1413,11 @@ or has chosen not to receive e-mail from other users.', 'watchlistfor' => "(for '''$1''')", 'nowatchlist' => 'You have no items on your watchlist.', 'watchlistanontext' => 'Please $1 to view or edit items on your watchlist.', -'watchlistcount' => "'''You have $1 items on your watchlist, including talk pages.'''", +'watchlistcount' => "'''You have {{PLURAL:$1|$1 item|$1 items}} on your watchlist, including talk pages.'''", 'clearwatchlist' => 'Clear watchlist', 'watchlistcleartext' => 'Are you sure you wish to remove them?', 'watchlistclearbutton' => 'Clear watchlist', -'watchlistcleardone' => 'Your watchlist has been cleared. $1 items were removed.', +'watchlistcleardone' => 'Your watchlist has been cleared. {{PLURAL:$1|$1 item was|$1 items were}} removed.', 'watchnologin' => 'Not logged in', 'watchnologintext' => 'You must be [[Special:Userlogin|logged in]] to modify your watchlist.', 'addedwatch' => 'Added to watchlist', @@ -1435,7 +1435,7 @@ If you want to remove the page from your watchlist later, click \"Unwatch\" in t 'unwatchthispage' => 'Stop watching', 'notanarticle' => 'Not a content page', 'watchnochange' => 'None of your watched items was edited in the time period displayed.', -'watchdetails' => '* $1 pages watched not counting talk pages +'watchdetails' => '* {{PLURAL:$1|$1 page|$1 pages}} watched not counting talk pages * [[Special:Watchlist/edit|Show and edit complete watchlist]] * [[Special:Watchlist/clear|Remove all pages]]', 'wlheader-enotif' => "* E-mail notification is enabled.", -- 2.20.1