Skip to content

Commit dae631a

Browse files
authored
Merge pull request #724 from kchu93/MERC-7834
feat(other): merc-7834 validate theme variation translations
2 parents 2cb4fb3 + 219dc60 commit dae631a

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

lib/schemas/privateThemeConfig.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,29 @@
155155
},
156156
"uniqueItems": true,
157157
"minItems": 0
158+
},
159+
"translations": {
160+
"type": "object",
161+
"properties": {
162+
"i18n.description": {
163+
"type": "object",
164+
"properties": {
165+
"default": {
166+
"type": "string",
167+
"minLength": 1
168+
}
169+
},
170+
"patternProperties": {
171+
"[a-z]{2}(-[a-zA-Z0-9]{2,})?$": {
172+
"type": "string",
173+
"minLength": 1
174+
}
175+
},
176+
"additionalProperties": false,
177+
"required": ["default"]
178+
}
179+
},
180+
"additionalProperties": false
158181
}
159182
},
160183
"required": ["description"]

lib/schemas/themeConfig.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,29 @@
191191
},
192192
"uniqueItems": true,
193193
"minItems": 0
194+
},
195+
"translations": {
196+
"type": "object",
197+
"properties": {
198+
"i18n.description": {
199+
"type": "object",
200+
"properties": {
201+
"default": {
202+
"type": "string",
203+
"minLength": 1
204+
}
205+
},
206+
"patternProperties": {
207+
"[a-z]{2}(-[a-zA-Z0-9]{2,})?$": {
208+
"type": "string",
209+
"minLength": 1
210+
}
211+
},
212+
"additionalProperties": false,
213+
"required": ["default"]
214+
}
215+
},
216+
"additionalProperties": false
194217
}
195218
},
196219
"required": [

0 commit comments

Comments
 (0)