mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-03 15:49:56 +01:00
LazUtils: Translations unit: introduced TPOFile.InvalidateStatistics method in order to let user to force statistics recalculation if the need arises.
git-svn-id: trunk@57979 -
This commit is contained in:
parent
845c8ef3f8
commit
78acd67a99
@ -165,6 +165,7 @@ type
|
||||
property PoName: String read FPoName;
|
||||
property PoRename: String write FPoName;
|
||||
property Statistics: TTranslationStatistics read GetStatistics;
|
||||
procedure InvalidateStatistics;
|
||||
function FindPoItem(const Identifier: String): TPoFileItem;
|
||||
function OriginalToItem(const Data: String): TPoFileItem;
|
||||
property PoItems[Index: Integer]: TPoFileItem read GetPoItem;
|
||||
@ -730,7 +731,7 @@ begin
|
||||
|
||||
if AllowChangeFuzzyFlag then
|
||||
CleanUp; // Removes previous ID from non-fuzzy entries (not needed for POChecker)
|
||||
FStatisticsUpdated := false;
|
||||
InvalidateStatistics;
|
||||
end;
|
||||
|
||||
destructor TPOFile.Destroy;
|
||||
@ -1656,7 +1657,7 @@ begin
|
||||
UpdateItem(Item.IdentifierLow, Item.Original);
|
||||
end;
|
||||
RemoveTaggedItems(0); // get rid of any item not existing in BasePOFile
|
||||
FStatisticsUpdated := false;
|
||||
InvalidateStatistics;
|
||||
end;
|
||||
|
||||
procedure TPOFile.UntagAll;
|
||||
@ -1688,6 +1689,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TPOFile.InvalidateStatistics;
|
||||
begin
|
||||
FStatisticsUpdated := false;
|
||||
end;
|
||||
|
||||
function TPOFile.FindPoItem(const Identifier: String): TPoFileItem;
|
||||
begin
|
||||
Result := TPOFileItem(FIdentifierLowToItem[lowercase(Identifier)]);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user