define('MAG_SERVERNAME', 42);
define('MAG_NUMBEROFFILES', 43);
define('MAG_IMG_MANUALTHUMB', 44);
-define('MAG_PLURALFORM', 45);
+define('MAG_PLURAL', 45);
$wgVariableIDs = array(
MAG_CURRENTMONTH,
}
}
- # PLURALFORM
+ # PLURAL
if ( !$found && $argc >= 2 ) {
- $mwPluralForm =& MagicWord::get( MAG_PLURALFORM );
+ $mwPluralForm =& MagicWord::get( MAG_PLURAL );
if ( $mwPluralForm->matchStartAndRemove( $part1 ) ) {
if ($argc==2) {$args[2]=$args[1];}
- $text = $linestart . $wgContLang->convertPluralForm( $part1, $args[0], $args[1], $args[2]);
+ $text = $linestart . $wgContLang->convertPlural( $part1, $args[0], $args[1], $args[2]);
$found = true;
}
}
MAG_CURRENTWEEK => array( 1, 'CURRENTWEEK' ),
MAG_CURRENTDOW => array( 1, 'CURRENTDOW' ),
MAG_REVISIONID => array( 1, 'REVISIONID' ),
- MAG_PLURALFORM => array( 0, 'PLURALFORM:' ),
+ MAG_PLURAL => array( 0, 'PLURAL:' ),
);
#-------------------------------------------------------------------
* depending on "count mod 10". See [[w:Plural]]
* For English it is pretty simple.
*
- * Invoked by putting {{pluralform:count|wordform1|wordform2}}
- * or {{pluralform:count|wordform1|wordform2|wordform3}}
+ * Invoked by putting {{plural:count|wordform1|wordform2}}
+ * or {{plural:count|wordform1|wordform2|wordform3}}
*
- * Example: {{pluralform:{{NUMBEROFARTICLES}}|article|articles}}
+ * Example: {{plural:{{NUMBEROFARTICLES}}|article|articles}}
*
* @param string $count
* @param string $wordform1
* @param string $wordform3 (optional)
* @return string
*/
- function convertPluralForm( $count, $wordform1, $wordform2, $wordform3) {
- if ($count==1) {return $wordform1;}
- else {return $wordform2;}
+ function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
+ return $count == 1 ? $wordform1 : $wordform2;
}
/**
return $word;
}
- function convertPluralForm( $count, $wordform1, $wordform2, $wordform3) {
+ function convertPlural( $count, $wordform1, $wordform2, $wordform3) {
if ($count > 10 && floor(($count % 100) / 10) == 1) {
return $wordform3;
}