LazUtils: translations.pas unit: always remove old instance of renamed item from PO file. Before this commit we had the following erratic behavior in some cases (e.g. in files with only one resourcestring):

Change identifier of some resourcestring from "a" to "b" => PO file contains both "a" and "b" items, but should contain only "b" one.

git-svn-id: trunk@57382 -
This commit is contained in:
maxim 2018-02-26 23:20:12 +00:00
parent 7b1fafdd6a
commit 3ebd7fc7fb

View File

@ -1602,7 +1602,6 @@ begin
Item:=TPOFileItem(FIdentifierLowToItem[lowercase(Identifier)]);
if Item<>nil then begin
// found, update item value
AddToModuleList(Identifier);
if CompareMultilinedStrings(Item.Original, Original)<>0 then begin
FModified := True;
@ -1674,6 +1673,8 @@ var
begin
NewItem := false;
AddToModuleList(Identifier);
FoundItem := TPOFileItem(FOriginalToItem.Data[Original]);
if CurrentItem = nil then