Skip to content

Commit

Permalink
[UK] Added Ukrainian language (home-assistant#144)
Browse files Browse the repository at this point in the history
* Added ukrainian language

* Added fixtures

* Added responses

* Added more commons

* Added light intents
  • Loading branch information
skynetua authored Dec 27, 2022
1 parent 9c7472d commit e42e448
Show file tree
Hide file tree
Showing 25 changed files with 288 additions and 0 deletions.
6 changes: 6 additions & 0 deletions responses/uk/HassClimateGetTemperature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: uk
responses:
intents:
HassClimateGetTemperature:
success:
- "{{ state.state }} градусів"
55 changes: 55 additions & 0 deletions sentences/uk/_common.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
language: uk
responses:
errors:
no_intent: "Вибачте, я цього не розумію"
no_area: "Немає приміщення під назвою {{ area }}"
no_domain: "Приміщення {{ area }} не містить {{ domain }}"
no_device_class: "Приміщення {{ area }} не містить {{ device_class }}"
no_entity: "Немає пристрою чи сутності під назвою {{ entity }}"
handle_error: "Неочікувана помилка виникла під час виконання запиту"
lists:
color:
values:
- in: "білий"
out: "white"
- in: "чорний"
out: "black"
- in: "червоний"
out: "red"
- in: "помаранчевий"
out: "orange"
- in: "жовтий"
out: "yellow"
- in: "зелений"
out: "green"
- in: "синій"
out: "blue"
- in: "рожевий"
out: "purple"
- in: "коричневий"
out: "brown"
brightness:
range:
type: "percentage"
from: 0
to: 100
temperature:
range:
type: "temperature"
from: 0
to: 100
temperature_unit:
values:
- in: "c | цельсію | за цельсієм"
out: "celsius"
- in: "f | фаренгейту | за фаренгейтом"
out: "fahrenheit"
expansion_rules:
name: "{name}"
area: "[в | у | на] {area}"
ввімкни: "((в | у)вімкни | включи)"
вимкни: "(вимкни | виключи )"
зміни: "(зміни | встанови | зроби)"
brightness: "{brightness:brightness_pct} [відсотків]"
skip_words:
- "будь ласка"
5 changes: 5 additions & 0 deletions sentences/uk/climate_HassClimateGetTemperature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: uk
intents:
HassClimateGetTemperature:
data:
- sentences: []
5 changes: 5 additions & 0 deletions sentences/uk/climate_HassClimateSetTemperature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: uk
intents:
HassClimateSetTemperature:
data:
- sentences: []
5 changes: 5 additions & 0 deletions sentences/uk/cover_HassCloseCover.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: uk
intents:
HassCloseCover:
data:
- sentences: []
5 changes: 5 additions & 0 deletions sentences/uk/cover_HassOpenCover.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: uk
intents:
HassOpenCover:
data:
- sentences: []
8 changes: 8 additions & 0 deletions sentences/uk/fan_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: uk
intents:
HassTurnOff:
data:
- sentences: []
slots:
domain: fan
name: all
8 changes: 8 additions & 0 deletions sentences/uk/fan_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: uk
intents:
HassTurnOn:
data:
- sentences: []
slots:
domain: fan
name: all
6 changes: 6 additions & 0 deletions sentences/uk/homeassistant_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: uk
intents:
HassTurnOff:
data:
- sentences:
- "<вимкни> <name>"
6 changes: 6 additions & 0 deletions sentences/uk/homeassistant_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: uk
intents:
HassTurnOn:
data:
- sentences:
- "<ввімкни> <name>"
22 changes: 22 additions & 0 deletions sentences/uk/light_HassLightSet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
language: uk
intents:
HassLightSet:
data:
# brightness
- sentences:
- "<зміни> [яскравість] <name> на <brightness>"
- "<зміни> <name> на <brightness> [яскравості]"
- sentences:
- "<зміни> яскравість [світла] <area> [на] <brightness>"
- "<зміни> світло <area> на <brightness> [яскравості]"
slots:
name: "all"
# color
- sentences:
- "<зміни> колір <name> на {color}"
- "<зміни> <name> [на] {color} [колір]"
- "<зміни> [на] {color} колір <name>"
- sentences:
- <зміни> [колір] світл(а|о) <area> на {color}
slots:
name: "all"
9 changes: 9 additions & 0 deletions sentences/uk/light_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: uk
intents:
HassTurnOff:
data:
- sentences:
- "<вимкни> [все] світло <area>"
- "<вимкни> <area> [все] світло"
slots:
domain: "light"
9 changes: 9 additions & 0 deletions sentences/uk/light_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: uk
intents:
HassTurnOn:
data:
- sentences:
- "<ввімкни> [все] світло <area>"
- "<ввімкни> <area> [все] світло"
slots:
domain: "light"
26 changes: 26 additions & 0 deletions tests/uk/_fixtures.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: uk
areas:
- name: Кухн(я|і)
id: kitchen
- name: Гостинн(а|ій)
id: living_room
- name: Спальн(я|і)
id: bedroom
- name: Гараж[і]
id: garage
entities:
- name: Ламп(а|у|и)
id: light.bedroom_lamp
area: bedroom
- name: Kitchen Switch
id: switch.kitchen
area: kitchen
- name: Ceiling Fan
id: fan.ceiling
area: living_room
- name: Настільн(а|у) ламп(а|у)
id: light.table_light
area: garage
- name: Кондиціонер
id: climate.ac
area: living_room
6 changes: 6 additions & 0 deletions tests/uk/climate_HassClimateGetTemperature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: uk
tests:
- sentences: []
intent:
name: HassClimateGetTemperature
slots: {}
6 changes: 6 additions & 0 deletions tests/uk/climate_HassClimateSetTemperature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: uk
tests:
- sentences: []
intent:
name: HassClimateSetTemperature
slots: {}
6 changes: 6 additions & 0 deletions tests/uk/cover_HassCloseCover.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: uk
tests:
- sentences: []
intent:
name: HassCloseCover
slots: {}
6 changes: 6 additions & 0 deletions tests/uk/cover_HassOpenCover.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: uk
tests:
- sentences: []
intent:
name: HassOpenCover
slots: {}
6 changes: 6 additions & 0 deletions tests/uk/fan_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: uk
tests:
- sentences: []
intent:
name: HassTurnOff
slots: {}
6 changes: 6 additions & 0 deletions tests/uk/fan_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
language: uk
tests:
- sentences: []
intent:
name: HassTurnOn
slots: {}
9 changes: 9 additions & 0 deletions tests/uk/homeassistant_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: uk
tests:
- sentences:
- "Вимкни кондиціонер"
- "Виключи, будь ласка, кондиціонер"
intent:
name: "HassTurnOff"
slots:
name: "climate.ac"
10 changes: 10 additions & 0 deletions tests/uk/homeassistant_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: uk
tests:
- sentences:
- "Ввімкни, будь ласка, настільну лампу"
- "Включи настільну лампу"
- "Увімкни настільну лампу"
intent:
name: "HassTurnOn"
slots:
name: "light.table_light"
36 changes: 36 additions & 0 deletions tests/uk/light_HassLightSet.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
language: uk
tests:
# brightness
- sentences:
- "зміни яскравість лампи на 50%"
- "встанови лампу на 50 відсотків"
intent:
name: "HassLightSet"
slots:
brightness_pct: 50
name: light.bedroom_lamp
- sentences:
- "зміни яскравість світла в спальні на 50%"
- "зроби яскравість у спальні 50, будь ласка"
- "встанови світло спальні на 50 відсотків яскравості"
intent:
name: "HassLightSet"
slots:
brightness_pct: 50
area: "bedroom"
# color
- sentences:
- "зміни лампу на жовтий колір"
- "зміни на жовтий колір лампи"
intent:
name: "HassLightSet"
slots:
color: "yellow"
name: "light.bedroom_lamp"
- sentences:
- "зміни колір світла в спальні на жовтий"
intent:
name: "HassLightSet"
slots:
color: "yellow"
area: bedroom
11 changes: 11 additions & 0 deletions tests/uk/light_HassTurnOff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: uk
tests:
- sentences:
- "вимкни все світло у кухні"
- "виключи світло в кухні"
- "вимкни на кухні світло"
intent:
name: "HassTurnOff"
slots:
domain: light
area: kitchen
11 changes: 11 additions & 0 deletions tests/uk/light_HassTurnOn.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: uk
tests:
- sentences:
- "ввімкни все світло у кухні"
- "включи світло в кухні"
- "увімкни на кухні світло"
intent:
name: "HassTurnOn"
slots:
domain: light
area: kitchen

0 comments on commit e42e448

Please sign in to comment.