Skip to content

Commit 9a981c7

Browse files
committed
Add spacing to translations.json for better diff-ability
1 parent de6ef49 commit 9a981c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/parseGettextFiles.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function parseGettextFiles(filenames = getGettextFileNames()) {
3131
for (const filename of filenames) {
3232
console.log('Parsing', filename, '...');
3333
const locale = path.basename(filename, '.txt');
34-
const poFile = fs.readFileSync(path.join(i18nBasePath, filename), {encoding: 'utf8'});
34+
const poFile = fs.readFileSync(path.join(i18nBasePath, filename), { encoding: 'utf8' });
3535
const localization = removeEmptyTranslations(gettextParser.po.parse(poFile));
3636
result[locale] = localization;
3737
}
@@ -41,7 +41,7 @@ function parseGettextFiles(filenames = getGettextFileNames()) {
4141
function writeJSON(data) {
4242
const filename = outputFilename;
4343
console.log('Writing', filename);
44-
fs.writeFileSync(filename, JSON.stringify(data));
44+
fs.writeFileSync(filename, JSON.stringify(data, null, 2));
4545
}
4646

4747
writeJSON(parseGettextFiles());

0 commit comments

Comments
 (0)