Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix russian translation #13372

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion framework/helpers/BaseInflector.php
Expand Up @@ -566,8 +566,11 @@ public static function ordinalize($number)
* @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') . ' ';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather put spaces inside the translation to allow changing using dictionary.

$twoWordsConnector = Yii::t('yii', ' and ');

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think it is a very good idea.

}
if ($lastWordConnector === null) {
$lastWordConnector = $twoWordsConnector;
}
Expand Down
2 changes: 2 additions & 0 deletions framework/messages/ru/yii.php
Expand Up @@ -24,6 +24,7 @@
'{attribute} must be less than or equal to "{compareValueOrAttribute}".' => 'Значение «{attribute}» должно быть меньше или равно значения «{compareValueOrAttribute}».',
'{attribute} must not be equal to "{compareValueOrAttribute}".' => 'Значение «{attribute}» не должно быть равно «{compareValueOrAttribute}».',
'(not set)' => '(не задано)',
'and' => 'и',
'An internal server error occurred.' => 'Возникла внутренняя ошибка сервера.',
'Are you sure you want to delete this item?' => 'Вы уверены, что хотите удалить этот элемент?',
'Delete' => 'Удалить',
Expand Down Expand Up @@ -90,6 +91,7 @@
'{attribute} should contain at least {min, number} {min, plural, one{character} other{characters}}.' => 'Значение «{attribute}» должно содержать минимум {min, number} {min, plural, one{символ} few{символа} many{символов} other{символа}}.',
'{attribute} should contain at most {max, number} {max, plural, one{character} other{characters}}.' => 'Значение «{attribute}» должно содержать максимум {max, number} {max, plural, one{символ} few{символа} many{символов} other{символа}}.',
'{attribute} should contain {length, number} {length, plural, one{character} other{characters}}.' => 'Значение «{attribute}» должно содержать {length, number} {length, plural, one{символ} few{символа} many{символов} other{символа}}.',
'The combination {values} of {attributes} has already been taken.' => 'Комбинация {values} параметров {attributes} уже существует',
'{delta, plural, =1{1 day} other{# days}}' => '{delta, plural, one{# день} few{# дня} many{# дней} other{# дней}}',
'{delta, plural, =1{1 hour} other{# hours}}' => '{delta, plural, one{# час} few{# часа} many{# часов} other{# часов}}',
'{delta, plural, =1{1 minute} other{# minutes}}' => '{delta, plural, one{# минута} few{# минуты} many{# минут} other{# минут}}',
Expand Down