Skip to content

Commit

Permalink
#270: mark newly added po-entries
Browse files Browse the repository at this point in the history
  • Loading branch information
Fe committed Jan 7, 2025
1 parent 1c946f9 commit 3fe4da7
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/file-formats/po/po-ops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
});
}

Expand Down

0 comments on commit 3fe4da7

Please sign in to comment.