You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-12 22:07:39 +02:00
improve: allow to require specific locales only
Some projects may use specific languages only, so, there is not need to include unused languages into a project, but CEF4Delphi requires it. Make able to require specific locales only.
This commit is contained in:
@ -80,6 +80,7 @@ type
|
||||
FUserAgent : ustring;
|
||||
FProductVersion : ustring;
|
||||
FLocale : ustring;
|
||||
FLocalesRequired : ustring;
|
||||
FLogFile : ustring;
|
||||
FBrowserSubprocessPath : ustring;
|
||||
FFrameworkDirPath : ustring;
|
||||
@ -269,6 +270,7 @@ type
|
||||
property ReRaiseExceptions : boolean read FReRaiseExceptions write FReRaiseExceptions;
|
||||
property DeviceScaleFactor : single read FDeviceScaleFactor;
|
||||
property CheckDevToolsResources : boolean read FCheckDevToolsResources write FCheckDevToolsResources;
|
||||
property LocalesRequired : ustring read FLocalesRequired write FLocalesRequired;
|
||||
end;
|
||||
|
||||
TCefAppOwn = class(TCefBaseRefCountedOwn, ICefApp)
|
||||
@ -372,6 +374,7 @@ begin
|
||||
FSetCurrentDir := False;
|
||||
FUpdateChromeVer := aUpdateChromeVer;
|
||||
FCheckDevToolsResources := True;
|
||||
FLocalesRequired := '';
|
||||
|
||||
UpdateDeviceScaleFactor;
|
||||
|
||||
@ -569,7 +572,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
if not(CheckLocales(FLocalesDirPath)) then
|
||||
if not(CheckLocales(FLocalesDirPath, FLocalesRequired)) then
|
||||
begin
|
||||
TempString := 'CEF locale files missing !' + CRLF + CRLF;
|
||||
|
||||
|
Reference in New Issue
Block a user