From 5a724a41664e95b7243626566c32338c173d9de8 Mon Sep 17 00:00:00 2001 From: Fritiof Hedman <989352+zyberzero@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:34:00 +0200 Subject: [PATCH 1/2] Add Swedish sentences for getting the current date --- responses/sv/HassGetCurrentDate.yaml | 53 +++++++++++++++++++ .../sv/homeassistant_HassGetCurrentDate.yaml | 6 +++ .../sv/homeassistant_HassGetCurrentDate.yaml | 11 ++++ 3 files changed, 70 insertions(+) create mode 100644 responses/sv/HassGetCurrentDate.yaml create mode 100644 sentences/sv/homeassistant_HassGetCurrentDate.yaml create mode 100644 tests/sv/homeassistant_HassGetCurrentDate.yaml diff --git a/responses/sv/HassGetCurrentDate.yaml b/responses/sv/HassGetCurrentDate.yaml new file mode 100644 index 0000000000..2930abee2f --- /dev/null +++ b/responses/sv/HassGetCurrentDate.yaml @@ -0,0 +1,53 @@ +language: sv +responses: + intents: + HassGetCurrentDate: + default: > + {% set months = { + 1: 'januari', + 2: 'februari', + 3: 'mars', + 4: 'april', + 5: 'maj', + 6: 'juni', + 7: 'juli', + 8: 'augusti', + 9: 'september', + 10: 'oktober', + 11: 'november', + 12: 'december', + } %} + {% set days = { + 1: 'första', + 2: 'andra', + 3: 'tredje', + 4: 'fjärde', + 5: 'femte', + 6: 'sjätte', + 7: 'sjunde', + 8: 'åttonde', + 9: 'nionde', + 10: 'tionde', + 11: 'elfte', + 12: 'tolvte', + 13: 'trettonde', + 14: 'fjortonde', + 15: 'femtonde', + 16: 'sextonde', + 17: 'sjuttonde', + 18: 'artonde', + 19: 'nittonde', + 20: 'tjugonde', + 21: 'tjugoförsta', + 22: 'tjugoandra', + 23: 'tjugotredje', + 24: 'tjugofjärde', + 25: 'tjugofemte', + 26: 'tjugosjätte', + 27: 'tjugosjunde', + 28: 'tjugoåttonde', + 29: 'tjugonionde', + 30: 'trettionde', + 31: 'trettioförsta', + } %} + Det är den {{ days[slots.date.day] }} {{ months[slots.date.month] }} {{ slots.date.year }} diff --git a/sentences/sv/homeassistant_HassGetCurrentDate.yaml b/sentences/sv/homeassistant_HassGetCurrentDate.yaml new file mode 100644 index 0000000000..f51fa328c8 --- /dev/null +++ b/sentences/sv/homeassistant_HassGetCurrentDate.yaml @@ -0,0 +1,6 @@ +language: sv +intents: + HassGetCurrentDate: + data: + - sentences: + - "() (datum|dag) [(idag|i dag)]" diff --git a/tests/sv/homeassistant_HassGetCurrentDate.yaml b/tests/sv/homeassistant_HassGetCurrentDate.yaml new file mode 100644 index 0000000000..eca6a9c4dc --- /dev/null +++ b/tests/sv/homeassistant_HassGetCurrentDate.yaml @@ -0,0 +1,11 @@ +language: sv +tests: + - sentences: + - "Vad är det för datum idag" + - "Vad är det för datum i dag" + - "Vad är det för datum" + - "Vad är det för dag idag" + - "Vad är det för dag" + intent: + name: HassGetCurrentDate + response: Det är den sjuttonde september 2013 From c9728fbf801081383ddb1b21fa89a7a7c2cbd554 Mon Sep 17 00:00:00 2001 From: Fritiof Hedman <989352+zyberzero@users.noreply.github.com> Date: Wed, 24 Jul 2024 10:34:13 +0200 Subject: [PATCH 2/2] Add Swedish sentences for getting the current time --- responses/sv/HassGetCurrentTime.yaml | 6 ++++++ sentences/sv/homeassistant_HassGetCurrentTime.yaml | 6 ++++++ tests/sv/homeassistant_HassGetCurrentTime.yaml | 9 +++++++++ 3 files changed, 21 insertions(+) create mode 100644 responses/sv/HassGetCurrentTime.yaml create mode 100644 sentences/sv/homeassistant_HassGetCurrentTime.yaml create mode 100644 tests/sv/homeassistant_HassGetCurrentTime.yaml diff --git a/responses/sv/HassGetCurrentTime.yaml b/responses/sv/HassGetCurrentTime.yaml new file mode 100644 index 0000000000..7886c9f145 --- /dev/null +++ b/responses/sv/HassGetCurrentTime.yaml @@ -0,0 +1,6 @@ +language: sv +responses: + intents: + HassGetCurrentTime: + default: > + {{ slots.time.hour }}:{{ '{0:02d}'.format(slots.time.minute) }} diff --git a/sentences/sv/homeassistant_HassGetCurrentTime.yaml b/sentences/sv/homeassistant_HassGetCurrentTime.yaml new file mode 100644 index 0000000000..8d1f556821 --- /dev/null +++ b/sentences/sv/homeassistant_HassGetCurrentTime.yaml @@ -0,0 +1,6 @@ +language: sv +intents: + HassGetCurrentTime: + data: + - sentences: + - "(|hur mycket är) klockan [[just] nu]" diff --git a/tests/sv/homeassistant_HassGetCurrentTime.yaml b/tests/sv/homeassistant_HassGetCurrentTime.yaml new file mode 100644 index 0000000000..3084ad6ef4 --- /dev/null +++ b/tests/sv/homeassistant_HassGetCurrentTime.yaml @@ -0,0 +1,9 @@ +language: sv +tests: + - sentences: + - "Hur mycket är klockan" + - "Vad är klockan" + - "Vad är klockan just nu" + intent: + name: HassGetCurrentTime + response: "1:02"