Cody: improved 'Declare variable' dialog localization

git-svn-id: trunk@30958 -
This commit is contained in:
maxim 2011-05-29 11:11:42 +00:00
parent 1a85464856
commit 60a5ad3a81
2 changed files with 9 additions and 2 deletions

View File

@ -88,6 +88,8 @@ resourcestring
crsAlreadyDefined = 'Already defined';
crsInInterface = 'In interface';
crsInImplementation = 'In implementation';
crsDVIsAKeyword = '"%s" is a keyword.';
crsOnClipboard = 'On clipboard';
crsLocalVariableOf = 'Local variable of %s';
crsAlreadyDefinedAt = 'Already defined at %s';
crsPrivate = 'Private';

View File

@ -166,7 +166,8 @@ begin
NewIdentifier:=GetIdentifier(@Tool.Src[GetIdentStartPosition(Tool.Src,CleanPos)]);
if IsKeyword then begin
Handled:=true;
IDEMessageDialog('Error','"'+NewIdentifier+'" is a keyword.',mtError,[mbCancel]);
IDEMessageDialog(crsCWError, Format(crsDVIsAKeyword, [NewIdentifier]),
mtError, [mbCancel]);
exit;
end;
@ -379,7 +380,7 @@ begin
// add target for clipboard
Target:=TCodyDeclareVarTarget.Create(CleanFindContext);
Target.Caption:='On clipboard';
Target.Caption:=crsOnClipboard;
Targets.Add(Target);
Caption:=Format(crsDeclareVariable3, [Identifier]);
@ -393,6 +394,10 @@ begin
end;
WhereRadioGroup.ItemIndex:=0;
ButtonPanel1.HelpButton.Caption:=crsHelp;
ButtonPanel1.OKButton.Caption:=crsBTNOK;
ButtonPanel1.CancelButton.Caption:=crsBTNCancel;
// show dialog as modal form
Result:=ShowModal=mrOk;