diff --git a/framework/yii/i18n/MessageFormatter.php b/framework/yii/i18n/MessageFormatter.php index d04782e..9754e0b 100644 --- a/framework/yii/i18n/MessageFormatter.php +++ b/framework/yii/i18n/MessageFormatter.php @@ -316,7 +316,7 @@ class MessageFormatter extends Component } } if ($message !== false) { - return $this->fallbackFormat($locale, $message, $args); + return $this->fallbackFormat($message, $args, $locale); } break; case 'plural': @@ -351,7 +351,7 @@ class MessageFormatter extends Component } } if ($message !== false) { - return $this->fallbackFormat($locale, $message, $args); + return $this->fallbackFormat($message, $args, $locale); } break; } diff --git a/tests/unit/framework/i18n/FallbackMessageFormatterTest.php b/tests/unit/framework/i18n/FallbackMessageFormatterTest.php index f674358..910c433 100644 --- a/tests/unit/framework/i18n/FallbackMessageFormatterTest.php +++ b/tests/unit/framework/i18n/FallbackMessageFormatterTest.php @@ -115,7 +115,7 @@ _MSG_ /** * @dataProvider patterns */ - public function testNamedArgumentsObject($pattern, $expected, $args) + public function testNamedArguments($pattern, $expected, $args) { $formatter = new FallbackMessageFormatter(); $result = $formatter->fallbackFormat($pattern, $args, 'en_US');