Commit 4d036999 by Carsten Brandt

fixed fallback message format parameter order

parent bcd1ad11
...@@ -316,7 +316,7 @@ class MessageFormatter extends Component ...@@ -316,7 +316,7 @@ class MessageFormatter extends Component
} }
} }
if ($message !== false) { if ($message !== false) {
return $this->fallbackFormat($locale, $message, $args); return $this->fallbackFormat($message, $args, $locale);
} }
break; break;
case 'plural': case 'plural':
...@@ -351,7 +351,7 @@ class MessageFormatter extends Component ...@@ -351,7 +351,7 @@ class MessageFormatter extends Component
} }
} }
if ($message !== false) { if ($message !== false) {
return $this->fallbackFormat($locale, $message, $args); return $this->fallbackFormat($message, $args, $locale);
} }
break; break;
} }
......
...@@ -115,7 +115,7 @@ _MSG_ ...@@ -115,7 +115,7 @@ _MSG_
/** /**
* @dataProvider patterns * @dataProvider patterns
*/ */
public function testNamedArgumentsObject($pattern, $expected, $args) public function testNamedArguments($pattern, $expected, $args)
{ {
$formatter = new FallbackMessageFormatter(); $formatter = new FallbackMessageFormatter();
$result = $formatter->fallbackFormat($pattern, $args, 'en_US'); $result = $formatter->fallbackFormat($pattern, $args, 'en_US');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment