Skip to content

Commit 673e835

Browse files
authored
Slovak (sk) locale
1 parent 94b6a8e commit 673e835

File tree

6 files changed

+1032
-2
lines changed

6 files changed

+1032
-2
lines changed

CHANGELOG.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased](https://github.com/orisai/cron-expression-explainer/compare/1.0.0...HEAD)
99

10+
### Added
11+
12+
- `sk` locale
13+
1014
### Fixed
1115

1216
- `cs` locale - prefix in hour:minute format (e.g. `Ve 2:00` instead of `V 02:00`)
1317

14-
### Added
15-
1618
## [1.0.0](https://github.com/orisai/cron-expression-explainer/releases/tag/1.0.0) - 2024-04-22
1719

1820
Initial release

docs/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ Translate expression into any supported locale
7878
```php
7979
$explainer->explain('* * * * *', null, null, 'en'); // At every minute.
8080
$explainer->explain('* * * * *', null, null, 'cs'); // Každou minutu.
81+
$explainer->explain('* * * * *', null, null, 'sk'); // Každú minútu.
8182
$explainer->getSupportedLocales(); // array<string, string> e.g. ['en' => 'english', 'cs' => 'czech', /* ... */]
8283
$explainer->setDefaultLocale('cs');
8384
```
@@ -86,6 +87,7 @@ Currently supported locales are:
8687

8788
- `cs` - czech / čeština
8889
- `en` - english
90+
- `sk` - slovak / slovenčina
8991

9092
In case given locale is not supported, the `UnsupportedLocale` exception is thrown.
9193

src/DefaultCronExpressionExplainer.php

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ public function getSupportedLocales(): array
6363
return [
6464
'cs' => 'czech',
6565
'en' => 'english',
66+
'sk' => 'slovak',
6667
];
6768
}
6869

src/Translator/translations/sk.php

