mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
Merge pull request #1666 from atmire/w2p-91400_Fix-for-missing-comma-in-json-files
Fix for missing comma in json files
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { projectRoot} from '../webpack/helpers';
|
||||
import { projectRoot } from '../webpack/helpers';
|
||||
|
||||
const commander = require('commander');
|
||||
const fs = require('fs');
|
||||
const JSON5 = require('json5');
|
||||
@@ -119,7 +120,7 @@ function syncFileWithSource(pathToTargetFile, pathToOutputFile) {
|
||||
outputChunks.forEach(function (chunk) {
|
||||
progressBar.increment();
|
||||
chunk.split("\n").forEach(function (line) {
|
||||
file.write(" " + line + "\n");
|
||||
file.write((line === '' ? '' : ` ${line}`) + "\n");
|
||||
});
|
||||
});
|
||||
file.write("\n}");
|
||||
@@ -192,7 +193,10 @@ function createNewChunkComparingSourceAndTarget(correspondingTargetChunk, source
|
||||
|
||||
const targetList = correspondingTargetChunk.split("\n");
|
||||
const oldKeyValueInTargetComments = getSubStringWithRegex(correspondingTargetChunk, "\\s*\\/\\/\\s*\".*");
|
||||
const keyValueTarget = targetList[targetList.length - 1];
|
||||
let keyValueTarget = targetList[targetList.length - 1];
|
||||
if (!keyValueTarget.endsWith(",")) {
|
||||
keyValueTarget = keyValueTarget + ",";
|
||||
}
|
||||
|
||||
if (oldKeyValueInTargetComments != null) {
|
||||
const oldKeyValueUncommented = getSubStringWithRegex(oldKeyValueInTargetComments[0], "\".*")[0];
|
||||
|
@@ -5552,7 +5552,7 @@
|
||||
|
||||
|
||||
// "workflowAdmin.search.results.head": "Administer Workflow",
|
||||
"workflowAdmin.search.results.head": "Administrēt darba plūsmu"
|
||||
"workflowAdmin.search.results.head": "Administrēt darba plūsmu",
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user