From 8ce070d6c762e7b28d5b09a233e99dfbc2824ca3 Mon Sep 17 00:00:00 2001 From: Deepak Prabhakara Date: Tue, 26 Mar 2024 23:54:27 +0000 Subject: [PATCH] updated deployment --- find-dupe-locale.js | 23 +++++++++++++++++++ kustomize/overlays/demo/kustomization.yaml | 2 +- kustomize/overlays/prod-eu/kustomization.yaml | 2 +- 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 find-dupe-locale.js 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