From 9c2834fbed4d96881195ae5bf9f31d5d0d8034aa Mon Sep 17 00:00:00 2001 From: Stefan Vukovic Date: Mon, 26 Aug 2024 20:50:15 +0200 Subject: [PATCH 1/2] remove regex for iso 639 code in dictionary index --- ext/data/schemas/dictionary-index-schema.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ext/data/schemas/dictionary-index-schema.json b/ext/data/schemas/dictionary-index-schema.json index ecf2825ecc..0a16a1ac2b 100644 --- a/ext/data/schemas/dictionary-index-schema.json +++ b/ext/data/schemas/dictionary-index-schema.json @@ -4,8 +4,7 @@ "definitions": { "isoLanguageCode": { "type": "string", - "description": "ISO language code (ISO 639-1 where possible, ISO 639-3 otherwise).", - "pattern": "^(aa|ab|ae|af|afb|ak|am|an|ar|as|av|ay|az|az|ba|be|bg|bh|bi|bm|bn|bo|br|bs|ca|ce|ch|co|cr|cs|cu|cv|cy|da|de|dv|dz|ee|el|en|eo|es|et|eu|fa|ff|fi|fj|fo|fr|fy|ga|gd|gl|gn|grc|gu|gv|ha|he|hi|ho|hr|ht|hu|hy|hz|ia|id|ie|ig|ii|ik|io|is|it|iu|ja|jv|ka|kg|ki|kj|kk|kl|km|kn|ko|kr|ks|ku|kv|kw|ky|la|lb|lg|li|ln|lo|lt|lu|lv|mg|mh|mi|mk|ml|mn|mr|ms|mt|my|na|nb|nd|ne|ng|nl|nn|no|nr|nv|ny|oc|oj|om|or|os|pa|pi|pl|ps|pt|qu|rm|rn|ro|ru|rw|sa|sc|sd|se|sg|sga|sh|si|sk|sl|sm|sn|so|sq|sr|ss|st|su|sv|sw|ta|te|tg|th|ti|tk|tl|tn|to|tr|ts|tt|tw|ty|ug|uk|ur|uz|ve|vi|vo|wa|wo|xh|yi|yo|yue|za|zh|zu)$" + "description": "ISO language code (ISO 639-1 where possible, ISO 639-3 otherwise)." } }, "type": "object", From c7d056e8ce1327a6ff369cb994cb09419704e826 Mon Sep 17 00:00:00 2001 From: Stefan Vukovic Date: Mon, 26 Aug 2024 20:55:05 +0200 Subject: [PATCH 2/2] use looser regex --- ext/data/schemas/dictionary-index-schema.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/data/schemas/dictionary-index-schema.json b/ext/data/schemas/dictionary-index-schema.json index 0a16a1ac2b..ec8b73b20d 100644 --- a/ext/data/schemas/dictionary-index-schema.json +++ b/ext/data/schemas/dictionary-index-schema.json @@ -4,7 +4,8 @@ "definitions": { "isoLanguageCode": { "type": "string", - "description": "ISO language code (ISO 639-1 where possible, ISO 639-3 otherwise)." + "description": "ISO language code (ISO 639-1 where possible, ISO 639-3 otherwise).", + "pattern": "^[a-z]{2,3}$" } }, "type": "object",