-
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.
[DA] Add support for HassGetCurrentDate and HassGetCurrentTime (#2880)
* Add support for HassGetCurrentDate and HassGetCurrentTime in danish * Normalized common words/phrases
- Loading branch information
Showing
7 changed files
with
92 additions
and
1 deletion.
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,29 @@ | ||
language: da | ||
responses: | ||
intents: | ||
HassGetCurrentDate: | ||
default: > | ||
{% set months = { | ||
1: 'januar', | ||
2: 'februar', | ||
3: 'marts', | ||
4: 'april', | ||
5: 'maj', | ||
6: 'juni', | ||
7: 'juli', | ||
8: 'august', | ||
9: 'september', | ||
10: 'oktober', | ||
11: 'november', | ||
12: 'december', | ||
} %} | ||
{% set weekday = [ | ||
'Mandag', | ||
'Tirsdag', | ||
'Onsdag', | ||
'Torsdag', | ||
'Fredag', | ||
'Lørdag', | ||
'Søndag' | ||
] %} | ||
{{ weekday[slots.date.weekday()] }} den {{ 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,8 @@ | ||
language: da | ||
responses: | ||
intents: | ||
HassGetCurrentTime: | ||
default: > | ||
{% set hour_str = '{0:02d}'.format(slots.time.hour) %} | ||
{% set minute_str = '{0:02d}'.format(slots.time.minute) %} | ||
{{ hour_str }}:{{ minute_str }} |
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
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,7 @@ | ||
language: da | ||
intents: | ||
HassGetCurrentDate: | ||
data: | ||
- sentences: | ||
- "<hvilke> [en] <dato> er det [i dag]" | ||
- "<spørg_om_værdi> <dags_dato>" |
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,7 @@ | ||
language: da | ||
intents: | ||
HassGetCurrentTime: | ||
data: | ||
- sentences: | ||
- "<spørg_om_værdi> <aktuel_tid> [<nu>]" | ||
- "hvad tid er det [<nu>]" |
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,18 @@ | ||
language: da | ||
tests: | ||
- sentences: | ||
- "hvilken dag er det" | ||
- "hvilken dag er det i dag" | ||
- "hvilken dato er det" | ||
- "hvilken dato er det i dag" | ||
- "hvad dag er det" | ||
- "hvad dag er det i dag" | ||
- "hvad dato er det" | ||
- "hvad dato er det i dag" | ||
- "hvad er i dags dato" | ||
- "hvad er dagens dato" | ||
- "giv mig i dags dato" | ||
- "giv mig dagens dato" | ||
intent: | ||
name: HassGetCurrentDate | ||
response: Tirsdag den 17. september 2013 |
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,17 @@ | ||
language: da | ||
tests: | ||
- sentences: | ||
- "hvad er klokken" | ||
- "hvad er klokken nu" | ||
- "hvad er klokken lige nu" | ||
- "hvor meget er klokken" | ||
- "hvor meget er klokken nu" | ||
- "hvor meget er klokken lige nu" | ||
- "hvad tid er det" | ||
- "hvad tid er det nu" | ||
- "hvad tid er det lige nu" | ||
- "giv mig klokken" | ||
- "giv mig tiden lige nu" | ||
intent: | ||
name: HassGetCurrentTime | ||
response: 01:02 |