Only include valid translations in .json files

Fuzzy translations might be incorrect, and obsolete translations aren't
used anywhere.
This commit is contained in:
Pierre Ossman 2025-03-13 09:03:35 +01:00
parent 6010c9da04
commit 154653523c
1 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,8 @@ let po = pofile.parse(data);
const bodyPart = po.items
.filter(item => item.msgid !== "")
.filter(item => item.msgstr[0] !== "")
.filter(item => !item.flags.fuzzy)
.filter(item => !item.obsolete)
.map(item => " " + JSON.stringify(item.msgid) + ": " + JSON.stringify(item.msgstr[0]))
.join(",\n");