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

[RU]Added translation of error #2233

Merged
merged 2 commits into from
Jun 15, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 171 additions & 6 deletions sentences/ru/_common.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,177 @@
language: "ru"
responses:
errors:
no_intent: "обращение не распознано"
no_area: "нет зоны {{ area }}"
no_domain_in_area: "в зоне {{ area }} нет объектов {{ domain }}"
no_device_class_in_area: "в зоне {{ area }} нет устройств {{ device_class }}"
no_entity: "объекта {{ entity }} не существует"
handle_error: "во время обработки действий произошла ошибка"
# General errors
no_intent: "Обращение не распознано"
handle_error: "Во время обработки действия произошла ошибка"

# Errors for when user is not logged in
no_area: "Нет зоны {{ area }}"
no_floor: "Нет этажа {{ floor }}"
no_domain: |
{% set translations = {
"button": "кнопка",
"camera": "камера",
"input_button": "кнопка",
"alarm_control_panel": "охрана",
"automation": "автоматизация",
"fan": "вентилятор",
"climate": "термостат",
"humidifier": "увлажнитель",
"input_boolean": "переключатель",
"siren": "сирена",
"water_heater": "бойлер",
"light": "лампа",
"switch": "переключатель",
"script": "скрипт",
"remote": "ИК пульт",
"lock": "замок",
"vacuum": "пылесос",
"scene": "сцена",
"media_player": "плеер",
"lawn_mower": "газонокосилка",
"valve": "кран"
} %}
{% if domain in translations -%}
Нет объектов типа {{ translations[domain] }}
{%- else -%}
Нет объектов запрашиваемого типа
{%- endif %}
Comment on lines +11 to +39
Copy link

Choose a reason for hiding this comment

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

Great use of templating to dynamically translate domain types. Ensure the translations are accurate and consistent across all instances.

no_domain_in_area: |
{% set translations = {
"button": "кнопка",
"camera": "камера",
"input_button": "кнопка",
"alarm_control_panel": "охрана",
"automation": "автоматизация",
"fan": "вентилятор",
"climate": "термостат",
"humidifier": "увлажнитель",
"input_boolean": "переключатель",
"siren": "сирена",
"water_heater": "бойлер",
"light": "лампа",
"switch": "переключатель",
"script": "скрипт",
"remote": "ИК пульт",
"lock": "замок",
"vacuum": "пылесос",
"scene": "сцена",
"media_player": "плеер",
"lawn_mower": "газонокосилка",
"valve": "кран"
} %}
{% if domain in translations -%}
Нет объектов типа {{ translations[domain] }} в {{ area }}
{%- else -%}
Нет объектов запрашиваемого типа в {{ area }}
no_domain_in_floor: |
{% set translations = {
"button": "кнопка",
"camera": "камера",
"input_button": "кнопка",
"alarm_control_panel": "охрана",
"automation": "автоматизация",
"fan": "вентилятор",
"climate": "термостат",
"humidifier": "увлажнитель",
"input_boolean": "переключатель",
"siren": "сирена",
"water_heater": "бойлер",
"light": "лампа",
"switch": "переключатель",
"script": "скрипт",
"remote": "ИК пульт",
"lock": "замок",
"vacuum": "пылесос",
"scene": "сцена",
"media_player": "плеер",
"lawn_mower": "газонокосилка",
"valve": "кран"
} %}
{% if domain in translations -%}
Нет объектов типа {{ translations[domain] }} на этаже
{%- else -%}
Нет объектов запрашиваемого типа на этаже

no_device_class: |
{% set translations = {
"awning": "навесы",
"blind": "жалюзи",
"curtain": "шторы",
"door": "двери",
"garage": "гаражные ворота",
"gate": "ворота",
"shade": "рулонные шторы",
"shutter": "ставни",
"window": "окна"
} %}
{% if device_class in translations -%}
{{ translations[device_class] }} отсутствуют
{%- else -%}
Отсутствуют объекты класса {{ device_class }}
{%- endif %}
no_device_class_in_area: |
{% set translations = {
"awning": "навесы",
"blind": "жалюзи",
"curtain": "шторы",
"door": "двери",
"garage": "гаражные ворота",
"gate": "ворота",
"shade": "рулонные шторы",
"shutter": "ставни",
"window": "окна"
} %}
{% if device_class in translations -%}
Отсутствуют {{ translations[device_class] }} в {{ area }}
{%- else -%}
Отсутствуют объекты класса {{ device_class }} в {{ area }}
{%- endif %}
no_device_class_in_floor: |
{% set translations = {
"awning": "навесы",
"blind": "жалюзи",
"curtain": "шторы",
"door": "двери",
"garage": "гаражные ворота",
"gate": "ворота",
"shade": "рулонные шторы",
"shutter": "ставни",
"window": "окна"
} %}
{% if device_class in translations -%}
Отсутствуют {{ translations[device_class] }} на этаже
{%- else -%}
Отсутствуют объекты класса {{ device_class }} на этаже
{%- endif %}

no_entity: "Отсутстует объект {{ entity }}"
no_entity_in_area: "Отсутстует объект {{ entity }} в {{ area }}"
no_entity_in_floor: "Отсутстует объект {{ entity }} на этаже"
Comment on lines +149 to +151
Copy link

Choose a reason for hiding this comment

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

Ensure that the term "Отсутствует" is consistently used or consider using a more informal variant if it aligns with the rest of the interface language.

entity_wrong_state: "Нет объектов со статусом {{ state | lower }}"
feature_not_supported: "Фунция не поддерживается объектом"

