* (bug 11921) Support plural in message number_of_watching_users_pageview
authorNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 10 Nov 2007 14:52:56 +0000 (14:52 +0000)
committerNiklas Laxström <nikerabbit@users.mediawiki.org>
Sat, 10 Nov 2007 14:52:56 +0000 (14:52 +0000)
RELEASE-NOTES
includes/Skin.php
includes/SkinTemplate.php
languages/messages/MessagesEn.php

index b879b93..ef899da 100644 (file)
@@ -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 ===
 
index f8f641f..d6821a9 100644 (file)
@@ -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();
index 35310a8..eb651b5 100644 (file)
@@ -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);
                                }
index 7f07d7f..a3bbdb0 100644 (file)
@@ -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