Skip to content

Commit

Permalink
Fix translation
Browse files Browse the repository at this point in the history
Signed-off-by: Serge Arbuzov <info@whitediver.com>
  • Loading branch information
Arbuzov committed Nov 12, 2023
1 parent 772f1e4 commit 5983c92
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 44 deletions.
5 changes: 0 additions & 5 deletions custom_components/delonghi_primadonna/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ class ProfileSelect(DelonghiDeviceEntity, SelectEntity):
_attr_entity_category = EntityCategory.CONFIG
_attr_translation_key = 'profile'
_attr_icon = 'mdi:account'
_attr_has_entity_name = True

@property
def entity_category(self, **kwargs: Any) -> None:
Expand All @@ -62,7 +61,6 @@ class BeverageSelect(DelonghiDeviceEntity, SelectEntity):
_attr_current_option = [*AvailableBeverage][0]
_attr_translation_key = 'beverage'
_attr_icon = 'mdi:coffee'
_attr_has_entity_name = True

async def async_select_option(self, option: str) -> None:
"""Select beverage action"""
Expand All @@ -77,7 +75,6 @@ class EnergySaveModeSelect(DelonghiDeviceEntity, SelectEntity):
_attr_current_option = list(POWER_OFF_OPTIONS.keys())[3]
_attr_translation_key = 'energy_save_mode'
_attr_icon = 'mdi:power-plug-off'
_attr_has_entity_name = True

@property
def entity_category(self, **kwargs: Any) -> None:
Expand All @@ -101,7 +98,6 @@ class WaterHardnessSelect(DelonghiDeviceEntity, SelectEntity):
_attr_current_option = 'Soft'
_attr_translation_key = 'water_hardness'
_attr_icon = 'mdi:water'
_attr_has_entity_name = True

@property
def entity_category(self, **kwargs: Any) -> None:
Expand All @@ -125,7 +121,6 @@ class WaterTemperatureSelect(DelonghiDeviceEntity, SelectEntity):
_attr_current_option = 'Low'
_attr_translation_key = 'water_temperature'
_attr_icon = 'mdi:thermometer'
_attr_has_entity_name = True

@property
def entity_category(self, **kwargs: Any) -> None:
Expand Down
95 changes: 56 additions & 39 deletions custom_components/delonghi_primadonna/translations/ru.json
Original file line number Diff line number Diff line change
@@ -1,44 +1,61 @@
{
"config": {
"abort": {
"already_configured": "Устройство уже добалено"
},
"error": {
"cannot_connect": "Не могу подключиться",
"invalid_auth": "Не могу авторизоваться",
"unknown": "Неожиданная ошибка"
},
"step": {
"user": {
"data": {
"mac": "MAC",
"name": "Название"
}
}
}
"config": {
"abort": {
"already_configured": "Устройство уже добалено"
},
"error": {
"cannot_connect": "Не могу подключиться",
"invalid_auth": "Не могу авторизоваться",
"unknown": "Неожиданная ошибка"
},
"entity": {
"select": {
"profile": {
"name": "Профиль"
},
"beverage": {
"name": "Напиток"
},
"energy_save_mode": {
"name": "Aвтоотключение"
},
"water_hardness": {
"name": "Жесткость воды"
},
"water_temperature": {
"name": "Температура воды"
}
},
"button":{
"power_on": {
"name": "Включить"
}
"step": {
"user": {
"data": {
"mac": "MAC",
"name": "Название"
}
}
}
},
"entity": {
"select": {
"profile": {
"name": "Профиль"
},
"beverage": {
"name": "Напиток"
},
"energy_save_mode": {
"name": "Aвтоотключение"
},
"water_hardness": {
"name": "Жесткость воды"
},
"water_temperature": {
"name": "Температура воды"
}
},
"button": {
"power_on": {
"name": "Включить"
}
}
},
"selector": {
"profile": {
"name": "Профиль"
},
"beverage": {
"name": "Напиток"
},
"energy_save_mode": {
"name": "Aвтоотключение"
},
"water_hardness": {
"name": "Жесткость воды"
},
"water_temperature": {
"name": "Температура воды"
}
}
}

0 comments on commit 5983c92

Please sign in to comment.