From a2742e90b33aea4761cff2fcfb2d975cbf50e1a5 Mon Sep 17 00:00:00 2001 From: juha Date: Sun, 15 Jun 2014 11:52:37 +0000 Subject: [PATCH] IdeIntf: Hard-coded quotations in resourcestrings. git-svn-id: trunk@45523 - --- components/ideintf/collectionpropeditform.pas | 2 +- components/ideintf/componenttreeview.pas | 6 ++--- components/ideintf/graphicpropedit.pas | 2 +- components/ideintf/objinspstrconsts.pas | 22 +++++++++---------- components/ideintf/propedits.pp | 13 +++++------ .../design/synpropertyeditobjectlist.pas | 2 +- 6 files changed, 22 insertions(+), 25 deletions(-) diff --git a/components/ideintf/collectionpropeditform.pas b/components/ideintf/collectionpropeditform.pas index 0cc3d24680..551080cf73 100644 --- a/components/ideintf/collectionpropeditform.pas +++ b/components/ideintf/collectionpropeditform.pas @@ -126,7 +126,7 @@ begin if (I >= 0) and (I < Collection.Count) then begin if MessageDlg(oisConfirmDelete, - Format(oisDeleteItem, ['"', Collection.Items[I].DisplayName, '"']), + Format(oisDeleteItem, [Collection.Items[I].DisplayName]), mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin // select other item, or unselect diff --git a/components/ideintf/componenttreeview.pas b/components/ideintf/componenttreeview.pas index 9967d8851b..ef2075e590 100644 --- a/components/ideintf/componenttreeview.pas +++ b/components/ideintf/componenttreeview.pas @@ -348,9 +348,9 @@ begin except on E: Exception do MessageDlg(oisError, - Format(oisUnableToChangeParentOfControlToNewParent, ['"', - DbgSName(AControl), '"', '"', DbgSName(AContainer), '"', LineEnding, - E.Message]), mtError, [mbOk], 0); + Format(oisUnableToChangeParentOfControlToNewParent, + [DbgSName(AControl), DbgSName(AContainer), LineEnding, E.Message]), + mtError, [mbOk], 0); end; if not ok then break; end; diff --git a/components/ideintf/graphicpropedit.pas b/components/ideintf/graphicpropedit.pas index c64804853a..6ff48d65ac 100644 --- a/components/ideintf/graphicpropedit.pas +++ b/components/ideintf/graphicpropedit.pas @@ -130,7 +130,7 @@ begin except on E: Exception do begin MessageDlg(oisErrorLoadingImage, - Format(oisErrorLoadingImage2, ['"', FileName, '"', LineEnding, E.Message]), + Format(oisErrorLoadingImage2, [FileName, LineEnding, E.Message]), mtError, [mbOk], 0); exit; end; diff --git a/components/ideintf/objinspstrconsts.pas b/components/ideintf/objinspstrconsts.pas index c280f60d17..a30dbb5121 100644 --- a/components/ideintf/objinspstrconsts.pas +++ b/components/ideintf/objinspstrconsts.pas @@ -28,7 +28,7 @@ resourcestring oisSelectAll = '&Select all'; oisUnselectAll = '&Unselect all'; oisConfirmDelete = 'Confirm delete'; - oisDeleteItem = 'Delete item %s%s%s?'; + oisDeleteItem = 'Delete item "%s"?'; oisUnknown = 'Unknown'; oisObject = 'Object'; oisClass = 'Class'; @@ -349,8 +349,7 @@ resourcestring oisNone = '(none)'; oisSelectShortCut = 'Select short cut'; srGrabKey = 'Grab key'; - oisComponentNameIsNotAValidIdentifier = 'Component name %s%s%s is not a ' - +'valid identifier'; + oisComponentNameIsNotAValidIdentifier = 'Component name "%s" is not a valid identifier'; oisLoadImageDialog = 'Load Image Dialog'; oisOK = '&OK'; oisCancel = 'Cancel'; @@ -365,7 +364,7 @@ resourcestring oisPEOpenImageFile = 'Open image file'; oisPESaveImageAs = 'Save image as'; oisErrorLoadingImage = 'Error loading image'; - oisErrorLoadingImage2 = 'Error loading image %s%s%s:%s%s'; + oisErrorLoadingImage2 = 'Error loading image "%s":%s%s'; oisOk2 = 'Ok'; oisCreateANewPascalUnit = 'Create a new pascal unit.'; rscdColumnEditor = 'Column Editor'; @@ -389,15 +388,14 @@ resourcestring fesFlTitle = 'FieldDefs'; fesNoFieldsNote = 'Field''s list is not available, can''t check for duplicates'; oisIncompatibleIdentifier = 'Incompatible Identifier'; - oisIsNotAValidMethodName = '%s%s%s is not a valid method name.'; - oisTheIdentifierIsNotAMethodPressCancelToUndoPressIgn = 'The identifier %s%' - +'s%s is not a method.%sPress Cancel to undo,%spress Ignore to force it.'; + oisIsNotAValidMethodName = '"%s" is not a valid method name.'; + oisTheIdentifierIsNotAMethodPressCancelToUndoPressIgn = 'The identifier "%s" ' + +'is not a method.%sPress Cancel to undo,%spress Ignore to force it.'; oisIncompatibleMethod = 'Incompatible Method'; - oisTheMethodIsNotPublishedPressCancelToUndoPressIgnor = 'The method %s%s%s ' + oisTheMethodIsNotPublishedPressCancelToUndoPressIgnor = 'The method "%s" ' +'is not published.%sPress Cancel to undo,%spress Ignore to force it.'; - oisTheMethodIsIncompatibleToThisEventPressCancelToUnd = 'The method %s%s%s ' - +'is incompatible to this event (%s).%sPress Cancel to undo,%spress ' - +'Ignore to force it.'; + oisTheMethodIsIncompatibleToThisEventPressCancelToUnd = 'The method "%s" ' + +'is incompatible to this event (%s).%sPress Cancel to undo,%spress Ignore to force it.'; peFilterEditor = 'Filter editor'; peFilterName = 'Filter name'; peFilter = 'Filter'; @@ -427,7 +425,7 @@ resourcestring oisSelectAllHint = 'Select All Fields'; oisUnselectAllHint = 'Unselect All'; oisUnableToChangeParentOfControlToNewParent = 'Unable to change parent of ' - +'control %s%s%s to new parent %s%s%s.%s%s'; + +'control "%s" to new parent "%s".%s%s'; oisAddCollectionItem = '&Add Item'; lisUnableToFindParserForTool = 'unable to find parser for tool "%s"'; diff --git a/components/ideintf/propedits.pp b/components/ideintf/propedits.pp index 44aaea5322..2637559e6c 100644 --- a/components/ideintf/propedits.pp +++ b/components/ideintf/propedits.pp @@ -4193,8 +4193,8 @@ begin if (not IsNil) and (not IsValidIdent(NewValue)) then begin MessageDlg(oisIncompatibleIdentifier, - Format(oisIsNotAValidMethodName,['"',NewValue,'"']), mtError, - [mbCancel, mbIgnore], 0); + Format(oisIsNotAValidMethodName,[NewValue]), + mtError, [mbCancel, mbIgnore], 0); exit; end; @@ -4208,7 +4208,7 @@ begin begin if MessageDlg(oisIncompatibleIdentifier, Format(oisTheIdentifierIsNotAMethodPressCancelToUndoPressIgn, - ['"', NewValue, '"', LineEnding, LineEnding]), + [NewValue, LineEnding, LineEnding]), mtWarning, [mbCancel, mbIgnore], 0)<>mrIgnore then exit; @@ -4217,7 +4217,7 @@ begin begin if MessageDlg(oisIncompatibleMethod, Format(oisTheMethodIsNotPublishedPressCancelToUndoPressIgnor, - ['"', NewValue, '"', LineEnding, LineEnding]), + [NewValue, LineEnding, LineEnding]), mtWarning, [mbCancel, mbIgnore], 0)<>mrIgnore then exit; @@ -4226,7 +4226,7 @@ begin begin if MessageDlg(oisIncompatibleMethod, Format(oisTheMethodIsIncompatibleToThisEventPressCancelToUnd, - ['"', NewValue, '"', GetName, LineEnding, LineEnding]), + [NewValue, GetName, LineEnding, LineEnding]), mtWarning, [mbCancel, mbIgnore], 0)<>mrIgnore then exit; @@ -4570,8 +4570,7 @@ end; procedure TComponentNamePropertyEditor.SetValue(const NewValue: ansistring); begin if (not IsValidIdent(NewValue)) or (NewValue='') then - raise Exception.Create(Format(oisComponentNameIsNotAValidIdentifier, ['"', - NewValue, '"'])); + raise Exception.Create(Format(oisComponentNameIsNotAValidIdentifier, [NewValue])); inherited SetValue(NewValue); PropertyHook.ComponentRenamed(TComponent(GetComponent(0))); end; diff --git a/components/synedit/design/synpropertyeditobjectlist.pas b/components/synedit/design/synpropertyeditobjectlist.pas index efe03e8552..88620f79cd 100644 --- a/components/synedit/design/synpropertyeditobjectlist.pas +++ b/components/synedit/design/synpropertyeditobjectlist.pas @@ -303,7 +303,7 @@ begin if (I >= 0) and (I < SynObjectPartList.Count) then begin if MessageDlg(oisConfirmDelete, - Format(oisDeleteItem, ['"', SynObjectPartList.BaseItems[I].DisplayName, '"']), + Format(oisDeleteItem, [SynObjectPartList.BaseItems[I].DisplayName]), mtConfirmation, [mbYes, mbNo], 0) = mrYes then begin // select other item, or unselect