Fixes #13287: Fixed translating "and" separator in UniqueValidator error message

This commit is contained in:
Tetyuev Pavel
2017-01-12 11:22:19 +05:00
committed by Alexander Makarov
parent 3ea671454c
commit 3a1cd7f3aa
3 changed files with 6 additions and 1 deletions

View File

@ -100,6 +100,7 @@ Yii Framework 2 Change Log
- Enh #13268: Added logging of memory usage (bashkarev)
- Enh: Added constants for specifying `yii\validators\CompareValidator::$type` (cebe)
- Enh: Refactored `yii\web\ErrorAction` to make it reusable (silverfire)
- Bug #13287: Fixed translating "and" separator in `UniqueValidator` error message (jetexe)
2.0.10 October 20, 2016

View File

@ -566,8 +566,11 @@ class BaseInflector
* @return string the generated sentence
* @since 2.0.1
*/
public static function sentence(array $words, $twoWordsConnector = ' and ', $lastWordConnector = null, $connector = ', ')
public static function sentence(array $words, $twoWordsConnector = null, $lastWordConnector = null, $connector = ', ')
{
if ($twoWordsConnector === null) {
$twoWordsConnector = Yii::t('yii', ' and ');
}
if ($lastWordConnector === null) {
$lastWordConnector = $twoWordsConnector;
}

View File

@ -21,6 +21,7 @@ return [
'Unknown alias: -{name}' => 'Неизвестный псевдоним: -{name}',
'Yii Framework' => 'Yii Framework',
'(not set)' => '(не задано)',
' and ' => ' и ',
'An internal server error occurred.' => 'Возникла внутренняя ошибка сервера.',
'Are you sure you want to delete this item?' => 'Вы уверены, что хотите удалить этот элемент?',
'Error' => 'Ошибка',