Skip to content

Commit

Permalink
feat(other): merc-7834 validate theme variation translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Chu committed Jun 15, 2021
1 parent 2cb4fb3 commit 219dc60
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lib/schemas/privateThemeConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,29 @@
},
"uniqueItems": true,
"minItems": 0
},
"translations": {
"type": "object",
"properties": {
"i18n.description": {
"type": "object",
"properties": {
"default": {
"type": "string",
"minLength": 1
}
},
"patternProperties": {
"[a-z]{2}(-[a-zA-Z0-9]{2,})?$": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"required": ["default"]
}
},
"additionalProperties": false
}
},
"required": ["description"]
Expand Down
23 changes: 23 additions & 0 deletions lib/schemas/themeConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,29 @@
},
"uniqueItems": true,
"minItems": 0
},
"translations": {
"type": "object",
"properties": {
"i18n.description": {
"type": "object",
"properties": {
"default": {
"type": "string",
"minLength": 1
}
},
"patternProperties": {
"[a-z]{2}(-[a-zA-Z0-9]{2,})?$": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false,
"required": ["default"]
}
},
"additionalProperties": false
}
},
"required": [
Expand Down

0 comments on commit 219dc60

Please sign in to comment.