Browse Source

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

tags/2.0.11
Tetyuev Pavel 8 years ago committed by Alexander Makarov
parent
commit
3a1cd7f3aa
No known key found for this signature in database
GPG Key ID: 3617B79C6A325E4A
  1. 1
      framework/CHANGELOG.md
  2. 5
      framework/helpers/BaseInflector.php
  3. 1
      framework/messages/ru/yii.php

1
framework/CHANGELOG.md

@ -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

5
framework/helpers/BaseInflector.php

@ -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;
}

1
framework/messages/ru/yii.php

@ -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' => 'Ошибка',

Loading…
Cancel
Save