mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-24 00:49:45 +02:00
Cody: improved CodyUtils localization
git-svn-id: trunk@30722 -
This commit is contained in:
parent
99624b9b9a
commit
3bb516e672
@ -96,10 +96,21 @@ resourcestring
|
||||
crsCAMWrittenByProperty = '%s, written by property %s';
|
||||
crsBTNOK = '&OK';
|
||||
crsBTNCancel = 'Cancel';
|
||||
|
||||
crsDeclareVariable = 'Declare Variable';
|
||||
crsDeclareVariable2 = 'Declare Variable ...';
|
||||
crsAddCallInherited = 'Add call inherited';
|
||||
|
||||
crsCUSelectFileToInsertAtCursor = 'Select file to insert at cursor';
|
||||
crsCUPascalPasPpPasPp = 'Pascal (*.pas;*.pp)|*.pas;*.pp';
|
||||
crsCUAllFiles = '%s|All files (%s)|%s';
|
||||
crsCUWarning = 'Warning';
|
||||
crsCUTheFileSeemsToBeABinaryProceed = 'The file seems to be a binary. '
|
||||
+'Proceed?';
|
||||
crsCUUnableToLoadFile = 'Unable to load file "%s"%s%s';
|
||||
crsCUPleasePlaceTheCursorOfTheSourceEditorInAnImplement = 'Please place the '
|
||||
+'cursor of the source editor in an implementation of an overridden method.';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
@ -117,23 +117,23 @@ begin
|
||||
Code:=nil;
|
||||
try
|
||||
InitIDEFileDialog(OpenDialog);
|
||||
OpenDialog.Title:='Select file to insert at cursor';
|
||||
OpenDialog.Title:=crsCUSelectFileToInsertAtCursor;
|
||||
OpenDialog.Options:=OpenDialog.Options+[ofFileMustExist];
|
||||
Filter:='Pascal' + ' (*.pas;*.pp)|*.pas;*.pp';
|
||||
Filter:=Filter+'|'+'All files' + ' (' + FileMask + ')|' + FileMask;
|
||||
Filter:=crsCUPascalPasPpPasPp;
|
||||
Filter:=Format(crsCUAllFiles, [Filter, FileMask, FileMask]);
|
||||
OpenDialog.Filter:=Filter;
|
||||
if not OpenDialog.Execute then exit;
|
||||
Filename:=OpenDialog.FileName;
|
||||
if not FileIsText(Filename) then begin
|
||||
if IDEMessageDialog('Warning','The file seems to be a binary. Proceed?',
|
||||
if IDEMessageDialog(crsCUWarning, crsCUTheFileSeemsToBeABinaryProceed,
|
||||
mtConfirmation,[mbOk,mbCancel])<>mrOK then exit;
|
||||
end;
|
||||
Code:=TCodeBuffer.Create;
|
||||
Code.Filename:=Filename;
|
||||
Code.OnDecodeLoaded:=@Cody.DecodeLoaded;
|
||||
if not Code.LoadFromFile(Filename) then begin
|
||||
IDEMessageDialog('Error','Unable to load file "'+Filename+'"'#13
|
||||
+Code.LastError,
|
||||
IDEMessageDialog(crsCWError, Format(crsCUUnableToLoadFile, [Filename, #13
|
||||
, Code.LastError]),
|
||||
mtError,[mbCancel]);
|
||||
exit;
|
||||
end;
|
||||
@ -150,7 +150,7 @@ procedure AddCallInherited(Sender: TObject);
|
||||
procedure ErrorNotInMethod;
|
||||
begin
|
||||
IDEMessageDialog(crsCWError,
|
||||
'Please place the cursor of the source editor in an implementation of an overridden method.',
|
||||
crsCUPleasePlaceTheCursorOfTheSourceEditorInAnImplement,
|
||||
mtError,[mbCancel]);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user