From 45118adf0b571b479a317e28bbae2bfa1916ae3b Mon Sep 17 00:00:00 2001 From: JC Franco Date: Tue, 31 Oct 2023 14:47:25 -0700 Subject: [PATCH 1/2] refactor(card)!: remove deprecated `deselected` message BREAKING CHANGE: #6657 deprecated the deselect message property and is not being rendered. --- .../src/components/card/assets/card/t9n/messages.json | 1 - .../src/components/card/assets/card/t9n/messages_en.json | 1 - 2 files changed, 2 deletions(-) diff --git a/packages/calcite-components/src/components/card/assets/card/t9n/messages.json b/packages/calcite-components/src/components/card/assets/card/t9n/messages.json index baaf3628cba..eac24c88066 100644 --- a/packages/calcite-components/src/components/card/assets/card/t9n/messages.json +++ b/packages/calcite-components/src/components/card/assets/card/t9n/messages.json @@ -1,5 +1,4 @@ { "select": "Selectable card", - "deselect": "Deselect", "loading": "Loading" } diff --git a/packages/calcite-components/src/components/card/assets/card/t9n/messages_en.json b/packages/calcite-components/src/components/card/assets/card/t9n/messages_en.json index baaf3628cba..eac24c88066 100644 --- a/packages/calcite-components/src/components/card/assets/card/t9n/messages_en.json +++ b/packages/calcite-components/src/components/card/assets/card/t9n/messages_en.json @@ -1,5 +1,4 @@ { "select": "Selectable card", - "deselect": "Deselect", "loading": "Loading" } From 0d29b5fd1c386416c5561f4b8ad9cd2b58373701 Mon Sep 17 00:00:00 2001 From: JC Franco Date: Fri, 3 Nov 2023 16:07:19 -0700 Subject: [PATCH 2/2] update generateT9nDocsJSON script to handle deleted messages --- packages/calcite-components/support/generateT9nDocsJSON.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/calcite-components/support/generateT9nDocsJSON.ts b/packages/calcite-components/support/generateT9nDocsJSON.ts index adcb5c27a89..39b59a26706 100755 --- a/packages/calcite-components/support/generateT9nDocsJSON.ts +++ b/packages/calcite-components/support/generateT9nDocsJSON.ts @@ -32,7 +32,12 @@ const messagesFile = JSON.parse(await readFile(resolve(t9nPath, messagesFilename), { encoding: "utf-8" })); for (const [key, value] of Object.entries(messagesFile)) { - data[component][key][lang] = value; + const translationEntries = data[component][key]; + + // translation bundles might still have references to strings removed in the `main` and `en` bundle + if (translationEntries) { + translationEntries[lang] = value; + } } } }