IDE: improved localization

git-svn-id: trunk@45888 -
This commit is contained in:
maxim 2014-07-16 00:43:56 +00:00
parent 641396b472
commit 7d332c02ec
4 changed files with 21 additions and 17 deletions

View File

@ -1880,7 +1880,7 @@ begin
if PPUFiles.Count=1 then
s+=Format(lisPackage3, [TIDEPackage(PPUFiles.Objects[0]).Name])
else begin
s+=', multiple packages: ';
s+=lisMultiplePack;
for i:=0 to PPUFiles.Count-1 do begin
if i>0 then
s+=', ';

View File

@ -712,7 +712,7 @@ begin
if sl[i]='' then continue;
MsgLine:=PendingLines.CreateLine(-1);
MsgLine.Urgency:=mluPanic;
MsgLine.Msg:='internal error: '+sl[i];
MsgLine.Msg:=Format(lisInternalError, [sl[i]]);
PendingLines.Add(MsgLine);
end;
finally

View File

@ -5740,6 +5740,7 @@ resourcestring
lisCanTFindAValidPpu = 'Can''t find a valid %s.ppu';
lisCannotFind = 'Cannot find %s';
lisUsedBy = ' used by %s';
lisMaybePackage = '. Maybe package %s needs a clean rebuild.';
lisCheckSearchPathPackageTryACleanRebuildCheckImpleme = '. Check search path of'
+' package %s, try a clean rebuild, check implementation uses sections.';
lisCheckIfPackageIsInTheDependencies = '. Check if package %s is in the '
@ -5750,11 +5751,14 @@ resourcestring
lisEnableFlagUseUnitOfUnitInPackage = '. Enable flag "Use Unit" of unit %s in package %s';
lisOfTheProjectInspector = ' of the Project Inspector';
lisOfPackage = ' of package %s';
lisFatal2 = '%s(%s,%s) Fatal: %s';
lisCompileWithVdForMoreDetailsCheckForDuplicates = '%s -> Compile with -vd '
+'for more details. Check for duplicates.';
lisCannotFindUnit = 'Cannot find unit %s';
lisIncompatiblePpu = ', incompatible ppu=%s';
lisPackage3 = ', package %s';
lisCannotFindPP = 'Cannot find PPU of unit %s';
lisMultiplePack = ', multiple packages: ';
lisQuickFixError = 'QuickFix error';
lisPositionOutsideOfSource = '%s (position outside of source';
lisHideWithProjectOptionVm = 'Hide with project option (-vm%s)';

View File

@ -572,43 +572,43 @@ begin
if PPUFilename<>'' then begin
// there is a ppu file, but the compiler didn't like it
// => change message
s:='Can not find '+MissingUnitname;
s:=Format(lisCannotFind, [MissingUnitname]);
if UsedByUnit<>'' then
s+=' used by '+UsedByUnit;
s+=', ppu='+CreateRelativePath(PPUFilename,Dir);
s+=Format(lisUsedBy, [UsedByUnit]);
s+=', PPU='+CreateRelativePath(PPUFilename,Dir);
if PkgName<>'' then
s+=', package '+PkgName;
s+=Format(lisPackage3, [PkgName]);
end else if PkgName<>'' then begin
// ppu is missing, but the package is known
// => change message
s:='Can''t find ppu of unit '+MissingUnitname;
s:=Format(lisCannotFindPP, [MissingUnitname]);
if UsedByUnit<>'' then
s+=' used by '+UsedByUnit;
s+='. Maybe package '+PkgName+' needs a clean rebuild.';
s+=Format(lisUsedBy, [UsedByUnit]);
s+=Format(lisMaybePackage, [PkgName]);
end;
end else begin
// there is no ppu file in the unit path
s:='Can not find unit '+MissingUnitname;
s:=Format(lisCannotFindUnit, [MissingUnitname]);
if UsedByUnit<>'' then
s+=' used by '+UsedByUnit;
s+=Format(lisUsedBy, [UsedByUnit]);
if (UsedByOwner is TIDEPackage)
and (CompareTextCT(TIDEPackage(UsedByOwner).Name,PkgName)=0) then
begin
// two units of a package can not find each other
s+='. Check search path package '+TIDEPackage(UsedByOwner).Name+', try a clean rebuild, check implementation uses sections.';
s+=Format(lisCheckSearchPathPackageTryACleanRebuildCheckImpleme, [TIDEPackage(UsedByOwner).Name]);
end else begin
if PkgName<>'' then
s+='. Check if package '+PkgName+' is in the dependencies';
s+=Format(lischeckifpackageisinthedependencies, [PkgName]);
if UsedByOwner is TLazProject then
s+=' of the project inspector'
s+=lisoftheprojectinspector
else if UsedByOwner is TIDEPackage then
s+=' of package '+TIDEPackage(UsedByOwner).Name;
s+=Format(lisOfPackage, [TIDEPackage(UsedByOwner).Name]);
end;
s+='.';
end;
Msg.GetSourcePosition(Filename,Line,Col);
Msg.Msg:=CreateRelativePath(Filename,Msg.Directory)
+'('+IntToStr(Line)+','+IntToStr(Col)+') Fatal: '+s;
Msg.Msg:=Format(lisFatal2, [CreateRelativePath(Filename, Msg.Directory),
IntToStr(Line), IntToStr(Col), s]);
{$IFDEF VerboseQuickFixUnitNotFoundPosition}
debugln(['TQuickFixUnitNotFoundPosition.Execute Msg.Msg="',Msg.Msg,'"']);
{$ENDIF}