Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3444b9c

Browse files
🤔
1 parent cc65b9d commit 3444b9c

File tree

2 files changed

+69
-68
lines changed

2 files changed

+69
-68
lines changed

‎__test__/locale.spec.ts‎

Lines changed: 1 addition & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -7,74 +7,7 @@ import { isValid } from './utils'
77
const locales = readdirSync(resolve(__dirname, '../locales'))
88

99
describe('should include full keys', () => {
10-
const structure: Language = {
11-
"projectName": {
12-
"message": "string",
13-
},
14-
"shouldOverwrite": {
15-
"dirForPrompts": {
16-
"current": "string",
17-
"target": "string"
18-
},
19-
"message": "string"
20-
},
21-
"packageName": {
22-
"message": "string",
23-
"invalidMessage": "string",
24-
},
25-
"needsTypeScript": {
26-
"message": "string",
27-
},
28-
"needsJsx": {
29-
"message": "string",
30-
},
31-
"needsRouter": {
32-
"message": "string",
33-
},
34-
"needsPinia": {
35-
"message": "string",
36-
},
37-
"needsVitest": {
38-
"message": "string",
39-
},
40-
"needsE2eTesting": {
41-
"message": "string",
42-
"hint": "string",
43-
"selectOptions": {
44-
"negative": {
45-
"title": "string",
46-
},
47-
"cypress": {
48-
"title": "string",
49-
"desc": "string",
50-
},
51-
"nightwatch": {
52-
"title": "string",
53-
"desc": "string",
54-
},
55-
"playwright": {
56-
"title": "string",
57-
}
58-
}
59-
},
60-
"needsEslint": {
61-
"message": "string",
62-
},
63-
"needsPrettier": {
64-
"message": "string",
65-
},
66-
"errors": {
67-
"operationCancelled": "string",
68-
},
69-
"defaultToggleOptions": {
70-
"active": "string",
71-
"inactive": "string",
72-
},
73-
"infos": {
74-
"scaffolding": "string",
75-
"done": "string",
76-
}
77-
}
10+
const structure: Language = require('../schema/locale.json')
7811
locales.forEach((locale) => {
7912
it(`for ${locale}`, () => {
8013
expect(isValid(require(`../locales/${locale}`), structure)).toBeTruthy()

‎schema/locale.json‎

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
{
2+
"projectName": {
3+
"message": "string"
4+
},
5+
"shouldOverwrite": {
6+
"dirForPrompts": {
7+
"current": "string",
8+
"target": "string"
9+
},
10+
"message": "string"
11+
},
12+
"packageName": {
13+
"message": "string",
14+
"invalidMessage": "string"
15+
},
16+
"needsTypeScript": {
17+
"message": "string"
18+
},
19+
"needsJsx": {
20+
"message": "string"
21+
},
22+
"needsRouter": {
23+
"message": "string"
24+
},
25+
"needsPinia": {
26+
"message": "string"
27+
},
28+
"needsVitest": {
29+
"message": "string"
30+
},
31+
"needsE2eTesting": {
32+
"message": "string",
33+
"hint": "string",
34+
"selectOptions": {
35+
"negative": {
36+
"title": "string"
37+
},
38+
"cypress": {
39+
"title": "string",
40+
"desc": "string"
41+
},
42+
"nightwatch": {
43+
"title": "string",
44+
"desc": "string"
45+
},
46+
"playwright": {
47+
"title": "string"
48+
}
49+
}
50+
},
51+
"needsEslint": {
52+
"message": "string"
53+
},
54+
"needsPrettier": {
55+
"message": "string"
56+
},
57+
"errors": {
58+
"operationCancelled": "string"
59+
},
60+
"defaultToggleOptions": {
61+
"active": "string",
62+
"inactive": "string"
63+
},
64+
"infos": {
65+
"scaffolding": "string",
66+
"done": "string"
67+
}
68+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /