added resourcestrings

git-svn-id: trunk@10415 -
This commit is contained in:
mattias 2007-01-10 19:53:13 +00:00
parent eed0dfa968
commit 72a3fffced
2 changed files with 6 additions and 3 deletions

View File

@ -2093,6 +2093,8 @@ resourcestring
lisCodeTemplComment = 'Comment:';
lisCodeTemplATokenAlreadyExists = ' A token %s%s%s already exists! ';
lisCodeTemplError = 'Error';
lisTheResourceClassDescendsFromProbablyThisIsATypoFor = 'The resource '
+'class %s%s%s descends from %s%s%s. Probably this is a typo for TForm.';
// make resource string dialog
lisMakeResourceString = 'Make ResourceString';

View File

@ -4906,8 +4906,9 @@ begin
// (some fpc versions have non designable TDataModule)
AncestorType:=TDataModule;
end else if CompareText(AncestorClassName,'TCustomForm')=0 then begin
MessageDlg('Error','The resource class "'+NewClassName+'" descends from'
+' "'+AncestorClassName+'". Probably this is a typo for TForm.',
MessageDlg(lisCodeTemplError, Format(
lisTheResourceClassDescendsFromProbablyThisIsATypoFor, ['"',
NewClassName, '"', '"', AncestorClassName, '"']),
mtError,[mbCancel],0);
Result:=mrCancel;
end;
@ -6238,7 +6239,7 @@ var
end;
end else if NewUnitInfo.Component<>nil then begin
// this is no pascal source and there is a designer form
// This can be the case, when the file is renamed and reverted
// This can be the case, when the file is renamed and/or reverted
// -> close form
Result:=CloseUnitComponent(NewUnitInfo,
[cfCloseDependencies,cfSaveDependencies]);