# Errors for when user is logged in and we can give more information
no_entity_exposed: "Доступ к объекту {{ entity }} не предоставлен"
no_entity_in_area_exposed: "Доступа к объекту {{ entity }} в {{ area }} не предоставлен"
no_entity_in_floor_exposed: "Доступа к объекту {{ entity }} на этаже не предоставлен"
Copy link
Member

Choose a reason for hiding this comment

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

Как будто бы здесь должно быть "Доступа не предоставлено", либо "Доступ не предоставлен"

no_domain_exposed: "Доступ к {{ domain }} не предоставлен"
no_domain_in_area_exposed: "Доступ к {{ domain }} в {{ area }} не предоставлен"
no_domain_in_floor_exposed: "Доступ к {{ domain }} на этаже не предоставлен"
no_device_class_exposed: "Доступ к {{ device_class }} не предоставлен"
no_device_class_in_area_exposed: "Доступ к {{ device_class }} в {{ area }} не предоставлен"
no_device_class_in_floor_exposed: "Доступ к {{ device_class }} на этаже не предоставлен"

# Used when multiple (exposed) devices have the same name
duplicate_entities: "Дублирование названий. Несколько объектов {{ entity }}"
duplicate_entities_in_area: "Дублирование названий. Несколько объектов {{ entity }} в {{ area }}"
duplicate_entities_in_floor: "Дублирование названий. Несколько объектов {{ entity }} на этаже"
Copy link

Choose a reason for hiding this comment

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

The lines detailing errors for exposed entities and duplicates (lines 156-169) are crucial for security and clarity, ensuring users are aware of access limitations and naming conflicts. However, these lines exceed the recommended line length for YAML files. Consider breaking these messages into multiple lines to adhere to best practices and improve readability.

- no_entity_exposed: "Доступ к объекту {{ entity }} не предоставлен"
+ no_entity_exposed: >
+   "Доступ к объекту {{ entity }} не предоставлен"

- no_entity_in_area_exposed: "Доступа к объекту {{ entity }} в {{ area }} не предоставлен"
+ no_entity_in_area_exposed: >
+   "Доступа к объекту {{ entity }} в {{ area }} не предоставлен"

- no_entity_in_floor_exposed: "Доступа к объекту {{ entity }} на этаже не предоставлен"
+ no_entity_in_floor_exposed: >
+   "Доступа к объекту {{ entity }} на этаже не предоставлен"
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
no_entity_exposed: "Доступ к объекту {{ entity }} не предоставлен"
no_entity_in_area_exposed: "Доступа к объекту {{ entity }} в {{ area }} не предоставлен"
no_entity_in_floor_exposed: "Доступа к объекту {{ entity }} на этаже не предоставлен"
no_domain_exposed: "Доступ к {{ domain }} не предоставлен"
no_domain_in_area_exposed: "Доступ к {{ domain }} в {{ area }} не предоставлен"
no_domain_in_floor_exposed: "Доступ к {{ domain }} на этаже не предоставлен"
no_device_class_exposed: "Доступ к {{ device_class }} не предоставлен"
no_device_class_in_area_exposed: "Доступ к {{ device_class }} в {{ area }} не предоставлен"
no_device_class_in_floor_exposed: "Доступ к {{ device_class }} на этаже не предоставлен"
# Used when multiple (exposed) devices have the same name
duplicate_entities: "Дублирование названий. Несколько объектов {{ entity }}"
duplicate_entities_in_area: "Дублирование названий. Несколько объектов {{ entity }} в {{ area }}"
duplicate_entities_in_floor: "Дублирование названий. Несколько объектов {{ entity }} на этаже"
no_entity_exposed: >
"Доступ к объекту {{ entity }} не предоставлен"
no_entity_in_area_exposed: >
"Доступа к объекту {{ entity }} в {{ area }} не предоставлен"
no_entity_in_floor_exposed: >
"Доступа к объекту {{ entity }} на этаже не предоставлен"
no_domain_exposed: "Доступ к {{ domain }} не предоставлен"
no_domain_in_area_exposed: "Доступ к {{ domain }} в {{ area }} не предоставлен"
no_domain_in_floor_exposed: "Доступ к {{ domain }} на этаже не предоставлен"
no_device_class_exposed: "Доступ к {{ device_class }} не предоставлен"
no_device_class_in_area_exposed: "Доступ к {{ device_class }} в {{ area }} не предоставлен"
no_device_class_in_floor_exposed: "Доступ к {{ device_class }} на этаже не предоставлен"
# Used when multiple (exposed) devices have the same name
duplicate_entities: "Дублирование названий. Несколько объектов {{ entity }}"
duplicate_entities_in_area: "Дублирование названий. Несколько объектов {{ entity }} в {{ area }}"
duplicate_entities_in_floor: "Дублирование названий. Несколько объектов {{ entity }} на этаже"
Tools
yamllint

[error] 157-157: line too long (92 > 80 characters) (line-length)


[error] 158-158: line too long (89 > 80 characters) (line-length)


[error] 160-160: line too long (83 > 80 characters) (line-length)


[error] 163-163: line too long (95 > 80 characters) (line-length)


[error] 164-164: line too long (92 > 80 characters) (line-length)


[error] 168-168: line too long (101 > 80 characters) (line-length)


[error] 169-169: line too long (98 > 80 characters) (line-length)


# Errors for timers
timer_not_found: "Таймер не найден"
multiple_timers_matched: "Коллизия установленных таймеров"
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
multiple_timers_matched: "Коллизия установленных таймеров"
multiple_timers_matched: "Конфликт установленных таймеров"

no_timer_support: "Таймеры не поддерживаются на данном устройстве"
lists:
color:
values:
Expand Down