diff --git a/find-dupe-locale.js b/find-dupe-locale.js new file mode 100644 index 000000000..20b64d4fb --- /dev/null +++ b/find-dupe-locale.js @@ -0,0 +1,23 @@ +const allValues = {}; + +const localeFile = require('./locales/en/common.json'); + +for (const [key, value] of Object.entries(localeFile)) { + const arr = allValues[value] || []; + allValues[value] = arr.concat(key); +} + +const dupValues = {}; + +for (const [key, value] of Object.entries(allValues)) { + if (value.length > 1) { + dupValues[key] = value; + } +} + +if (Object.keys(dupValues).length) { + console.error(`Duplicate values found in locale file: ${Object.keys(dupValues).length}`); + for (const [key, value] of Object.entries(dupValues)) { + console.error(`${value}: ${key}`); + } +} diff --git a/kustomize/overlays/demo/kustomization.yaml b/kustomize/overlays/demo/kustomization.yaml index 31cc7a112..c0e879b2b 100644 --- a/kustomize/overlays/demo/kustomization.yaml +++ b/kustomize/overlays/demo/kustomization.yaml @@ -12,4 +12,4 @@ patches: images: - name: boxyhq/jackson - newTag: 1.21.3 + newTag: 1.21.4 diff --git a/kustomize/overlays/prod-eu/kustomization.yaml b/kustomize/overlays/prod-eu/kustomization.yaml index 31cc7a112..c0e879b2b 100644 --- a/kustomize/overlays/prod-eu/kustomization.yaml +++ b/kustomize/overlays/prod-eu/kustomization.yaml @@ -12,4 +12,4 @@ patches: images: - name: boxyhq/jackson - newTag: 1.21.3 + newTag: 1.21.4