mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 06:59:14 +02:00
IDE: added resourcestrings
git-svn-id: trunk@20301 -
This commit is contained in:
parent
bd573155e3
commit
e776d10bc7
@ -4203,6 +4203,14 @@ resourcestring
|
|||||||
+'target OS=%s and CPU=%s.%sThe system.ppu for this target was not found '
|
+'target OS=%s and CPU=%s.%sThe system.ppu for this target was not found '
|
||||||
+'in the FPC binary directories. %sMake sure fpc is installed correctly '
|
+'in the FPC binary directories. %sMake sure fpc is installed correctly '
|
||||||
+'for this target and the fpc.cfg contains the right directories.';
|
+'for this target and the fpc.cfg contains the right directories.';
|
||||||
|
lisCouldNotRemoveFromMainSource = 'Could not remove %s%s%s from main source!';
|
||||||
|
lisCouldNotAddToMainSource = 'Could not add %s%s%s to main source!';
|
||||||
|
lisCouldNotRemoveRFromMainSource = 'Could not remove %s{$R %s%s} from main '
|
||||||
|
+'source!';
|
||||||
|
lisCouldNotAddRToMainSource = 'Could not add %s{$R %s%s} to main source!';
|
||||||
|
lisCouldNotRemoveIFromMainSource = 'Could not remove %s{$I %s%s} from main '
|
||||||
|
+'source!';
|
||||||
|
lisCouldNotAddIToMainSource = 'Could not add %s{$I %s%s} to main source!';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, Controls, LCLProc, LResources, FileUtil, Laz_XMLCfg,
|
Classes, SysUtils, Controls, LCLProc, LResources, FileUtil, Laz_XMLCfg,
|
||||||
ProjectResourcesIntf,
|
ProjectResourcesIntf, LazarusIDEStrConsts,
|
||||||
W32VersionInfo, W32Manifest, ProjectIcon, IDEProcs, DialogProcs,
|
W32VersionInfo, W32Manifest, ProjectIcon, IDEProcs, DialogProcs,
|
||||||
BasicCodeTools, CodeToolManager, CodeCache, CodeAtom;
|
BasicCodeTools, CodeToolManager, CodeCache, CodeAtom;
|
||||||
|
|
||||||
@ -354,7 +354,8 @@ begin
|
|||||||
if not CodeToolBoss.RemoveUnitFromAllUsesSections(CodeBuf, LazResourcesUnit) then
|
if not CodeToolBoss.RemoveUnitFromAllUsesSections(CodeBuf, LazResourcesUnit) then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
Messages.Add('Could not remove "' + LazResourcesUnit + '" from main source!');
|
Messages.Add(Format(lisCouldNotRemoveFromMainSource, ['"',
|
||||||
|
LazResourcesUnit, '"']));
|
||||||
debugln(['TProjectResources.UpdateMainSourceFile adding LResources to main source failed']);
|
debugln(['TProjectResources.UpdateMainSourceFile adding LResources to main source failed']);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -365,7 +366,8 @@ begin
|
|||||||
if not CodeToolBoss.AddUnitToMainUsesSection(CodeBuf, LazResourcesUnit,'') then
|
if not CodeToolBoss.AddUnitToMainUsesSection(CodeBuf, LazResourcesUnit,'') then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
Messages.Add('Could not add "' + LazResourcesUnit + '" to main source!');
|
Messages.Add(Format(lisCouldNotAddToMainSource, ['"', LazResourcesUnit,
|
||||||
|
'"']));
|
||||||
debugln(['TProjectResources.UpdateMainSourceFile adding LResources to main source failed']);
|
debugln(['TProjectResources.UpdateMainSourceFile adding LResources to main source failed']);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -381,7 +383,8 @@ begin
|
|||||||
if not CodeToolBoss.RemoveDirective(NewCode, NewX, NewY, true) then
|
if not CodeToolBoss.RemoveDirective(NewCode, NewX, NewY, true) then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
Messages.Add('Could not remove "{$R '+ Filename +'"} from main source!');
|
Messages.Add(Format(lisCouldNotRemoveRFromMainSource, ['"', Filename,
|
||||||
|
'"']));
|
||||||
debugln(['TProjectResources.UpdateMainSourceFile failed: removing resource directive']);
|
debugln(['TProjectResources.UpdateMainSourceFile failed: removing resource directive']);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -393,25 +396,27 @@ begin
|
|||||||
Filename, false, '{$IFDEF WINDOWS}{$R '+Filename+'}{$ENDIF}') then
|
Filename, false, '{$IFDEF WINDOWS}{$R '+Filename+'}{$ENDIF}') then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
Messages.Add('Could not add "{$R '+ Filename +'"} to main source!');
|
Messages.Add(Format(lisCouldNotAddRToMainSource, ['"', Filename, '"']));
|
||||||
debugln(['TProjectResources.UpdateMainSourceFile failed: adding resource directive']);
|
debugln(['TProjectResources.UpdateMainSourceFile failed: adding resource directive']);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// update {$I filename} directive
|
// update {$I filename} directive
|
||||||
Filename := ExtractFileName(lrsFileName);
|
Filename := ExtractFileName(lrsFileName);
|
||||||
|
DebugLn(['TProjectResources.UpdateMainSourceFile AAA1 ',CodeBuf.Filename]);
|
||||||
if CodeToolBoss.FindIncludeDirective(CodeBuf, 1, 1,
|
if CodeToolBoss.FindIncludeDirective(CodeBuf, 1, 1,
|
||||||
NewCode, NewX, NewY,
|
NewCode, NewX, NewY,
|
||||||
NewTopLine, Filename, false) then
|
NewTopLine, Filename, false) then
|
||||||
begin
|
begin
|
||||||
// there is a resource directive in the source
|
// there is a resource directive in the source
|
||||||
//debugln(['TProjectResources.UpdateMainSourceFile include directive found']);
|
//debugln(['TProjectResources.UpdateMainSourceFile include directive found: FCanHasLrsInclude=',FCanHasLrsInclude,' HasLazarusResources=',HasLazarusResources]);
|
||||||
if not (FCanHasLrsInclude and HasLazarusResources) then
|
if not (FCanHasLrsInclude and HasLazarusResources) then
|
||||||
begin
|
begin
|
||||||
if not CodeToolBoss.RemoveDirective(NewCode, NewX, NewY, true) then
|
if not CodeToolBoss.RemoveDirective(NewCode, NewX, NewY, true) then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
Messages.Add('Could not remove "{$I '+ Filename +'"} from main source!');
|
Messages.Add(Format(lisCouldNotRemoveIFromMainSource, ['"', Filename,
|
||||||
|
'"']));
|
||||||
debugln(['TProjectResources.UpdateMainSourceFile removing include directive from main source failed']);
|
debugln(['TProjectResources.UpdateMainSourceFile removing include directive from main source failed']);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
@ -420,12 +425,12 @@ begin
|
|||||||
else
|
else
|
||||||
if FCanHasLrsInclude and HasLazarusResources then
|
if FCanHasLrsInclude and HasLazarusResources then
|
||||||
begin
|
begin
|
||||||
//debugln(['TProjectResources.UpdateMainSourceFile include directive not found']);
|
//debugln(['TProjectResources.UpdateMainSourceFile include directive not found: FCanHasLrsInclude=',FCanHasLrsInclude,' HasLazarusResources=',HasLazarusResources]);
|
||||||
if not CodeToolBoss.AddIncludeDirective(CodeBuf,
|
if not CodeToolBoss.AddIncludeDirective(CodeBuf,
|
||||||
Filename,'') then
|
Filename,'') then
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
Messages.Add('Could not add "{$I '+ Filename +'"} to main source!');
|
Messages.Add(Format(lisCouldNotAddIToMainSource, ['"', Filename, '"']));
|
||||||
debugln(['TProjectResources.UpdateMainSourceFile adding include directive to main source failed']);
|
debugln(['TProjectResources.UpdateMainSourceFile adding include directive to main source failed']);
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user