From 219dc600ff90ef376afcb764d3d3ea2a9d0c8582 Mon Sep 17 00:00:00 2001 From: Kevin Chu Date: Tue, 15 Jun 2021 14:56:38 -0400 Subject: [PATCH] feat(other): merc-7834 validate theme variation translations --- lib/schemas/privateThemeConfig.json | 23 +++++++++++++++++++++++ lib/schemas/themeConfig.json | 23 +++++++++++++++++++++++ 2 files changed, 46 insertions(+) diff --git a/lib/schemas/privateThemeConfig.json b/lib/schemas/privateThemeConfig.json index e7753571..8f42d0bb 100644 --- a/lib/schemas/privateThemeConfig.json +++ b/lib/schemas/privateThemeConfig.json @@ -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"] diff --git a/lib/schemas/themeConfig.json b/lib/schemas/themeConfig.json index a05b915b..301c6399 100644 --- a/lib/schemas/themeConfig.json +++ b/lib/schemas/themeConfig.json @@ -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": [