From 5309d0c3d6b6f9eade9ed3515b7c7562673862f6 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Wed, 28 Jun 2023 22:12:47 +0200 Subject: [PATCH] Validation: enable mustHaveLanguage-check again as error --- Models/ThemeConfig/Conversion/Validation.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Models/ThemeConfig/Conversion/Validation.ts b/Models/ThemeConfig/Conversion/Validation.ts index e5d325642..f386244be 100644 --- a/Models/ThemeConfig/Conversion/Validation.ts +++ b/Models/ThemeConfig/Conversion/Validation.ts @@ -29,7 +29,10 @@ class ValidateLanguageCompleteness extends DesugaringStep { this._languages = languages ?? ["en"] } - convert(obj: any, context: string): { result: LayerConfig; errors: string[] } { + convert( + obj: any, + context: string + ): { result: LayerConfig; errors: string[]; warnings: string[] } { const errors = [] const warnings: string[] = [] const translations = Translation.ExtractAllTranslationsFrom(obj) @@ -41,7 +44,7 @@ class ValidateLanguageCompleteness extends DesugaringStep { t.tr.translations["*"] === undefined ) .forEach((missing) => { - warnings.push( + errors.push( context + "A theme should be translation-complete for " + neededLanguage +