From: Ævar Arnfjörð Bjarmason Date: Wed, 26 Oct 2005 01:57:23 +0000 (+0000) Subject: * If there's only one category, display "Category", else display "Categories" X-Git-Tag: 1.6.0~1310 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dmembres/modifier.php?a=commitdiff_plain;h=b7edb1fa3f3cdfb5d734f09db43232eaf55921c1;p=lhc%2Fweb%2Fwiklou.git * If there's only one category, display "Category", else display "Categories" --- diff --git a/includes/Skin.php b/includes/Skin.php index 9f723ba57a..9e03676986 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -425,9 +425,10 @@ END; # Taken out so that they will be displayed in previews -- TS #if( !$wgOut->isArticle() ) return ''; - $t = implode ( ' | ' , $wgOut->mCategoryLinks ) ; + $t = implode ( ' | ' , $wgOut->mCategoryLinks ); + $msg = count( $wgOut->mCategoryLinks ) === 1 ? 'categories1' : 'categories'; $s = $this->makeKnownLinkObj( Title::makeTitle( NS_SPECIAL, 'Categories' ), - wfMsg( 'categories' ), 'article=' . urlencode( $wgTitle->getPrefixedDBkey() ) ) + wfMsg( $msg ), 'article=' . urlencode( $wgTitle->getPrefixedDBkey() ) ) . ': ' . $t; # optional 'dmoz-like' category browser. Will be shown under the list