From 4a25c28f29cb2402429c272421975e8151946fb8 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Sat, 27 Apr 2024 09:55:12 -0700 Subject: [PATCH] Remove comments before pushing translation source --- scripts/tx.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/tx.js b/scripts/tx.js index 2c6e6ed..5df3386 100644 --- a/scripts/tx.js +++ b/scripts/tx.js @@ -70,7 +70,10 @@ async function pushSource(resource, verbose) { if (verbose) { console.log('Reading en.json...'); } - const content = fs.readFileSync(filename); + let content = fs.readFileSync(filename); + let json = JSON.parse(content); + delete json._COMMENT; + content = JSON.stringify(json); console.log('Uploading en.json...'); await transifexApi.ResourceStringsAsyncUpload.upload({ resource: resource,