@lingual/i18n-check 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin/index.js +22 -45
- package/dist/bin/index.test.js +570 -451
- package/dist/errorReporters.d.ts +5 -7
- package/dist/errorReporters.js +59 -73
- package/dist/errorReporters.test.d.ts +1 -0
- package/dist/errorReporters.test.js +165 -0
- package/dist/index.d.ts +5 -5
- package/dist/index.js +21 -14
- package/dist/types.d.ts +5 -0
- package/dist/utils/findInvalidTranslations.d.ts +3 -6
- package/dist/utils/findInvalidTranslations.js +3 -3
- package/dist/utils/findInvalidi18nTranslations.d.ts +3 -3
- package/dist/utils/findInvalidi18nTranslations.js +1 -1
- package/dist/utils/findMissingKeys.d.ts +1 -1
- package/dist/utils/findMissingKeys.js +1 -1
- package/dist/utils/flattenTranslations.js +1 -1
- package/dist/utils/nextIntlSrcParser.test.js +50 -50
- package/package.json +1 -1
|
@@ -131,98 +131,98 @@ describe("nextIntlSrcParser", () => {
|
|
|
131
131
|
{
|
|
132
132
|
key: "deepNested.level1.one",
|
|
133
133
|
meta: {
|
|
134
|
-
file:
|
|
134
|
+
file: nestedExampleFile,
|
|
135
135
|
namespace: "deepNested.level1",
|
|
136
136
|
},
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
139
|
key: "deepNested.level2.two",
|
|
140
140
|
meta: {
|
|
141
|
-
file:
|
|
141
|
+
file: nestedExampleFile,
|
|
142
142
|
namespace: "deepNested.level2",
|
|
143
143
|
},
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
key: "deepNested.level3.three",
|
|
147
147
|
meta: {
|
|
148
|
-
file:
|
|
148
|
+
file: nestedExampleFile,
|
|
149
149
|
namespace: "deepNested.level3",
|
|
150
150
|
},
|
|
151
151
|
},
|
|
152
152
|
{
|
|
153
153
|
key: "deepNested.level4.four",
|
|
154
154
|
meta: {
|
|
155
|
-
file:
|
|
155
|
+
file: nestedExampleFile,
|
|
156
156
|
namespace: "deepNested.level4",
|
|
157
157
|
},
|
|
158
158
|
},
|
|
159
159
|
{
|
|
160
160
|
key: "nested.nested.two.nestedTwoKey",
|
|
161
161
|
meta: {
|
|
162
|
-
file:
|
|
162
|
+
file: nestedExampleFile,
|
|
163
163
|
namespace: "nested.nested.two",
|
|
164
164
|
},
|
|
165
165
|
},
|
|
166
166
|
{
|
|
167
167
|
key: "nested.one.nestedKey",
|
|
168
168
|
meta: {
|
|
169
|
-
file:
|
|
169
|
+
file: nestedExampleFile,
|
|
170
170
|
namespace: "nested.one",
|
|
171
171
|
},
|
|
172
172
|
},
|
|
173
173
|
{
|
|
174
174
|
key: "nested.one.regularKey",
|
|
175
175
|
meta: {
|
|
176
|
-
file:
|
|
176
|
+
file: nestedExampleFile,
|
|
177
177
|
namespace: "nested.one",
|
|
178
178
|
},
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
181
|
key: "nested.three.basicKey",
|
|
182
182
|
meta: {
|
|
183
|
-
file:
|
|
183
|
+
file: nestedExampleFile,
|
|
184
184
|
namespace: "nested.three",
|
|
185
185
|
},
|
|
186
186
|
},
|
|
187
187
|
{
|
|
188
188
|
key: "nested.three.hasKeyCheck",
|
|
189
189
|
meta: {
|
|
190
|
-
file:
|
|
190
|
+
file: nestedExampleFile,
|
|
191
191
|
namespace: "nested.three",
|
|
192
192
|
},
|
|
193
193
|
},
|
|
194
194
|
{
|
|
195
195
|
key: "nested.three.htmlKey",
|
|
196
196
|
meta: {
|
|
197
|
-
file:
|
|
197
|
+
file: nestedExampleFile,
|
|
198
198
|
namespace: "nested.three",
|
|
199
199
|
},
|
|
200
200
|
},
|
|
201
201
|
{
|
|
202
202
|
key: "nested.three.markupKey",
|
|
203
203
|
meta: {
|
|
204
|
-
file:
|
|
204
|
+
file: nestedExampleFile,
|
|
205
205
|
namespace: "nested.three",
|
|
206
206
|
},
|
|
207
207
|
},
|
|
208
208
|
{
|
|
209
209
|
key: "nested.three.richTextKey",
|
|
210
210
|
meta: {
|
|
211
|
-
file:
|
|
211
|
+
file: nestedExampleFile,
|
|
212
212
|
namespace: "nested.three",
|
|
213
213
|
},
|
|
214
214
|
},
|
|
215
215
|
{
|
|
216
216
|
key: "nested.two.nestedKey",
|
|
217
217
|
meta: {
|
|
218
|
-
file:
|
|
218
|
+
file: nestedExampleFile,
|
|
219
219
|
namespace: "nested.two",
|
|
220
220
|
},
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
223
|
key: "nested.two.regularKey",
|
|
224
224
|
meta: {
|
|
225
|
-
file:
|
|
225
|
+
file: nestedExampleFile,
|
|
226
226
|
namespace: "nested.two",
|
|
227
227
|
},
|
|
228
228
|
},
|
|
@@ -234,14 +234,14 @@ describe("nextIntlSrcParser", () => {
|
|
|
234
234
|
{
|
|
235
235
|
key: "Async.title",
|
|
236
236
|
meta: {
|
|
237
|
-
file:
|
|
237
|
+
file: asyncExampleFile,
|
|
238
238
|
namespace: "Async",
|
|
239
239
|
},
|
|
240
240
|
},
|
|
241
241
|
{
|
|
242
242
|
key: "async.two.title",
|
|
243
243
|
meta: {
|
|
244
|
-
file:
|
|
244
|
+
file: asyncExampleFile,
|
|
245
245
|
namespace: "async.two",
|
|
246
246
|
},
|
|
247
247
|
},
|
|
@@ -254,7 +254,7 @@ describe("nextIntlSrcParser", () => {
|
|
|
254
254
|
key: "dynamic",
|
|
255
255
|
meta: {
|
|
256
256
|
dynamic: true,
|
|
257
|
-
file:
|
|
257
|
+
file: dynamicKeysExampleFile,
|
|
258
258
|
namespace: "dynamic",
|
|
259
259
|
},
|
|
260
260
|
},
|
|
@@ -262,35 +262,35 @@ describe("nextIntlSrcParser", () => {
|
|
|
262
262
|
key: "dynamic.four",
|
|
263
263
|
meta: {
|
|
264
264
|
dynamic: true,
|
|
265
|
-
file:
|
|
265
|
+
file: dynamicKeysExampleFile,
|
|
266
266
|
namespace: "dynamic.four",
|
|
267
267
|
},
|
|
268
268
|
},
|
|
269
269
|
{
|
|
270
270
|
key: "dynamic.four.nameFour",
|
|
271
271
|
meta: {
|
|
272
|
-
file:
|
|
272
|
+
file: dynamicKeysExampleFile,
|
|
273
273
|
namespace: "dynamic.four",
|
|
274
274
|
},
|
|
275
275
|
},
|
|
276
276
|
{
|
|
277
277
|
key: "dynamic.four.nameOne",
|
|
278
278
|
meta: {
|
|
279
|
-
file:
|
|
279
|
+
file: dynamicKeysExampleFile,
|
|
280
280
|
namespace: "dynamic.four",
|
|
281
281
|
},
|
|
282
282
|
},
|
|
283
283
|
{
|
|
284
284
|
key: "dynamic.four.nameThree",
|
|
285
285
|
meta: {
|
|
286
|
-
file:
|
|
286
|
+
file: dynamicKeysExampleFile,
|
|
287
287
|
namespace: "dynamic.four",
|
|
288
288
|
},
|
|
289
289
|
},
|
|
290
290
|
{
|
|
291
291
|
key: "dynamic.four.nameTwo",
|
|
292
292
|
meta: {
|
|
293
|
-
file:
|
|
293
|
+
file: dynamicKeysExampleFile,
|
|
294
294
|
namespace: "dynamic.four",
|
|
295
295
|
},
|
|
296
296
|
},
|
|
@@ -302,196 +302,196 @@ describe("nextIntlSrcParser", () => {
|
|
|
302
302
|
{
|
|
303
303
|
key: "About.lastUpdated",
|
|
304
304
|
meta: {
|
|
305
|
-
file:
|
|
305
|
+
file: strictTypesExample,
|
|
306
306
|
namespace: "About",
|
|
307
307
|
},
|
|
308
308
|
},
|
|
309
309
|
{
|
|
310
310
|
key: "About.lastUpdated",
|
|
311
311
|
meta: {
|
|
312
|
-
file:
|
|
312
|
+
file: strictTypesExample,
|
|
313
313
|
namespace: "About",
|
|
314
314
|
},
|
|
315
315
|
},
|
|
316
316
|
{
|
|
317
317
|
key: "About.title",
|
|
318
318
|
meta: {
|
|
319
|
-
file:
|
|
319
|
+
file: strictTypesExample,
|
|
320
320
|
namespace: undefined,
|
|
321
321
|
},
|
|
322
322
|
},
|
|
323
323
|
{
|
|
324
324
|
key: "About.title",
|
|
325
325
|
meta: {
|
|
326
|
-
file:
|
|
326
|
+
file: strictTypesExample,
|
|
327
327
|
namespace: "About",
|
|
328
328
|
},
|
|
329
329
|
},
|
|
330
330
|
{
|
|
331
331
|
key: "About.title",
|
|
332
332
|
meta: {
|
|
333
|
-
file:
|
|
333
|
+
file: strictTypesExample,
|
|
334
334
|
namespace: undefined,
|
|
335
335
|
},
|
|
336
336
|
},
|
|
337
337
|
{
|
|
338
338
|
key: "About.title",
|
|
339
339
|
meta: {
|
|
340
|
-
file:
|
|
340
|
+
file: strictTypesExample,
|
|
341
341
|
namespace: "About",
|
|
342
342
|
},
|
|
343
343
|
},
|
|
344
344
|
{
|
|
345
345
|
key: "About.unknown",
|
|
346
346
|
meta: {
|
|
347
|
-
file:
|
|
347
|
+
file: strictTypesExample,
|
|
348
348
|
namespace: "About",
|
|
349
349
|
},
|
|
350
350
|
},
|
|
351
351
|
{
|
|
352
352
|
key: "About.unknown",
|
|
353
353
|
meta: {
|
|
354
|
-
file:
|
|
354
|
+
file: strictTypesExample,
|
|
355
355
|
namespace: "About",
|
|
356
356
|
},
|
|
357
357
|
},
|
|
358
358
|
{
|
|
359
359
|
key: "Navigation.about",
|
|
360
360
|
meta: {
|
|
361
|
-
file:
|
|
361
|
+
file: strictTypesExample,
|
|
362
362
|
namespace: undefined,
|
|
363
363
|
},
|
|
364
364
|
},
|
|
365
365
|
{
|
|
366
366
|
key: "Navigation.about",
|
|
367
367
|
meta: {
|
|
368
|
-
file:
|
|
368
|
+
file: strictTypesExample,
|
|
369
369
|
namespace: "Navigation",
|
|
370
370
|
},
|
|
371
371
|
},
|
|
372
372
|
{
|
|
373
373
|
key: "Navigation.about",
|
|
374
374
|
meta: {
|
|
375
|
-
file:
|
|
375
|
+
file: strictTypesExample,
|
|
376
376
|
namespace: undefined,
|
|
377
377
|
},
|
|
378
378
|
},
|
|
379
379
|
{
|
|
380
380
|
key: "Navigation.about",
|
|
381
381
|
meta: {
|
|
382
|
-
file:
|
|
382
|
+
file: strictTypesExample,
|
|
383
383
|
namespace: "Navigation",
|
|
384
384
|
},
|
|
385
385
|
},
|
|
386
386
|
{
|
|
387
387
|
key: "NotFound.title",
|
|
388
388
|
meta: {
|
|
389
|
-
file:
|
|
389
|
+
file: strictTypesExample,
|
|
390
390
|
namespace: "NotFound",
|
|
391
391
|
},
|
|
392
392
|
},
|
|
393
393
|
{
|
|
394
394
|
key: "NotFound.title",
|
|
395
395
|
meta: {
|
|
396
|
-
file:
|
|
396
|
+
file: strictTypesExample,
|
|
397
397
|
namespace: "NotFound",
|
|
398
398
|
},
|
|
399
399
|
},
|
|
400
400
|
{
|
|
401
401
|
key: "PageLayout.pageTitle",
|
|
402
402
|
meta: {
|
|
403
|
-
file:
|
|
403
|
+
file: strictTypesExample,
|
|
404
404
|
namespace: "PageLayout",
|
|
405
405
|
},
|
|
406
406
|
},
|
|
407
407
|
{
|
|
408
408
|
key: "PageLayout.pageTitle",
|
|
409
409
|
meta: {
|
|
410
|
-
file:
|
|
410
|
+
file: strictTypesExample,
|
|
411
411
|
namespace: "PageLayout",
|
|
412
412
|
},
|
|
413
413
|
},
|
|
414
414
|
{
|
|
415
415
|
key: "StrictTypes.nested.another.level",
|
|
416
416
|
meta: {
|
|
417
|
-
file:
|
|
417
|
+
file: strictTypesExample,
|
|
418
418
|
namespace: "StrictTypes.nested",
|
|
419
419
|
},
|
|
420
420
|
},
|
|
421
421
|
{
|
|
422
422
|
key: "StrictTypes.nested.another.level",
|
|
423
423
|
meta: {
|
|
424
|
-
file:
|
|
424
|
+
file: strictTypesExample,
|
|
425
425
|
namespace: "StrictTypes.nested",
|
|
426
426
|
},
|
|
427
427
|
},
|
|
428
428
|
{
|
|
429
429
|
key: "StrictTypes.nested.hello",
|
|
430
430
|
meta: {
|
|
431
|
-
file:
|
|
431
|
+
file: strictTypesExample,
|
|
432
432
|
namespace: "StrictTypes",
|
|
433
433
|
},
|
|
434
434
|
},
|
|
435
435
|
{
|
|
436
436
|
key: "StrictTypes.nested.hello",
|
|
437
437
|
meta: {
|
|
438
|
-
file:
|
|
438
|
+
file: strictTypesExample,
|
|
439
439
|
namespace: "StrictTypes",
|
|
440
440
|
},
|
|
441
441
|
},
|
|
442
442
|
{
|
|
443
443
|
key: "Test.title",
|
|
444
444
|
meta: {
|
|
445
|
-
file:
|
|
445
|
+
file: strictTypesExample,
|
|
446
446
|
namespace: "Test",
|
|
447
447
|
},
|
|
448
448
|
},
|
|
449
449
|
{
|
|
450
450
|
key: "Test.title",
|
|
451
451
|
meta: {
|
|
452
|
-
file:
|
|
452
|
+
file: strictTypesExample,
|
|
453
453
|
namespace: "Test",
|
|
454
454
|
},
|
|
455
455
|
},
|
|
456
456
|
{
|
|
457
457
|
key: "title",
|
|
458
458
|
meta: {
|
|
459
|
-
file:
|
|
459
|
+
file: strictTypesExample,
|
|
460
460
|
namespace: undefined,
|
|
461
461
|
},
|
|
462
462
|
},
|
|
463
463
|
{
|
|
464
464
|
key: "title",
|
|
465
465
|
meta: {
|
|
466
|
-
file:
|
|
466
|
+
file: strictTypesExample,
|
|
467
467
|
namespace: undefined,
|
|
468
468
|
},
|
|
469
469
|
},
|
|
470
470
|
{
|
|
471
471
|
key: "unknown",
|
|
472
472
|
meta: {
|
|
473
|
-
file:
|
|
473
|
+
file: strictTypesExample,
|
|
474
474
|
namespace: undefined,
|
|
475
475
|
},
|
|
476
476
|
},
|
|
477
477
|
{
|
|
478
478
|
key: "unknown",
|
|
479
479
|
meta: {
|
|
480
|
-
file:
|
|
480
|
+
file: strictTypesExample,
|
|
481
481
|
namespace: undefined,
|
|
482
482
|
},
|
|
483
483
|
},
|
|
484
484
|
{
|
|
485
485
|
key: "unknown.unknown",
|
|
486
486
|
meta: {
|
|
487
|
-
file:
|
|
487
|
+
file: strictTypesExample,
|
|
488
488
|
namespace: "unknown",
|
|
489
489
|
},
|
|
490
490
|
},
|
|
491
491
|
{
|
|
492
492
|
key: "unknown.unknown",
|
|
493
493
|
meta: {
|
|
494
|
-
file:
|
|
494
|
+
file: strictTypesExample,
|
|
495
495
|
namespace: "unknown",
|
|
496
496
|
},
|
|
497
497
|
},
|