-
-
Notifications
You must be signed in to change notification settings - Fork 162
/
i18n.ts
265 lines (222 loc) · 8.2 KB
/
i18n.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
import chai = require("chai");
import cronstrue from "../src/cronstrue-i18n";
let assert = chai.assert;
describe("i18n", function() {
describe("de", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "de" }), "Jede Minute");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "de" }),
"Alle 5 Minuten, zwischen 15:00 und 15:59, Montag bis Freitag"
);
});
});
describe("es", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "es" }), "Cada minuto");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "es" }),
"Cada 5 minutos, entre las 03:00 PM y las 03:59 PM, de lunes a viernes"
);
});
});
describe("fr", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "fr" }), "Toutes les minutes");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "fr" }),
"Toutes les 5 minutes, de 03:00 PM à 03:59 PM, de lundi à vendredi"
);
});
});
describe("it", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "it" }), "Ogni minuto");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "it" }),
"Ogni 5 minuti, tra le 15:00 e le 15:59, lunedì al venerdì"
);
});
});
describe("nb", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "nb" }), "Hvert minutt");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "nb", use24HourTimeFormat: true }),
"Hvert 5 minutt, mellom 15:00 og 15:59, mandag til og med fredag"
);
});
it("0 5 1/1 * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "nb", use24HourTimeFormat: true }), "Kl.05:00");
});
it("15 11 * 1/1 MON#1", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "nb", use24HourTimeFormat: true }), "Kl.11:15, på første mandag i måneden");
});
it("15 11 * 1/5 MON#1", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "nb", use24HourTimeFormat: true }), "Kl.11:15, på første mandag i måneden, hver 5 måned");
});
it("0 7 * * MON,TUE,THU,FRI,SUN", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "nb", use24HourTimeFormat: true }), "Kl.07:00, på mandag, tirsdag, torsdag, fredag, og søndag");
});
});
describe("sv", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "sv" }), "Varje minut");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "sv" }),
"Var 5 minut, mellan 15:00 och 15:59, måndag till fredag"
);
});
it("0 12 * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "sv" }), "Kl 12:00");
});
it("0 15 10 ? * 6#3", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "sv" }), "Kl 10:15, den tredje lördagen av månaden");
});
it("0 0 15 ? * MON *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "sv" }), "Kl 15:00, varje måndag");
});
});
describe("nl", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "nl" }), "Elke minuut");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "nl" }),
"Elke 5 minuten, tussen 03:00 PM en 03:59 PM, maandag t/m vrijdag"
);
});
});
describe("pl", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "pl" }), "Co minutę");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "pl" }),
"Co 5 minut, od 15:00 do 15:59, od poniedziałek do piątek"
);
});
});
describe("pt_BR", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "pt_BR" }), "A cada minuto");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "pt_BR" }),
"A cada 5 minutos, entre 03:00 PM e 03:59 PM, de segunda-feira a sexta-feira"
);
});
});
describe("ro", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "ro" }), "În fiecare minut");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "ro" }),
"La fiecare 5 minute, între 15:00 și 15:59, de luni până vineri"
);
});
});
describe("ru", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "ru" }), "Каждую минуту");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "ru" }),
"Каждые 5 минут, с 15:00 по 15:59, понедельник по пятница"
);
});
});
describe("tr", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "tr" }), "Her dakika");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "tr" }),
"Her 5 dakikada bir, 15:00 ile 15:59 arasında, Pazartesi ile Cuma arasında"
);
});
});
describe("uk", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "uk" }), "Щохвилини");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "uk" }),
"Кожні 5 хвилин, між 15:00 та 15:59, понеділок по п'ятниця"
);
});
});
describe("zh_CN", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "zh_CN" }), "每分钟");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "zh_CN" }),
"每 5 分钟, 在 下午 03:00 和 下午 03:59 之间, 从星期一至星期五"
);
});
});
describe("zh_TW", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "zh_TW" }), "每分鐘");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "zh_TW" }),
"每 5 分鐘, 在 03:00 PM 和 03:59 PM 之間, 星期一 到 星期五"
);
});
});
describe("he", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "he" }), "כל דקה");
});
it("*/5 15 * * MON-FRI", function() {
assert.equal(
cronstrue.toString(this.test.title, { locale: "he" }),
"כל 5 דקות, 15:00 עד 15:59, יום שני עד יום שישי"
);
});
});
describe("da", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "da" }), "Hvert minut");
});
});
describe("fa", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "fa" }), "هر دقیقه");
});
});
describe("sl", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "sl" }), "Vsako minuto");
});
});
describe("ko", function() {
it("* * * * *", function() {
assert.equal(cronstrue.toString(this.test.title, { locale: "ko" }), "1분마다");
});
});
});