-
Notifications
You must be signed in to change notification settings - Fork 574
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BG] Add HassGetDate and HassGetTime (#2432)
* [BG] Add HassGetDate and HassGetTime * Fixed typo * Change the names of all numbers in HassGetCurrentDate.yaml Change the names of all numbers in the month bigger that 10 with the more proper and widespread variant. * Add more variants in homeassistant_HassGetCurrentDate.yaml Add more variants to ask for the current date. * Fix indentatios homeassistant_HassGetCurrentDate.yaml * Add more tests in homeassistant_HassGetCurrentDate.yaml * Fix the response to match the new date names homeassistant_HassGetCurrentDate.yaml * Add weekday in HassGetCurrentDate response * Improved responses in HassGetCurrentDate and HassGetCurrentTime * Delete responses/bg/HassGetCurrentTime.yaml * Delete sentences/bg/homeassistant_HassGetCurrentTime.yaml * Delete tests/bg/homeassistant_HassGetCurrentTime.yaml --------- Co-authored-by: Hristo Atanasov <gh0s7@rusenci.com>
- Loading branch information
1 parent
d7cb47f
commit ea36d67
Showing
3 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
language: bg | ||
responses: | ||
intents: | ||
HassGetCurrentDate: | ||
default: > | ||
{% set months = { | ||
1: 'Януари', | ||
2: 'Февруари', | ||
3: 'Март', | ||
4: 'Април', | ||
5: 'Май', | ||
6: 'Юни', | ||
7: 'Юли', | ||
8: 'Август', | ||
9: 'Септември', | ||
10: 'Октомври', | ||
11: 'Ноември', | ||
12: 'Декември', | ||
} %} | ||
{% set ordinal = { | ||
1: 'първи', | ||
2: 'втори', | ||
3: 'трети', | ||
4: 'четвърти', | ||
5: 'пети', | ||
6: 'шести', | ||
7: 'седми', | ||
8: 'осми', | ||
9: 'девети', | ||
10: 'десети', | ||
11: 'единадесети', | ||
12: 'дванадесети', | ||
13: 'тринадесети', | ||
14: 'четиринадесети', | ||
15: 'петнадесети', | ||
16: 'шестнадесети', | ||
17: 'седемнадесети', | ||
18: 'осемнадесети', | ||
19: 'деветнадесети', | ||
20: 'двадесети', | ||
21: 'двадесет и първи', | ||
22: 'двадесет и втори', | ||
23: 'двадесет и трети', | ||
24: 'двадесет и четвърти', | ||
25: 'двадесет и пети', | ||
26: 'двадесет и шести', | ||
27: 'двадесет и седми', | ||
28: 'двадесет и осми', | ||
29: 'двадесет и девети', | ||
30: 'тридесети', | ||
31: 'тридесет и първи', | ||
} %} | ||
{% set weekday = [ 'понеделник', 'вторник', 'сряда', 'четвъртък', 'петък', 'събота', 'неделя' ] %} | ||
{{ weekday[slots.date.weekday()] }}, {{ ordinal[slots.date.day] }} {{ months[slots.date.month] }} {{ slots.date.year }}-та |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
language: bg | ||
intents: | ||
HassGetCurrentDate: | ||
data: | ||
- sentences: | ||
- "[кажи ми] [коя е|каква е] [днешната] дата[та]" | ||
- "[кажи ми] (коя|каква) дата (е|сме) [днес]" | ||
- "[кажи ми] датата [днес]" | ||
- "[кажи ми] кой ден сме [днес]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
language: bg | ||
tests: | ||
- sentences: | ||
- "дата" | ||
- "датата" | ||
- "коя е датата" | ||
- "кажи ми датата" | ||
- "коя е днешната дата" | ||
- "коя дата е днес" | ||
- "коя дата сме" | ||
- "кажи ми коя дата е днес" | ||
- "кажи ми коя дата сме" | ||
- "коя дата сме днес" | ||
- "кой ден сме днес" | ||
- "каква е датата" | ||
- "кажи ми днешната дата" | ||
intent: | ||
name: HassGetCurrentDate | ||
response: "вторник, седемнадесети Септември 2013-та" |