From de74fddbc2f9814bcd3edcef6c76cfe37ed7c18d Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Tue, 16 Mar 2021 20:07:27 +1100 Subject: [PATCH] chore(developer): upgrade bcp 47 canonicalisation to warning This does not trigger a build failure; validation warnings currently always pass. Info messages are currently suppressed with -s which also suppresses the banner, which is more plumbing than we should change just now. --- .../developer/TIKE/compile/ValidateKeyboardInfo.pas | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/windows/src/developer/TIKE/compile/ValidateKeyboardInfo.pas b/windows/src/developer/TIKE/compile/ValidateKeyboardInfo.pas index 975751fa39..00c04108bc 100644 --- a/windows/src/developer/TIKE/compile/ValidateKeyboardInfo.pas +++ b/windows/src/developer/TIKE/compile/ValidateKeyboardInfo.pas @@ -16,6 +16,7 @@ type function LoadJsonFile: Boolean; constructor Create(AJsonFile: string; ASilent: Boolean); function Failed(message: string): Boolean; + procedure Warning(message: string); procedure Info(message: string); public class function Execute(JsonFile, JsonSchemaPath: string; FDistribution, FSilent: Boolean; FCallback: TProjectLogObjectEvent): Boolean; @@ -93,7 +94,7 @@ begin Result := Failed(msg); if not TCanonicalLanguageCodeUtils.IsCanonical(Tag, msg, False, False) then - Info(msg); + Warning(msg); finally Free; end; @@ -108,7 +109,7 @@ begin Result := Failed(msg); if not TCanonicalLanguageCodeUtils.IsCanonical(Tag, msg, False, False) then - Info(msg); + Warning(msg); finally Free; end; @@ -144,6 +145,11 @@ begin Result := Assigned(json); end; +procedure TValidateKeyboardInfo.Warning(message: string); +begin + GCallback(plsWarning, FJsonFile, Message, 0, 0); +end; + class function TValidateKeyboardInfo.Execute(JsonFile, JsonSchemaPath: string; FDistribution, FSilent: Boolean; FCallback: TProjectLogObjectEvent): Boolean; var SchemaFile: string;