From 14a3c6e5c8639a3d280497e90ba18c4393b2fa3a Mon Sep 17 00:00:00 2001 From: fk <17876666+fkirc@users.noreply.github.com> Date: Tue, 7 Jan 2025 23:02:51 +0100 Subject: [PATCH] #270: mark newly added po-entries (#271) --- src/file-formats/po/po-ops.ts | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/file-formats/po/po-ops.ts b/src/file-formats/po/po-ops.ts index 115ab149..a459fe21 100644 --- a/src/file-formats/po/po-ops.ts +++ b/src/file-formats/po/po-ops.ts @@ -70,6 +70,22 @@ export function updatePotTranslations( oldTarget: oldTargetComments, }); } + + if (args.changeSet.added.has(key)) { + // add a special marking for newly-added PO-entries + const newPoMarker = "NEEDS WORK"; + if (getText.comments) { + if (typeof getText.comments.reference === "string") { + getText.comments.reference += (" " + newPoMarker); + } else { + getText.comments.reference = newPoMarker + } + } else { + getText.comments = { + reference: newPoMarker + } as GetTextComment; + } + } }); }