From e5a978eac9b2e5f035f07b97381b9ff6e917e17f Mon Sep 17 00:00:00 2001 From: juha Date: Sun, 15 Jun 2014 11:52:42 +0000 Subject: [PATCH] LCL: Hard-coded quotations in resourcestrings. git-svn-id: trunk@45524 - --- lcl/lazhelphtml.pas | 10 ++++------ lcl/lazhelpintf.pas | 23 ++++++++++------------- lcl/lclstrconsts.pas | 30 ++++++++++++++---------------- 3 files changed, 28 insertions(+), 35 deletions(-) diff --git a/lcl/lazhelphtml.pas b/lcl/lazhelphtml.pas index ea2768974e..c54de6e137 100644 --- a/lcl/lazhelphtml.pas +++ b/lcl/lazhelphtml.pas @@ -190,8 +190,7 @@ begin if (URLType='file') and (not FileExistsUTF8(URLPath)) then begin Result:=shrContextNotFound; - ErrMsg:=Format(hhsHelpTheHelpDatabaseWasUnableToFindFile, ['"', ID, - '"', '"', URLPath, '"']); + ErrMsg:=Format(hhsHelpTheHelpDatabaseWasUnableToFindFile, [ID, URLPath]); exit; end; end; @@ -337,11 +336,11 @@ begin exit; end; if (not FileExistsUTF8(CommandLine)) then begin - ErrMsg:=Format(hhsHelpBrowserNotFound, ['"', CommandLine, '"']); + ErrMsg:=Format(hhsHelpBrowserNotFound, [CommandLine]); exit; end; if (not FileIsExecutable(CommandLine)) then begin - ErrMsg:=Format(hhsHelpBrowserNotExecutable, ['"', CommandLine, '"']); + ErrMsg:=Format(hhsHelpBrowserNotExecutable, [CommandLine]); exit; end; @@ -376,8 +375,7 @@ begin Result:=shrSuccess; except on E: Exception do begin - ErrMsg:=Format(hhsHelpErrorWhileExecuting, ['"', CommandLine, '"', LineEnding, - E.Message]); + ErrMsg:=Format(hhsHelpErrorWhileExecuting, [CommandLine, LineEnding, E.Message]); end; end; end; diff --git a/lcl/lazhelpintf.pas b/lcl/lazhelpintf.pas index bb86be0d5f..dd4f886e54 100644 --- a/lcl/lazhelpintf.pas +++ b/lcl/lazhelpintf.pas @@ -1379,7 +1379,7 @@ begin if HelpDB=nil then begin Result:=false; HelpResult:=shrDatabaseNotFound; - ErrMsg:=Format(rsHelpHelpDatabaseNotFound, ['"', ID, '"']); + ErrMsg:=Format(rsHelpHelpDatabaseNotFound, [ID]); end else begin HelpResult:=shrSuccess; Result:=true; @@ -1491,7 +1491,7 @@ begin Viewers:=HelpViewers.GetViewersSupportingMimeType(MimeType); try if (Viewers=nil) or (Viewers.Count=0) then begin - ErrMsg:=Format(rsHelpThereIsNoViewerForHelpType, ['"', MimeType, '"']); + ErrMsg:=Format(rsHelpThereIsNoViewerForHelpType, [MimeType]); Result:=shrViewerNotFound; end else begin Viewer:=THelpViewer(Viewers[0]); @@ -1528,7 +1528,7 @@ begin Node:=NodeQuery.Node; if Node.Owner=nil then begin Result:=shrDatabaseNotFound; - ErrMsg:=Format(rsHelpHelpNodeHasNoHelpDatabase, ['"', Node.Title, '"']); + ErrMsg:=Format(rsHelpHelpNodeHasNoHelpDatabase, [Node.Title]); exit; end; {$IFDEF VerboseLCLHelp} @@ -1591,11 +1591,10 @@ begin if (Nodes=nil) or (Nodes.Count=0) then begin Result:=shrContextNotFound; if Query.HelpDatabaseID<>'' then - ErrMsg:=Format(rsHelpHelpContextNotFoundInDatabase, [IntToStr( - Query.Context), '"', Query.HelpDatabaseID, '"']) + ErrMsg:=Format(rsHelpHelpContextNotFoundInDatabase, + [IntToStr(Query.Context), Query.HelpDatabaseID]) else - ErrMsg:=Format(rsHelpHelpContextNotFound, - [IntToStr(Query.Context)]); + ErrMsg:=Format(rsHelpHelpContextNotFound, [IntToStr(Query.Context)]); exit; end; @@ -1631,10 +1630,9 @@ begin if (Nodes=nil) or (Nodes.Count=0) then begin Result:=shrContextNotFound; if Query.HelpDatabaseID<>'' then - ErrMsg:=Format(rsHelpHelpKeywordNotFoundInDatabase, ['"',Query.Keyword, - '"', '"', Query.HelpDatabaseID, '"']) + ErrMsg:=Format(rsHelpHelpKeywordNotFoundInDatabase, [Query.Keyword, Query.HelpDatabaseID]) else - ErrMsg:=Format(rsHelpHelpKeywordNotFound, ['"',Query.Keyword,'"']); + ErrMsg:=Format(rsHelpHelpKeywordNotFound, [Query.Keyword]); exit; end; @@ -1670,10 +1668,9 @@ begin if (Nodes=nil) or (Nodes.Count=0) then begin Result:=shrContextNotFound; if Query.HelpDatabaseID<>'' then - ErrMsg:=Format(rsHelpHelpForDirectiveNotFoundInDatabase, ['"',Query.Directive, - '"', '"', Query.HelpDatabaseID, '"']) + ErrMsg:=Format(rsHelpHelpForDirectiveNotFoundInDatabase, [Query.Directive, Query.HelpDatabaseID]) else - ErrMsg:=Format(rsHelpHelpForDirectiveNotFound, ['"',Query.Directive,'"']); + ErrMsg:=Format(rsHelpHelpForDirectiveNotFound, [Query.Directive]); exit; end; diff --git a/lcl/lclstrconsts.pas b/lcl/lclstrconsts.pas index 50181861f4..fc40e56cc0 100644 --- a/lcl/lclstrconsts.pas +++ b/lcl/lclstrconsts.pas @@ -228,7 +228,6 @@ resourceString rsInvalidPropertyValue = 'Invalid property value'; rsPropertyDoesNotExist = 'Property %s does not exist'; rsInvalidStreamFormat = 'Invalid stream format'; - rsErrorReadingProperty = 'Error reading %s%s%s: %s'; rsInvalidFormObjectStream = 'invalid Form object stream'; rsScrollBarOutOfRange = 'ScrollBar property out of range'; rsInvalidDate = 'Invalid Date : %s'; @@ -387,21 +386,20 @@ resourceString rsDocking = 'Docking'; // help - rsHelpHelpNodeHasNoHelpDatabase = 'Help node %s%s%s has no Help Database'; - rsHelpThereIsNoViewerForHelpType = 'There is no viewer for help type %s%s%s'; + rsHelpHelpNodeHasNoHelpDatabase = 'Help node "%s" has no Help Database'; + rsHelpThereIsNoViewerForHelpType = 'There is no viewer for help type "%s"'; rsHelpHelpDatabaseDidNotFoundAViewerForAHelpPageOfType = 'Help Database %s%' +'s%s did not found a viewer for a help page of type %s'; rsHelpAlreadyRegistered = '%s: Already registered'; rsHelpNotRegistered = '%s: Not registered'; - rsHelpHelpDatabaseNotFound = 'Help Database %s%s%s not found'; - rsHelpHelpKeywordNotFoundInDatabase = 'Help keyword %s%s%s not found in ' - +'Database %s%s%s.'; - rsHelpHelpKeywordNotFound = 'Help keyword %s%s%s not found.'; - rsHelpHelpForDirectiveNotFoundInDatabase = 'Help for directive %s%s%s not found in ' - +'Database %s%s%s.'; - rsHelpHelpForDirectiveNotFound = 'Help for directive %s%s%s not found.'; + rsHelpHelpDatabaseNotFound = 'Help Database "%s" not found'; + rsHelpHelpKeywordNotFoundInDatabase = 'Help keyword "%s" not found in Database "%s".'; + rsHelpHelpKeywordNotFound = 'Help keyword "%s" not found.'; + rsHelpHelpForDirectiveNotFoundInDatabase = 'Help for directive "%s" not found in ' + +'Database "%s".'; + rsHelpHelpForDirectiveNotFound = 'Help for directive "%s" not found.'; rsHelpHelpContextNotFoundInDatabase = 'Help context %s not found in ' - +'Database %s%s%s.'; + +'Database "%s".'; rsHelpHelpContextNotFound = 'Help context %s not found.'; rsHelpNoHelpFoundForSource = 'No help found for line %d, column %d of %s.'; rsHelpNoHelpNodesAvailable = 'No help entries available for this topic'; @@ -414,16 +412,16 @@ resourceString rsHelpSelectorError = 'Help Selector Error'; rsUnknownErrorPleaseReportThisBug = 'Unknown Error, please report this bug'; - hhsHelpTheHelpDatabaseWasUnableToFindFile = 'The help database %s%s%s was ' - +'unable to find file %s%s%s.'; + hhsHelpTheHelpDatabaseWasUnableToFindFile = 'The help database "%s" was ' + +'unable to find file "%s".'; hhsHelpTheMacroSInBrowserParamsWillBeReplacedByTheURL = 'The macro %s in ' +'BrowserParams will be replaced by the URL.'; hhsHelpNoHTMLBrowserFoundPleaseDefineOne = 'No HTML ' +'Browser found.%sPlease define one in Tools -> Options -> Help -> Help Options'; hhsHelpNoHTMLBrowserFound = 'Unable to find a HTML browser.'; - hhsHelpBrowserNotFound = 'Browser %s%s%s not found.'; - hhsHelpBrowserNotExecutable = 'Browser %s%s%s not executable.'; - hhsHelpErrorWhileExecuting = 'Error while executing %s%s%s:%s%s'; + hhsHelpBrowserNotFound = 'Browser "%s" not found.'; + hhsHelpBrowserNotExecutable = 'Browser "%s" not executable.'; + hhsHelpErrorWhileExecuting = 'Error while executing "%s":%s%s'; // parser SParExpected = 'Wrong token type: %s expected';