Page MenuHomePhabricator

Use $separatorTransformTable in convertPlural
Closed, InvalidPublic

Description

patch for langs using convertPlural

Magic word "PLURAL" accepts points, commas and spaces in numbers and interprets them in a site-language-specific way (depending on $separatorTransformTable in MessagesXx.php)


Version: unspecified
Severity: enhancement

Attached:

Details

Reference
bz11730

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 9:57 PM
bzimport set Reference to bz11730.
bzimport added a subscriber: Unknown Object (MLST).

As far as I know the parser already does it:
static function plural( $parser, $text = '', $arg0 = null, $arg1 = null, $arg2 = null, $arg3 = null, $arg4 = null ) {

		$text = $parser->getFunctionLang()->parseFormattedNumber( $text );
		return $parser->getFunctionLang()->convertPlural( $text, $arg0, $arg1, $arg2, $arg3, $arg4 );

}

So I'm puzzled why the are hacks in the language files at all.

Hacks are removed and parser indeed should normalize the numbers.