-
Notifications
You must be signed in to change notification settings - Fork 583
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
[RU] Improved responses #2957
[RU] Improved responses #2957
Conversation
responses/ru/HassTurnOff.yaml
Outdated
{% if ((slots.name.split() + ["выключатель","пользователь","день","дождь","ночь"]) | ||
| count != dict.fromkeys(slots.name.split() + ["выключатель","пользователь","день","дождь","ночь"]) | count) or | ||
(slots.name[-2].lower() in "рь" and slots.name.lower() != "дверь") %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Думаю лучше добавить комментарии:
"If slots.name contains some of the words in defined list"
"Or last two characters of the name are "рь" but the name is not "дверь"
Потому что мне потребовалось время чтобы понять, что здесь происходит.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мы делаем исключение для слова "дверь", но разве "ночь" — не женского рода? Если я правильно понял, то по итогу этих условий мы идем в male_ending
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Дверь - исключение для оканчивающихся на рь, прошлый раз просмотрел просмотрел такой вариант. А с ночью наоборот перемудрил и записал её в мужской род - надо убрать. Но ситуации разные
{% set ending = male_ending %} | ||
{% else %} | ||
{% set ending = female_ending %} | ||
{% endif %} | ||
{% elif slots.name[-1].lower() in "а, у, я" %} | ||
{% elif slots.name[-1].lower() in "а, у, ю, я" %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Добавить комментарий в духе:
"Change the ending of a feminine name in the accusative case so that the response returns the name in the nominative case. Eg:
Выключи лампу -> Лампа выключена"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Просто опять-таки, с наскока трудно понять о чем тут речь
В общем, потребовалось время, чтоб без комментариев разобраться, но вроде все отлично |
Improved selection of correct endings for names.
Лучше внимательно проверить, что налепил. Вероятно необходимы стилистические правки.