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.
This commit is contained in:
Marc Durdin 2021-03-16 20:07:27 +11:00
parent a01000ba4b
commit de74fddbc2

View file

@ -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;