From: Niklas Laxström Date: Thu, 8 Jun 2006 19:42:07 +0000 (+0000) Subject: * {{PLURAL}} can now take up to five forms. Needed for some languages X-Git-Tag: 1.31.0-rc.0~56828 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=4c085983f23a3e563ccb3f0f090786a538582a76;p=lhc%2Fweb%2Fwiklou.git * {{PLURAL}} can now take up to five forms. Needed for some languages --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f1b26e3388..814f328661 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -460,6 +460,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Added AutoLoader.php, which loads classes without need of require_once() * (bug 5981) Add plural function Slovenian (sl) * (bug 5945) Introduce {{CONTENTLANGUAGE}} magic word +* {{PLURAL}} can now take up to five forms == Compatibility == diff --git a/includes/Parser.php b/includes/Parser.php index 274142826e..db6e2733cc 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2747,8 +2747,9 @@ class Parser if ( !$found && $argc >= 2 ) { $mwPluralForm =& MagicWord::get( MAG_PLURAL ); if ( $mwPluralForm->matchStartAndRemove( $part1 ) ) { - if ($argc==2) {$args[2]=$args[1];} - $text = $linestart . $lang->convertPlural( $part1, $args[0], $args[1], $args[2]); + while ( count($args) < 5 ) { $args[] = $args[count($args)-1]; } + $text = $linestart . $lang->convertPlural( $part1, $args[0], $args[1], + $args[2], $args[3], $args[4]); $found = true; } }