mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-31 20:57:41 +00:00
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:
parent
a01000ba4b
commit
de74fddbc2
1 changed files with 8 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue