Skip to content

Commit 1546535

Browse files
committed
Only include valid translations in .json files
Fuzzy translations might be incorrect, and obsolete translations aren't used anywhere.
1 parent 6010c9d commit 1546535

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

po/po2js

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ let po = pofile.parse(data);
3232
const bodyPart = po.items
3333
.filter(item => item.msgid !== "")
3434
.filter(item => item.msgstr[0] !== "")
35+
.filter(item => !item.flags.fuzzy)
36+
.filter(item => !item.obsolete)
3537
.map(item => " " + JSON.stringify(item.msgid) + ": " + JSON.stringify(item.msgstr[0]))
3638
.join(",\n");
3739

0 commit comments

Comments
 (0)