+175
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,175 @@
1+
<?php declare(strict_types = 1);
2+
3+
return [
4+
'listSeparator' => ', ',
5+
'list' => '{values} a {lastValue}',
6+
'step-all-minute' => 'každú {step}. minútu',
7+
'step-all-hour' => 'každú {step}. hodinu',
8+
'step-all-day-of-week' => 'každý {step}. deň v týždni',
9+
'step-all-day-of-month' => 'každý {step}. deň v mesiaci',
10+
'step-all-month' => 'každý {step}. mesiac',
11+
'step-minute' => 'každú {step}. minútu {part}',
12+
'step-hour' => 'každú {step}. hodinu {part}',
13+
'step-day-of-week' => 'každý {step}. deň v týždni {part}',
14+
'step-day-of-month' => 'každý {step}. deň v mesiaci {part}',
15+
'step-month' => 'každý {step}. mesiac {part}',
16+
'range-minute' => 'od {left} do {right}',
17+
'range-minute-named' => 'každú minútu od {left} do {right}',
18+
'range-hour' => 'od {left} do {right}',
19+
'range-hour-named' => 'každú hodinu od {left} do {right}',
20+
'range-day-of-week' => 'od {left} do {right}',
21+
'range-day-of-week-named' => 'každý deň v týždni od {left} do {right}',
22+
'range-day-of-month' => 'od {left} do {right}',
23+
'range-day-of-month-named' => 'každý deň v mesiaci od {left} do {right}',
24+
'range-month' => 'od {left} do {right}',
25+
'range-month-named' => 'každý mesiac od {left} do {right}',
26+
'second' => '{second, plural,
27+
one {každú sekundu}
28+
few {každé # sekundy}
29+
other {každých # sekúnd}
30+
}',
31+
'every-minute' => 'každú minútu',
32+
'before-minute' => '',
33+
'minute' => '{minute}',
34+
'minute-named' => 'v minúte {minute}',
35+
'before-hour' => ' ',
36+
'hour' => '{hour}',
37+
'hour-named' => 'v hodine {hour}',
38+
'between-day-of-month-and-week' => ' a',
39+
'before-day-of-week' => '{dayNumber, select,
40+
4 { vo }
41+
other { v }
42+
}',
43+
'day-of-week' => '{context, select,
44+
step {{dayNumber, select,
45+
1 {pondelka}
46+
2 {utorka}
47+
3 {stredy}
48+
4 {štvrtka}
49+
5 {piatka}
50+
6 {soboty}
51+
7 {nedele}
52+
other {{dayNumber} - unknown}
53+
}}
54+
range {{dayNumber, select,
55+
1 {pondelka}
56+
2 {utorka}
57+
3 {stredy}
58+
4 {štvrtka}
59+
5 {piatka}
60+
6 {soboty}
61+
7 {nedele}
62+
other {{dayNumber} - unknown}
63+
}}
64+
other {{dayNumber, select,
65+
1 {pondelok}
66+
2 {utorok}
67+
3 {stredu}
68+
4 {štvrtok}
69+
5 {piatok}
70+
6 {sobotu}
71+
7 {nedeľu}
72+
other {{dayNumber} - unknown}
73+
}}
74+
}',
75+
'day-of-week-nth' => '{nth}. {day}',
76+
'day-of-week-last' => '{context, select,
77+
range {{dayNumber, select,
78+
1 {posledného pondelka}
79+
2 {posledného utorka}
80+
3 {poslednej stredy}
81+
4 {posledného štvrtka}
82+
5 {posledného piatku}
83+
6 {poslednej soboty}
84+
7 {poslednej nedele}
85+
other {{day} - unknown}
86+
}}
87+
other {{dayNumber, select,
88+
1 {posledný}
89+
2 {posledný}
90+
3 {poslednú}
91+
4 {posledný}
92+
5 {posledný}
93+
6 {poslednú}
94+
7 {poslednú}
95+
other {unknown}
96+
} {day}}
97+
}',
98+
'before-day-of-month' => ' ',
99+
'day-of-month' => '{day}',
100+
'day-of-month-named' => 'dňa v mesiaci {day}',
101+
'day-of-month-last-day' => '{context, select,
102+
range {posledného dňa v mesiaci}
103+
other {posledný deň v mesiaci}
104+
}',
105+
'day-of-month-last-weekday' => '{context, select,
106+
range {posledného pracovného dňa}
107+
other {v posledný pracovný deň}
108+
}',
109+
'day-of-month-nearest-weekday' => 'pracovného dňa najbližšieho k {day}.',
110+
'before-month' => ' v ',
111+
'month' => '{context, select,
112+
step {{month, select,
113+
1 {januára}
114+
2 {februára}
115+
3 {marca}
116+
4 {apríla}
117+
5 {mája}
118+
6 {júna}
119+
7 {júla}
120+
8 {augusta}
121+
9 {septembra}
122+
10 {októbra}
123+
11 {novembra}
124+
12 {decembra}
125+
other {{month} - unknown}
126+
}}
127+
range {{month, select,
128+
1 {januára}
129+
2 {februára}
130+
3 {marca}
131+
4 {apríla}
132+
5 {mája}
133+
6 {júna}
134+
7 {júla}
135+
8 {augusta}
136+
9 {septembra}
137+
10 {októbra}
138+
11 {novembra}
139+
12 {decembra}
140+
other {{month} - unknown}
141+
}}
142+
other {{month, select,
143+
1 {januári}
144+
2 {februári}
145+
3 {marci}
146+
4 {apríli}
147+
5 {máji}
148+
6 {júni}
149+
7 {júli}
150+
8 {auguste}
151+
9 {septembri}
152+
10 {októbri}
153+
11 {novembri}
154+
12 {decembri}
155+
other {{month} - unknown}
156+
}}
157+
}',
158+
'hour+minute' => 'o {hour}:{minute}',
159+
'day-of-month+month' => '{day}. {month, select,
160+
1 {januára}
161+
2 {februára}
162+
3 {marca}
163+
4 {apríla}
164+
5 {mája}
165+
6 {júna}
166+
7 {júla}
167+
8 {augusta}
168+
9 {septembra}
169+
10 {októbra}
170+
11 {novembra}
171+
12 {decembra}
172+
other {{month} - unknown}
173+
}',
174+
'timezone' => 'v časovej zóne {tz}',
175+
];

0 commit comments

Comments
 (0)