Debian Codegraph @

intents/responses/ca/HassGetCurrentTime.yaml

raw
1 language: ca
2 responses:
3 intents:
4 HassGetCurrentTime:
5 default: >
6 {% set next_hour = 0 %}
7 {% set minute_str = "" %}
8 {% set start_str = "Son" %}
9 {% if slots.time.minute > 0: %}
10 {% if slots.time.minute == 15: %}
11 {% set start_str = "És" %}
12 {% set minute_str = "un quart" %}
13 {% set next_hour = 1 %}
14 {% elif slots.time.minute == 30: %}
15 {% set minute_str = "dos quarts" %}
16 {% set next_hour = 1 %}
17 {% elif slots.time.minute == 45: %}
18 {% set minute_str = "tres quarts" %}
19 {% set next_hour = 1 %}
20 {% endif %}
21 {% endif %}
22 {% if slots.time.hour + next_hour > 12: %}
23 {% set hour12 = slots.time.hour + next_hour - 12 %}
24 {% elif slots.time.hour + next_hour == 0: %}
25 {% set hour12 = 12 %}
26 {% else: %}
27 {% set hour12 = slots.time.hour + next_hour %}
28 {% endif %}
29 {% if minute_str != "": %}
30 {{start_str}} {{minute_str}} de {{hour12}}
31 {% elif hour12 == 1 : %}
32 Es la {{hour12}}
33 {% if slots.time.minute > 0: %}
34 i {{slots.time.minute}}
35 {% endif %}
36 {% else: %}
37 Son les {{hour12}}
38 {% if slots.time.minute > 0: %}
39 i {{slots.time.minute}}
40 {% endif %}
41 {% endif %}
42 {% if slots.time.hour == 0: %}
43 de la nit
44 {% elif slots.time.hour < 12: %}
45 del matí
46 {% elif slots.time.hour == 12: %}
47 del migdia
48 {% elif slots.time.hour < 21: %}
49 de la tarda
50 {% else: %}
51 de la nit
52 {% endif %}