Converter: improved localization

git-svn-id: trunk@43556 -
This commit is contained in:
maxim 2013-12-16 22:10:52 +00:00
parent da7c2a8f15
commit 48105e1be2

View File

@ -169,9 +169,9 @@ begin
Result:=ConvertDfmToLfm(DfmFilename); Result:=ConvertDfmToLfm(DfmFilename);
if Result=mrOK then begin if Result=mrOK then begin
if fOrigFormat=sofBinary then if fOrigFormat=sofBinary then
s:=Format('File %s is converted to text format.', [DfmFilename]) s:=Format(lisFileSIsConvertedToTextFormat, [DfmFilename])
else else
s:=Format('File %s syntax is correct.', [DfmFilename]); s:=Format(lisFileSHasIncorrectSyntax, [DfmFilename]);
if Assigned(fSettings) then if Assigned(fSettings) then
fSettings.AddLogLine(s) fSettings.AddLogLine(s)
else else
@ -397,7 +397,7 @@ begin
NewIdent:=ObjNode.Name+':'+ObjNode.TypeName; NewIdent:=ObjNode.Name+':'+ObjNode.TypeName;
fCTLink.CodeTool.AddClassInsertion(UpperCase(ObjNode.Name), fCTLink.CodeTool.AddClassInsertion(UpperCase(ObjNode.Name),
NewIdent+';', ObjNode.Name, ncpPublishedVars); NewIdent+';', ObjNode.Name, ncpPublishedVars);
fSettings.AddLogLine(Format('Added missing object "%s" to pascal source.', fSettings.AddLogLine(Format(lisAddedMissingObjectSToPascalSource,
[NewIdent])); [NewIdent]));
end end
else if IsMissingType(CurError) then else if IsMissingType(CurError) then
@ -410,7 +410,7 @@ begin
if NewIdent<>'' then begin if NewIdent<>'' then begin
StartPos:=ObjNode.TypeNamePosition; StartPos:=ObjNode.TypeNamePosition;
EndPos:=StartPos+Length(OldIdent); EndPos:=StartPos+Length(OldIdent);
fSettings.AddLogLine(Format('Replaced type "%s" with "%s".', fSettings.AddLogLine(Format(lisReplacedTypeSWithS,
[OldIdent, NewIdent])); [OldIdent, NewIdent]));
AddReplacement(ChgEntryRepl,StartPos,EndPos,NewIdent); AddReplacement(ChgEntryRepl,StartPos,EndPos,NewIdent);
Result:=mrRetry; Result:=mrRetry;
@ -425,10 +425,10 @@ begin
// Delete the whole property line if no replacement. // Delete the whole property line if no replacement.
if NewIdent='' then begin if NewIdent='' then begin
FindNiceNodeBounds(TheNode,StartPos,EndPos); FindNiceNodeBounds(TheNode,StartPos,EndPos);
fSettings.AddLogLine(Format('Removed property "%s".',[OldIdent])); fSettings.AddLogLine(Format(lisRemovedPropertyS, [OldIdent]));
end end
else else
fSettings.AddLogLine(Format('Replaced property "%s" with "%s".', fSettings.AddLogLine(Format(lisReplacedPropertySWithS,
[OldIdent, NewIdent])); [OldIdent, NewIdent]));
AddReplacement(ChgEntryRepl,StartPos,EndPos,NewIdent); AddReplacement(ChgEntryRepl,StartPos,EndPos,NewIdent);
Result:=mrRetry; Result:=mrRetry;
@ -482,7 +482,7 @@ begin
if NewNum<0 then if NewNum<0 then
NewNum:=0; NewNum:=0;
fLFMBuffer.Replace(TopOffs.StartPos, Len, IntToStr(NewNum)); fLFMBuffer.Replace(TopOffs.StartPos, Len, IntToStr(NewNum));
fSettings.AddLogLine(Format('Changed %s coord of %s from "%d" to "%d" inside %s.', fSettings.AddLogLine(Format(lisChangedSCoordOfSFromDToDInsideS,
[TopOffs.PropName, TopOffs.ChildType, OldNum, NewNum, TopOffs.ParentType])); [TopOffs.PropName, TopOffs.ChildType, OldNum, NewNum, TopOffs.ParentType]));
end; end;
end; end;
@ -499,7 +499,7 @@ begin
Entry:=TAddPropEntry(aNewProps[i]); Entry:=TAddPropEntry(aNewProps[i]);
fLFMBuffer.Replace(Entry.StartPos, Entry.EndPos-Entry.StartPos, fLFMBuffer.Replace(Entry.StartPos, Entry.EndPos-Entry.StartPos,
Entry.NewPrefix+Entry.NewText); Entry.NewPrefix+Entry.NewText);
fSettings.AddLogLine(Format('Added property "%s" for %s.', fSettings.AddLogLine(Format(lisAddedPropertySForS,
[Entry.NewText, Entry.ParentType])); [Entry.NewText, Entry.ParentType]));
end; end;
end; end;