From: Niklas Laxström Date: Sat, 10 Nov 2007 14:52:56 +0000 (+0000) Subject: * (bug 11921) Support plural in message number_of_watching_users_pageview X-Git-Tag: 1.31.0-rc.0~50932 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/cotisations/gestion/rappel_supprimer.php?a=commitdiff_plain;h=956f219d8985d5a743bb56a16e8e06b85e42f213;p=lhc%2Fweb%2Fwiklou.git * (bug 11921) Support plural in message number_of_watching_users_pageview --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index b879b9349e..ef899da995 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -141,6 +141,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * In the deletion default reasons, calculate how much text to get from the article text, rather than getting 150 characters (which may be too much) * Add two messages for Special:Blockme which were used but undefined +* (bug 11921) Support plural in message number_of_watching_users_pageview === API changes in 1.12 === diff --git a/includes/Skin.php b/includes/Skin.php index f8f641fc89..d6821a98da 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1079,7 +1079,10 @@ END; "' AND wl_namespace=" . $wgTitle->getNamespace() ; $res = $dbr->query( $sql, 'Skin::pageStats'); $x = $dbr->fetchObject( $res ); - $s .= ' ' . wfMsg('number_of_watching_users_pageview', $x->n ); + + $s .= ' ' . wfMsgExt( 'number_of_watching_users_pageview', + array( 'parseinline' ), $wgLang->formatNum($x->n) + ); } return $s . ' ' . $this->getCopyright(); diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 35310a814f..eb651b552e 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -357,7 +357,10 @@ class SkinTemplate extends Skin { $x = $dbr->fetchObject( $res ); $numberofwatchingusers = $x->n; if ($numberofwatchingusers > 0) { - $tpl->set('numberofwatchingusers', wfMsg('number_of_watching_users_pageview', $numberofwatchingusers)); + $tpl->set('numberofwatchingusers', + wfMsgExt('number_of_watching_users_pageview', array('parseinline'), + $wgLang->formatNum($numberofwatchingusers)) + ); } else { $tpl->set('numberofwatchingusers', false); } diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 7f07d7ff87..a3bbdb0383 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1349,7 +1349,7 @@ Unselected groups will not be changed. You can deselect a group with CTRL + Left 'boteditletter' => 'b', 'sectionlink' => '→', # only translate this message to other languages if you have to change it 'number_of_watching_users_RCview' => '[$1]', # don't translate or duplicate this message to other languages -'number_of_watching_users_pageview' => '[$1 watching user/s]', +'number_of_watching_users_pageview' => '[$1 watching {{PLURAL:$1|user|users}}]', 'rc_categories' => 'Limit to categories (separate with "|")', 'rc_categories_any' => 'Any', 'rc-change-size' => '$1', # only translate this message to other languages if you have to change it