Use the new converter files from main.pp. Resource strings update.

git-svn-id: trunk@23742 -
This commit is contained in:
juha 2010-02-19 12:30:51 +00:00
parent 9adbc62b73
commit ad1ee077e3
2 changed files with 27 additions and 15 deletions

View File

@ -422,23 +422,25 @@ resourcestring
lisChooseDelphiUnit = 'Choose Delphi unit (*.pas)';
lisChooseDelphiProject = 'Choose Delphi project (*.dpr)';
lisChooseDelphiPackage = 'Choose Delphi package (*.dpk)';
lisDelphiUnit = 'Delphi unit';
lisDelphiProject = 'Delphi project';
lisDelphiPackage = 'Delphi package';
lisUnableToReadFileError = 'Unable to read file %s%s%s%sError: %s';
lisFormatError = 'Format error';
lisLFMFileCorrupt = 'LFM file corrupt';
lisUnableToFindAValidClassnameIn = 'Unable to find a valid classname in %s%'
+'s%s';
lisUnableToFindAValidClassnameIn = 'Unable to find a valid classname in %s%s%s';
lisUnableToConvertFileError = 'Unable to convert file %s%s%s%sError: %s';
lisUnableToWriteFileError = 'Unable to write file %s%s%s%sError: %s';
lisErrorCreatingLrs = 'Error creating lrs';
lisLFMFileNotFound = 'LFM file not found';
lisTheFollowingUnitsWereNotFound1EitherTheseUnitsAreN = 'The following '
+'units were not found:%s%s%s%s1) Either these units are not in the unit '
+'path, then you can abort now, fix the unit path and try again.%s'
+'2) Or you can ignore the missing units and comment them out.';
lisUnitNotFound = 'Unit not found';
lisUnitsNotFound2 = 'Units not found';
lisUnitLFMFile = 'Unit: %s%sLFM file: %s';
lisMissingUnitsComment = 'Comment Out';
lisMissingUnitsSearch = 'Search Unit Path';
lisTheseUnitsWereNotFound = 'These units were not found:';
lisMissingUnitsChoices = 'Your choices are:';
lisMissingUnitsInfo1 = '1) Comment out the missing units (ignore them).';
lisMissingUnitsInfo2 = '2) Select a unit path which will be added to project settings.';
lisMissingUnitsInfo3 = '3) Abort now, fix the unit path or install packages and try again.';
lisUnitNotFound = 'A unit not found in';
lisUnitsNotFound2 = 'Units not found in';
lisUnableToConvertLfmToLrsAndWriteLrsFile = 'Unable to convert lfm to lrs '
+'and write lrs file.';
lisNotADelphiProject = 'Not a Delphi project';

View File

@ -101,7 +101,7 @@ uses
CodeToolsDefines, DiffDialog, DiskDiffsDialog, UnitInfoDlg, EditorOptions,
SourceEditProcs, MsgQuickFixes, ViewUnit_dlg,
// converter
ChgEncodingDlg, DelphiUnit2Laz, DelphiProject2Laz, LazXMLForms,
ChgEncodingDlg, ConvertDelphi, LazXMLForms,
// rest of the ide
Splash, IDEDefs, LazarusIDEStrConsts, LazConf, MsgView, SearchResultView,
CodeTemplatesDlg, CodeBrowser, FindUnitDlg, IdeOptionsDlg,
@ -3976,6 +3976,7 @@ begin
try
InputHistories.ApplyFileDialogSettings(OpenDialog);
OpenDialog.Title:=lisChooseDelphiUnit;
OpenDialog.Filter:=lisDelphiUnit+' (*.pas)|*.pas|'+dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
OpenDialog.Options:=OpenDialog.Options+[ofAllowMultiSelect];
if InputHistories.LastConvertDelphiUnit<>'' then begin
OpenDialog.InitialDir:=
@ -4050,7 +4051,7 @@ begin
try
InputHistories.ApplyFileDialogSettings(OpenDialog);
OpenDialog.Title:=lisChooseDelphiPackage;
OpenDialog.Filter:=lisDelphiProject+' (*.dpk)|*.dpk|'+dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
OpenDialog.Filter:=lisDelphiPackage+' (*.dpk)|*.dpk|'+dlgAllFiles+' ('+GetAllFilesMask+')|' + GetAllFilesMask;
if InputHistories.LastConvertDelphiPackage<>'' then begin
OpenDialog.InitialDir:=
ExtractFilePath(InputHistories.LastConvertDelphiPackage);
@ -11202,13 +11203,16 @@ function TMainIDE.DoConvertDelphiUnit(const DelphiFilename: string;
CanAbort: boolean): TModalResult;
var
OldChange: Boolean;
Converter: TConvertDelphiUnit;
begin
InputHistories.LastConvertDelphiUnit:=DelphiFilename;
OldChange:=OpenEditorsOnCodeToolChange;
OpenEditorsOnCodeToolChange:=true;
Converter := TConvertDelphiUnit.Create(nil, DelphiFilename, []);
try
Result:=DelphiProject2Laz.ConvertDelphiToLazarusUnit(DelphiFilename,[]);
Result:=Converter.Convert;
finally
Converter.Free;
OpenEditorsOnCodeToolChange:=OldChange;
end;
end;
@ -11217,13 +11221,16 @@ function TMainIDE.DoConvertDelphiProject(const DelphiFilename: string
): TModalResult;
var
OldChange: Boolean;
Converter: TConvertDelphiProject;
begin
InputHistories.LastConvertDelphiProject:=DelphiFilename;
OldChange:=OpenEditorsOnCodeToolChange;
OpenEditorsOnCodeToolChange:=true;
Converter := TConvertDelphiProject.Create(DelphiFilename);
try
Result:=DelphiProject2Laz.ConvertDelphiToLazarusProject(DelphiFilename);
Result:=Converter.Convert;
finally
Converter.Free;
OpenEditorsOnCodeToolChange:=OldChange;
end;
end;
@ -11232,13 +11239,16 @@ function TMainIDE.DoConvertDelphiPackage(const DelphiFilename: string
): TModalResult;
var
OldChange: Boolean;
Converter: TConvertDelphiPackage;
begin
InputHistories.LastConvertDelphiPackage:=DelphiFilename;
OldChange:=OpenEditorsOnCodeToolChange;
OpenEditorsOnCodeToolChange:=true;
Converter := TConvertDelphiPackage.Create(DelphiFilename);
try
Result:=DelphiProject2Laz.ConvertDelphiToLazarusPackage(DelphiFilename);
Result:=Converter.Convert;
finally
Converter.Free;
OpenEditorsOnCodeToolChange:=OldChange;
end;
end;