mirror of
				https://github.com/yiisoft/yii2.git
				synced 2025-11-04 06:37:55 +08:00 
			
		
		
		
	Closes #7093
This commit is contained in:
		@ -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{лежит # кошки}}!',
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
     */
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user