mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-02 17:40:26 +02:00
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:
parent
7b1fafdd6a
commit
3ebd7fc7fb
@ -1602,7 +1602,6 @@ begin
|
|||||||
Item:=TPOFileItem(FIdentifierLowToItem[lowercase(Identifier)]);
|
Item:=TPOFileItem(FIdentifierLowToItem[lowercase(Identifier)]);
|
||||||
if Item<>nil then begin
|
if Item<>nil then begin
|
||||||
// found, update item value
|
// found, update item value
|
||||||
AddToModuleList(Identifier);
|
|
||||||
|
|
||||||
if CompareMultilinedStrings(Item.Original, Original)<>0 then begin
|
if CompareMultilinedStrings(Item.Original, Original)<>0 then begin
|
||||||
FModified := True;
|
FModified := True;
|
||||||
@ -1674,6 +1673,8 @@ var
|
|||||||
begin
|
begin
|
||||||
NewItem := false;
|
NewItem := false;
|
||||||
|
|
||||||
|
AddToModuleList(Identifier);
|
||||||
|
|
||||||
FoundItem := TPOFileItem(FOriginalToItem.Data[Original]);
|
FoundItem := TPOFileItem(FOriginalToItem.Data[Original]);
|
||||||
|
|
||||||
if CurrentItem = nil then
|
if CurrentItem = nil then
|
||||||
|
Loading…
Reference in New Issue
Block a user