Debian Codegraph @

intents/responses/ar/HassTimerStatus.yaml

raw symbols SCIP
1 ---
2 language: ar
3 responses:
4 intents:
5 HassTimerStatus:
6 default: |
7 {% set num_timers = slots.timers | length %}
8 {% set active_timers = slots.timers | selectattr('is_active') | list %}
9 {% set num_active_timers = active_timers | length %}
10 {% set paused_timers = slots.timers | rejectattr('is_active') | list %}
11 {% set num_paused_timers = paused_timers | length %}
12 {% set next_timer = None %}
13
14 {% if num_timers == 0 %}
15 لا يوجد مؤقتات.
16 {% elif num_active_timers == 0 %}
17 {# No active timers #}
18 {% if num_paused_timers == 1 %}
19 {% set next_timer = paused_timers[0] %}
20 المؤقت متوقف مؤقتاً.
21 {% else %}
22 يوجد {{ num_paused_timers }} مؤقتات متوقفة.
23 {% endif %}
24 {% else %}
25 {# At least one active timer #}
26 {% if num_active_timers == 1 %}
27 {% set next_timer = active_timers[0] %}
28 {% else %}
29 {# Get active timer that will finish soonest #}
30 {% set sorted_timers = active_timers | sort(attribute='total_seconds_left') %}
31 {% set next_timer = sorted_timers[0] %}
32 يوجد {{ num_active_timers }} مؤقتات نشطة.
33 {% endif %}
34
35 {% if num_paused_timers == 1 %}
36 و1 مؤقت متوقف.
37 {% elif num_paused_timers > 0 %}
38 و{{ num_paused_timers }} مؤقتات متوقفة.
39 {% endif %}
40 {% endif %}
41
42 {% if next_timer %}
43 {# At least one active timer #}
44 {% set minute_name = 'دقيقة' if next_timer.rounded_minutes_left | int > 10 else 'دقائق' %}
45 {% set second_name = 'ثانية' if next_timer.rounded_seconds_left | int > 10 else 'ثواني' %}
46
47 تبقى
48 {% if (next_timer.rounded_hours_left == 1) and (next_timer.rounded_minutes_left > 0) %}
49 ساعة و{{ next_timer.rounded_minutes_left }} {{minute_name}}
50 {% elif (next_timer.rounded_hours_left == 1) %}
51 ساعة
52 {% elif (next_timer.rounded_hours_left > 1) and (next_timer.rounded_minutes_left > 0) %}
53 {{ next_timer.rounded_hours_left }} ساعات و{{ next_timer.rounded_minutes_left }} {{minute_name}}
54 {% elif (next_timer.rounded_hours_left > 1) %}
55 {{ next_timer.rounded_hours_left }} ساعات
56 {% elif (next_timer.rounded_minutes_left == 1) and (next_timer.rounded_seconds_left > 0) %}
57 دقيقة و{{ next_timer.rounded_seconds_left }} {{second_name}}
58 {% elif (next_timer.rounded_minutes_left == 1) %}
59 دقيقة
60 {% elif (next_timer.rounded_minutes_left > 1) and (next_timer.rounded_seconds_left > 0) %}
61 {{ next_timer.rounded_minutes_left }} {{minute_name}} و{{ next_timer.rounded_seconds_left }} {{second_name}}
62 {% elif (next_timer.rounded_minutes_left > 1) %}
63 {{ next_timer.rounded_minutes_left }} {{minute_name}}
64 {% elif (next_timer.rounded_seconds_left == 1) %}
65 ثانية واحدة
66 {% elif (next_timer.rounded_seconds_left > 1) %}
67 {{ next_timer.rounded_seconds_left }} ثوانٍ
68 {% endif %}
69
70 {% if num_timers > 1 %}
71 {# Give some extra information to disambiguate #}
72 على مؤقت طوله
73 {% if (next_timer.start_hours > 0) and (next_timer.start_minutes > 0) %}
74 {{ next_timer.start_hours }} ساعة و{{ next_timer.start_minutes }} {{minute_name}}
75 {% elif (next_timer.start_hours > 0) %}
76 {{ next_timer.start_hours }} ساعة
77 {% elif (next_timer.start_minutes > 0) and (next_timer.start_seconds > 0) %}
78 {{ next_timer.start_minutes }} {{minute_name}} و{{ next_timer.start_seconds }} {{second_name}}
79 {% elif (next_timer.start_minutes > 0) %}
80 {{ next_timer.start_minutes }} {{minute_name}}
81 {% elif (next_timer.start_seconds > 0) %}
82 {{ next_timer.start_seconds }} {{second_name}}
83 {% endif %}
84
85 {% if next_timer.name %}
86 اسم المؤقت: {{ next_timer.name }}.
87 {% elif next_timer.area %}
88 في {{ next_timer.area }}.
89 {% endif %}
90
91 {% else %}
92 .
93 {% endif %}
94 {% endif %}