* (bug 5905) Plural support for Bosnian localisation (bs)
* Groups which won't hit the rate limiter now configurable with
$wgRateLimitsExcludedGroups
+* (bug 5806) {{plural:}} support instead of "twin" MediaWiki messages
== Compatibility ==
if( count( $children ) > 0 ) {
# Showing subcategories
$r .= '<h2>' . wfMsg( 'subcategories' ) . "</h2>\n";
- $r .= $this->formatCount( $children, 'subcategorycount' );
+ $r .= wfMsgExt( 'subcategorycount', array( 'parse' ), count( $children) );
$r .= $this->formatList( $children, $children_start_char );
}
# Showing articles in this category
$ti = htmlspecialchars( $this->mTitle->getText() );
$r .= '<h2>' . wfMsg( 'category_header', $ti ) . "</h2>\n";
- $r .= $this->formatCount( $articles, 'categoryarticlecount' );
+ $r .= wfMsgExt( 'categoryarticlecount', array( 'parse' ), count( $articles) );
$r .= $this->formatList( $articles, $articles_start_char );
if( $wgCategoryMagicGallery && ! $ig->isEmpty() ) {
return $r;
}
- /**
- * @param array $articles
- * @param string $message
- * @return string
- * @private
- */
- function formatCount( $articles, $message ) {
- global $wgContLang;
- $numart = count( $articles );
- if( $numart == 1 ) {
- # Slightly different message to avoid silly plural
- $message .= '1';
- }
- return wfMsg( $message, $wgContLang->formatNum( $numart ) );
- }
/**
* Format a list of articles chunked by letter, either as a
* bullet list or a columnar format, depending on the length.
$pop = '</span>';
$t = $embed . implode ( "{$pop} {$sep} {$embed}" , $wgOut->mCategoryLinks ) . $pop;
- $msg = count( $wgOut->mCategoryLinks ) === 1 ? 'categories1' : 'categories';
+ $msg = wfMsgExt('categories', array('parsemag', 'escape'), count( $wgOut->mCategoryLinks ));
$s = $this->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, 'Categories' ),
- wfMsg( $msg ), 'article=' . urlencode( $wgTitle->getPrefixedDBkey() ) )
+ $msg, 'article=' . urlencode( $wgTitle->getPrefixedDBkey() ) )
. ': ' . $t;
# optional 'dmoz-like' category browser. Will be shown under the list
return wfMsg( $msg,
$this->makeKnownLink(
$wgContLang->SpecialPage( 'Undelete/' . $wgTitle->getPrefixedDBkey() ),
- wfMsg( 'restorelink' . ($n == 1 ? '1' : ''), $n ) ) );
+ wfMsgExt( 'restorelink', array( 'parsemag', 'escape' ), $n ) ) );
}
return '';
}
'dec' => 'Dec',
# Bits of text used by many pages:
#
-'categories1' => 'Category',
-'categories' => 'Categories',
+'categories' => '{{PLURAL:$1|Category|Categories}}',
'category' => 'category',
'category_header' => 'Articles in category "$1"',
'subcategories' => 'Subcategories',
'hidetoc' => 'hide',
'thisisdeleted' => 'View or restore $1?',
'viewdeleted' => 'View $1?',
-'restorelink1' => 'one deleted edit',
-'restorelink' => '$1 deleted edits',
+'restorelink' => '{{PLURAL:$1|one deleted edit|$1 deleted edits}}',
'feedlinks' => 'Feed:',
'sitenotice' => '-', # the equivalent to wgSiteNotice
'anonnotice' => '-',
'spamprotectiontitle' => 'Spam protection filter',
'spamprotectiontext' => 'The page you wanted to save was blocked by the spam filter. This is probably caused by a link to an external site.',
'spamprotectionmatch' => 'The following text is what triggered our spam filter: $1',
-'subcategorycount' => "There are $1 subcategories to this category.",
-'subcategorycount1' => "There is $1 subcategory to this category.",
-'categoryarticlecount' => "There are $1 articles in this category.",
-'categoryarticlecount1' => "There is $1 article in this category.",
+'subcategorycount' => "There {{PLURAL:$1|is one subcategory|are $1 subcategories}} to this category.",
+'categoryarticlecount' => "There {{PLURAL:$1|is one article|are $1 articles}} in this category.",
'listingcontinuesabbrev' => " cont.",
'spambot_username' => 'MediaWiki spam cleanup',
'spam_reverting' => 'Reverting to last version not containing links to $1',