This commit is contained in:
Alexander Makarov
2015-01-31 00:58:56 +03:00
parent dec4a4f239
commit 7e868555c5
2 changed files with 9 additions and 0 deletions

View File

@ -4,4 +4,5 @@
*/
return [
'The dog runs fast.' => 'Собака бегает быстро.',
'There {n, plural, =0{no cats} =1{one cat} other{are # cats}} on lying on the sofa!' => 'На диване {n, plural, =0{нет кошек} =1{лежит одна кошка} one{лежит # кошка} few{лежит # кошки} many{лежит # кошек} other{лежит # кошки}}!',
];

View File

@ -126,6 +126,14 @@ class I18NTest extends TestCase
$this->assertEquals('1 item', $this->i18n->translate('test', '{0, number} {0, plural, one{item} other{items}}', 1, 'hu'));
}
/**
* https://github.com/yiisoft/yii2/issues/7093
*/
public function testRussianPlurals()
{
$this->assertEquals('На диване лежит 6 кошек!', $this->i18n->translate('test', 'There {n, plural, =0{no cats} =1{one cat} other{are # cats}} on lying on the sofa!', ['n' => 6], 'ru'));
}
/**
* https://github.com/yiisoft/yii2/issues/2519
*/