-
Notifications
You must be signed in to change notification settings - Fork 578
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[PL] - Added new responses, support for time, support for date, bette…
…r support for media, support for timer (#2392)
- Loading branch information
1 parent
64295ee
commit f2f3bdc
Showing
62 changed files
with
1,993 additions
and
145 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,5 @@ | ||
language: pl | ||
responses: | ||
intents: | ||
HassCancelTimer: | ||
default: "Anulowano minutnik" |
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,5 @@ | ||
language: pl | ||
responses: | ||
intents: | ||
HassDecreaseTimer: | ||
default: "Zaktualizowano minutnik" |
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,120 @@ | ||
language: pl | ||
responses: | ||
intents: | ||
HassGetCurrentDate: | ||
# this is not for viewing but for reading | ||
# convert the year to 4 characters, e.g. 99 year -> 0099 to read the year correctly | ||
default: > | ||
{% set year = '{0:04d}'.format(slots.date.year) %} | ||
{% set first_number = year[-4]|int %} | ||
{% set second_number = year[-3]|int %} | ||
{% set third_number = year[-2]|int %} | ||
{% set fourth_number = year[-1]|int %} | ||
{% set last_two_number = year[-2:]|int %} | ||
{% set year_1 = { | ||
0: '', | ||
1: 'tysiąc', | ||
2: 'dwutysięcznego' | ||
} %} | ||
{% set year_2 = { | ||
0: '', | ||
1: 'sto', | ||
2: 'dzieście', | ||
3: 'trzysta', | ||
4: 'czterysta', | ||
5: 'pięćset', | ||
6: 'sześćset', | ||
7: 'siedemset', | ||
8: 'osiemset', | ||
9: 'dziewięćset' | ||
} %} | ||
{% set year_3 = { | ||
0: '', | ||
2: 'dwudziestego', | ||
3: 'trzydziestego', | ||
4: 'czterdziestego', | ||
5: 'pięćdziesiątego', | ||
6: 'sześciesiątego', | ||
7: 'siedemdziesiątego', | ||
8: 'osiemdziesiątego', | ||
9: 'dziewiędziesiątego' | ||
} %} | ||
{% set year_4 = { | ||
0: '', | ||
1: 'pierwszego', | ||
2: 'drugiego', | ||
3: 'trzeciego', | ||
4: 'czwartego', | ||
5: 'piątego', | ||
6: 'szóstego', | ||
7: 'siódmego', | ||
8: 'ósmego', | ||
9: 'dziewiątego', | ||
10: 'dziesiątego', | ||
11: 'jedenastego', | ||
12: 'dwunastego', | ||
13: 'trzynastego', | ||
14: 'czternastego', | ||
15: 'piętnastego', | ||
16: 'szesnastego', | ||
17: 'siedemnastego', | ||
18: 'osiemnastego', | ||
19: 'dziewiętnastego' | ||
} %} | ||
{% set months = { | ||
1: 'stycznia', | ||
2: 'lutego', | ||
3: 'marca', | ||
4: 'kwietni', | ||
5: 'maja', | ||
6: 'czerwca', | ||
7: 'lipca', | ||
8: 'sierpnia', | ||
9: 'września', | ||
10: 'października', | ||
11: 'listopada', | ||
12: 'grudnia', | ||
} %} | ||
{% set weekday = [ | ||
'poniedziałek', | ||
'wtorek', | ||
'środa', | ||
'czwartek', | ||
'piątek', | ||
'sobota', | ||
'niedziela' | ||
] %} | ||
{% set day = { | ||
1: 'pierwszy', | ||
2: 'drugi', | ||
3: 'trzeci', | ||
4: 'czwarty', | ||
5: 'piąty', | ||
6: 'szósty', | ||
7: 'siódmy', | ||
8: 'ósmy', | ||
9: 'dziewiąty', | ||
10: 'dziesiąty', | ||
11: 'jedenastego', | ||
12: 'dwunasty', | ||
13: 'trzynasty', | ||
14: 'czternasty', | ||
15: 'piętnasty', | ||
16: 'szesnasty', | ||
17: 'siedemnasty', | ||
18: 'osiemnasty', | ||
19: 'dziewiętnasty', | ||
20: 'dwudziesty', | ||
21: 'dwudziesty pierwszy', | ||
22: 'dwudziesty drugi', | ||
23: 'dwudziesty trzeci', | ||
24: 'dwudziesty czwarty', | ||
25: 'dwudziesty piąty', | ||
26: 'dwudziesty szósty', | ||
27: 'dwudziesty siódmy', | ||
28: 'dwudziesty ósmy', | ||
29: 'dwudziesty dziewiąty', | ||
30: 'trzydziesty', | ||
31: 'trzydziesty pierwszy', | ||
} %} | ||
Jest {{ weekday[slots.date.weekday()] }}, {{ day[slots.date.day] }} {{ months[slots.date.month] }} {% if first_number > 0 %}{{ year_1[first_number] }} {% endif%}{% if second_number > 0 %}{{ year_2[second_number] }} {% endif%}{% if third_number >= 2 %}{{ year_3[third_number] }} {{ year_4[fourth_number] }} {% else %}{{ year_4[last_two_number] }} {% endif %}roku. |
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,97 @@ | ||
language: pl | ||
responses: | ||
intents: | ||
HassGetCurrentTime: | ||
default: > | ||
{% set hours = { | ||
'00': 'dwudziesta czwarta', | ||
'01': 'pierwsza', | ||
'02': 'druga', | ||
'03': 'trzecia', | ||
'04': 'czwarta', | ||
'05': 'piąta', | ||
'06': 'szósta', | ||
'07': 'siódma', | ||
'08': 'ósma', | ||
'09': 'dziewiąta', | ||
'10': 'dziesiąta', | ||
'11': 'jedenasta', | ||
'12': 'dwunasta', | ||
'13': 'trzynasta', | ||
'14': 'czternasta', | ||
'15': 'piętnasta', | ||
'16': 'szestnasta', | ||
'17': 'siedemnasta', | ||
'18': 'osiemnasta', | ||
'19': 'dziewiętnasta', | ||
'20': 'dwudziesta', | ||
'21': 'dwudziesta pierwsza', | ||
'22': 'dwudziesta druga', | ||
'23': 'dwudziesta trzecia', | ||
'24': 'dwudziesta czwarta' | ||
} %} | ||
{% set minutes = { | ||
'00': 'zero zero', | ||
'01': 'jeden', | ||
'02': 'dwa', | ||
'03': 'trzy', | ||
'04': 'cztery', | ||
'05': 'pięć', | ||
'06': 'sześć', | ||
'07': 'siedem', | ||
'08': 'osiem', | ||
'09': 'dziewięć', | ||
'10': 'dziesięć', | ||
'11': 'jedenaście', | ||
'12': 'dwanaście', | ||
'13': 'trzynaście', | ||
'14': 'czternaście', | ||
'15': 'piętnaście', | ||
'16': 'szesnaście', | ||
'17': 'siedemnaście', | ||
'18': 'osiemnaście', | ||
'19': 'dziewiętnaście', | ||
'20': 'dwadzieścia', | ||
'21': 'dwadzieścia jeden', | ||
'22': 'dwadzieścia dwa', | ||
'23': 'dwadzieścia trzy', | ||
'24': 'dwadzieścia cztery', | ||
'25': 'dwadzieścia pięć', | ||
'26': 'dwadzieścia sześć', | ||
'27': 'dwadzieścia siedem', | ||
'28': 'dwadzieścia osiem', | ||
'29': 'dwadzieścia dziewięć', | ||
'30': 'trzydzieści', | ||
'31': 'trzydzieści jeden', | ||
'32': 'trzydzieści dwa', | ||
'33': 'trzydzieści trzy', | ||
'34': 'trzydzieści cztery', | ||
'35': 'trzydzieści pięć', | ||
'36': 'trzydzieści sześć', | ||
'37': 'trzydzieści siedem', | ||
'38': 'trzydzieści osiem', | ||
'39': 'trzydzieści dziewięć', | ||
'40': 'czterdzieści', | ||
'41': 'czterdzieści jeden', | ||
'42': 'czterdzieści dwa', | ||
'43': 'czterdzieści trzy', | ||
'44': 'czterdzieści cztery', | ||
'45': 'czterdzieści pięć', | ||
'46': 'czterdzieści sześć', | ||
'47': 'czterdzieści siedem', | ||
'48': 'czterdzieści osiem', | ||
'49': 'czterdzieści dziewięć', | ||
'50': 'pięćdziesiąt', | ||
'51': 'pięćdziesiąt jeden', | ||
'52': 'pięćdziesiąt dwa', | ||
'53': 'pięćdziesiąt trzy', | ||
'54': 'pięćdziesiąt cztery', | ||
'55': 'pięćdziesiąt pięć', | ||
'56': 'pięćdziesiąt sześć', | ||
'57': 'pięćdziesiąt siedem', | ||
'58': 'pięćdziesiąt osiem', | ||
'59': 'pięćdziesiąt dziewięć' | ||
} %} | ||
{% set hour_str = '{0:02d}'.format(slots.time.hour) %} | ||
{% set minute_str = '{0:02d}'.format(slots.time.minute) %} | ||
Jest godzina {{ hours[hour_str] }} {{ minutes[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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
language: pl | ||
responses: | ||
intents: | ||
HassIncreaseTimer: | ||
default: "Zaktualizowano minutnik" |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ language: pl | |
responses: | ||
intents: | ||
HassMediaPause: | ||
default: "Wstrzymano" | ||
default: "Wstrzymano odtwarzanie" |
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,5 @@ | ||
language: pl | ||
responses: | ||
intents: | ||
HassMediaPrevious: | ||
default: "Odtwarzanie poprzedniego utworu" |
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 |
---|---|---|
|
@@ -2,4 +2,4 @@ language: pl | |
responses: | ||
intents: | ||
HassMediaUnpause: | ||
default: "Wznowiono" | ||
default: "Wznowiono odtwarzanie" |
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,5 @@ | ||
language: pl | ||
responses: | ||
intents: | ||
HassPauseTimer: | ||
default: "Wstrzymano minutnik" |
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,6 @@ | ||
language: pl | ||
responses: | ||
intents: | ||
HassStartTimer: | ||
default: "Uruchomiono minutnik" | ||
command: "Otrzymano polecenie" |
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,124 @@ | ||
language: pl | ||
responses: | ||
intents: | ||
HassTimerStatus: | ||
default: | | ||
{% set num_timers = slots.timers | length %} | ||
{% set active_timers = slots.timers | selectattr('is_active') | list %} | ||
{% set num_active_timers = active_timers | length %} | ||
{% set paused_timers = slots.timers | rejectattr('is_active') | list %} | ||
{% set num_paused_timers = paused_timers | length %} | ||
{% set next_timer = None %} | ||
{% if num_timers == 0: %} | ||
Brak uruchomionych minutników. | ||
{% elif num_active_timers == 0: %} | ||
{# No active timers #} | ||
{% if num_paused_timers == 1: %} | ||
{% set next_timer = paused_timers[0] %} | ||
Minutnik jest wstrzymany. | ||
{% else: %} | ||
{# 2,3,4 wstrzymane minutniki #} | ||
{# 5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 wstrzymanych minutników #} | ||
{# 22,23,24 wstrzymane minutniki #} | ||
{% if (num_paused_timers|string)[-1] in ["2", "3", "4"]: %} | ||
{{ num_paused_timers }} wstrzymane minutniki. | ||
{% else: %} | ||
{{ num_paused_timers }} wstrzymanych minutników. | ||
{% endif %} | ||
{% endif %} | ||
{% else: %} | ||
{# At least one active timer #} | ||
{% if num_active_timers == 1: %} | ||
{% set next_timer = active_timers[0] %} | ||
{% else: %} | ||
{# Get active timer that will finish soonest #} | ||
{% set sorted_timers = active_timers | sort(attribute='total_seconds_left') %} | ||
{% set next_timer = sorted_timers[0] %} | ||
{# 2,3,4 uruchomione minutniki #} | ||
{# 5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 uruchomionych minutników #} | ||
{# 22,23,24 wstrzymane minutniki #} | ||
{% if (num_active_timers|string)[-1] in ["2", "3", "4"]: %} | ||
{{ num_active_timers }} uruchomione minutniki. | ||
{% else: %} | ||
{{ num_active_timers }} uruchomionych minutników. | ||
{% endif %} | ||
{% endif %} | ||
{% if num_paused_timers == 1: %} | ||
1 wstrzymany minutnik. | ||
{% elif num_paused_timers > 0: %} | ||
{# 2,3,4 wstrzymane minutniki #} | ||
{# 5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 wstrzymanych minutników #} | ||
{# 22,23,24 wstrzymane minutniki #} | ||
{% if (num_paused_timers|string)[-1] in ["2", "3", "4"]: %} | ||
{{ num_paused_timers }} wstrzymane minutniki. | ||
{% else: %} | ||
{{ num_paused_timers }} wstrzymanych minutników. | ||
{% endif %} | ||
{% endif %} | ||
{% endif %} | ||
{% if next_timer: %} | ||
{# At least one active timer #} | ||
{% if (next_timer.rounded_hours_left == 1) and (next_timer.rounded_minutes_left > 0): %} | ||
Pozostała jedna godzina i {{ next_timer.rounded_minutes_left }} {% if next_timer.rounded_minutes_left == 1: %}minuta{% elif (next_timer.rounded_minutes_left|string)[-1] in ["2", "3", "4"]: %}minuty{% else: %}minut{% endif %} | ||
{% elif (next_timer.rounded_hours_left == 1): %} | ||
Pozostała jedna godzina | ||
{% elif (next_timer.rounded_hours_left > 1) and (next_timer.rounded_minutes_left > 0): %} | ||
{# 2,3,4 godziny #} | ||
{# 5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 godzin #} | ||
{# 22,23,24 godziny #}} | ||
{# 1 minuta #} | ||
{# 2,3,4 minuty #} | ||
{# 5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 minut #} | ||
{# 22,23,24 minuty #} | ||
{# 25,26,27,28,29,30,31 minut #} | ||
{# pozostała 1 #} | ||
{# pozostały 2, 3, 4 #} | ||
{# pozostało 5, 6 ... #} | ||
{% if next_timer.rounded_hours_left == 1: %}Pozostała{% elif (next_timer.rounded_hours_left|string)[-1] in ["2", "3", "4"]: %}Pozostały{% else: %}Pozostało{% endif %} | ||
{{ next_timer.rounded_hours_left }} {% if (next_timer.rounded_hours_left|string)[-1] in ["2", "3", "4"]: %}godziny{% else: %}godzin{% endif %} i | ||
{{ next_timer.rounded_minutes_left }} {% if next_timer.rounded_minutes_left == 1: %}minuta{% elif (next_timer.rounded_minutes_left|string)[-1] in ["2", "3", "4"]: %}minuty{% else: %}minut{% endif %} | ||
{% elif (next_timer.rounded_hours_left > 1): %} | ||
{% if next_timer.rounded_hours_left == 1: %}Pozostała{% elif (next_timer.rounded_hours_left|string)[-1] in ["2", "3", "4"]: %}Pozostały{% else: %}Pozostało{% endif %} | ||
{{ next_timer.rounded_hours_left }} {% if (next_timer.rounded_hours_left|string)[-1] in ["2", "3", "4"]: %}godziny{% else: %}godzin{% endif %} | ||
{% elif (next_timer.rounded_minutes_left == 1) and (next_timer.rounded_seconds_left > 0): %} | ||
Pozostała jedna minuta i {{ next_timer.rounded_seconds_left }} {% if next_timer.rounded_seconds_left == 1: %}sekunda{% elif (next_timer.rounded_seconds_left|string)[-1] in ["2", "3", "4"]: %}sekundy{% else: %}sekund{% endif %} | ||
{% elif (next_timer.rounded_minutes_left == 1): %} | ||
Pozostała jedna minuta | ||
{% elif (next_timer.rounded_minutes_left > 1) and (next_timer.rounded_seconds_left > 0): %} | ||
{% if next_timer.rounded_minutes_left == 1: %}Pozostała{% elif (next_timer.rounded_minutes_left|string)[-1] in ["2", "3", "4"]: %}Pozostały{% else: %}Pozostało{% endif %} {{ next_timer.rounded_minutes_left }} {% if (next_timer.rounded_minutes_left|string)[-1] in ["2", "3", "4"]: %}minuty{% else: %}minut{% endif %} i {{ next_timer.rounded_seconds_left }} {% if next_timer.rounded_seconds_left == 1: %}sekunda{% elif (next_timer.rounded_seconds_left|string)[-1] in ["2", "3", "4"]: %}sekundy{% else: %}sekund{% endif %} | ||
{% elif (next_timer.rounded_minutes_left > 1): %} | ||
{% if next_timer.rounded_minutes_left == 1: %}Pozostała{% elif (next_timer.rounded_minutes_left|string)[-1] in ["2", "3", "4"]: %}Pozostały{% else: %}Pozostało{% endif %} {{ next_timer.rounded_minutes_left }} {% if next_timer.rounded_minutes_left == 1: %}minuta{% elif (next_timer.rounded_minutes_left|string)[-1] in ["2", "3", "4"]: %}minuty{% else: %}minut{% endif %} | ||
{% elif (next_timer.rounded_seconds_left == 1): %} | ||
Pozostała jedna sekunda | ||
{% elif (next_timer.rounded_seconds_left > 1): %} | ||
{% if next_timer.rounded_seconds_left == 1: %}Pozostała{% elif (next_timer.rounded_seconds_left|string)[-1] in ["2", "3", "4"]: %}Pozostały{% else: %}Pozostało{% endif %} {{ next_timer.rounded_seconds_left }} {% if (next_timer.rounded_seconds_left|string)[-1] in ["2", "3", "4"]: %}sekundy{% else: %}sekund{% endif %} | ||
{% endif %} | ||
{% if num_timers > 1: %} | ||
{# Give some extra information to disambiguate #} | ||
{% if (next_timer.start_hours > 0) and (next_timer.start_minutes > 0): %} | ||
na {{ next_timer.start_hours }} godzinnym i {{ next_timer.start_minutes }} minutowym minutniku | ||
{% elif (next_timer.start_hours > 0): %} | ||
na {{ next_timer.start_hours }} godzinnym minutniku | ||
{% elif (next_timer.start_minutes > 0) and (next_timer.start_seconds > 0): %} | ||
na {{ next_timer.start_minutes }} minutowym i {{ next_timer.start_seconds }} sekundowym minutniku | ||
{% elif (next_timer.start_minutes > 0): %} | ||
na {{ next_timer.start_minutes }} minutowym minutniku | ||
{% elif (next_timer.start_seconds > 0): %} | ||
na {{ next_timer.start_seconds }} sekundowym minutniku | ||
{% endif %} | ||
{% if next_timer.name: %} | ||
na minutniku {{ next_timer.name }}. | ||
{% elif next_timer.area: %} | ||
w {{ next_timer.area }}. | ||
{% endif %} | ||
{% else: %} | ||
do zakończenia. | ||
{% endif %} | ||
{% endif %} |
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,5 @@ | ||
language: pl | ||
responses: | ||
intents: | ||
HassUnpauseTimer: | ||
default: "Wznowiono minutnik" |
Oops, something went wrong.