r14645 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r14644‎ | r14645 | r14646 >
Date:19:58, 7 June 2006
Author:nikerabbit
Status:old
Tags:
Comment:
* (bug 5981) Add plural function Slovenian (sl)
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/languages/LanguageSl.php (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES
@@ -458,8 +458,8 @@
459459 edit with 'preview on first edit' enabled.
460460 * (bug 6230) Regression fix: <nowiki> in [URL link text]
461461 * Added AutoLoader.php, which loads classes without need of require_once()
 462+* (bug 5981) Add plural function Slovenian (sl)
462463
463 -
464464 == Compatibility ==
465465
466466 MediaWiki 1.7 requires PHP 5 (5.1 recommended). PHP 4 is no longer supported.
Index: trunk/phase3/languages/LanguageSl.php
@@ -190,5 +190,23 @@
191191 return $word; # this will return the original value for 'imenovalnik' (nominativ) and all undefined case values
192192 }
193193
 194+ function convertPlural( $count, $w1, $w2, $w3, $w4, $w5) {
 195+ $count = str_replace ('.', '', $count);
 196+ $forms = array( $w1, $w2, $w3, $w4, $w5 );
 197+ if ( $count % 100 === 1 ) {
 198+ $index = 0;
 199+ } elseif ( $count % 100 === 2 ) {
 200+ $index = 1;
 201+ } elseif ( $count%100==3 || $count%100==4 ) {
 202+ $index = 2;
 203+ } elseif ( $count != 0 ) {
 204+ $index = 3;
 205+ } else {
 206+ $index = 4;
 207+ }
 208+ return $forms[$index];
 209+ }
 210+
 211+
194212 }
195213 ?>
\ No newline at end of file

Status & tagging log