From 31154a1d89d43fb38b27a141ec585aaad44a085b Mon Sep 17 00:00:00 2001 From: Manish-Builder-io Date: Tue, 28 Apr 2026 18:59:49 +0530 Subject: [PATCH 1/6] fix[smartling]: fix Clear translation metadata button not working `content.meta` is a MobX observable Map; calling `fastClone` on it (JSON.parse/JSON.stringify) serialises it as `{}`, so the subsequent `delete` calls were no-ops and `updateLatestDraft` was called with an empty meta object instead of the correctly-stripped one. Replace `fastClone(content.meta)` with `{ ...content.meta?.toJS() }` to match the identical pattern already used in the backend's `cleanupOrphanedTranslationMetadata` helper in `smartling.ts`. Co-Authored-By: Claude Sonnet 4.6 --- plugins/smartling/src/plugin.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/smartling/src/plugin.tsx b/plugins/smartling/src/plugin.tsx index 7f6ce9db774..ddfcdd624dc 100644 --- a/plugins/smartling/src/plugin.tsx +++ b/plugins/smartling/src/plugin.tsx @@ -852,7 +852,7 @@ const initializeSmartlingPlugin = async () => { message: 'This will clear all translation metadata from this content. Are you sure?', }); if (result) { - const updatedMeta = fastClone(content.meta); + const updatedMeta = { ...content.meta?.toJS() }; delete updatedMeta.translationStatus; delete updatedMeta.translationJobId; delete updatedMeta.translationBy; From acf6943f81b48f108f0b3a0cddb12acee0063994 Mon Sep 17 00:00:00 2001 From: Manish-Builder-io Date: Tue, 14 Jul 2026 16:21:02 +0530 Subject: [PATCH 2/6] fix[smartling]: pass string to dialogs.confirm instead of object `appState.dialogs.confirm` expects a plain string, not an options object. Passing `{ message: '...' }` caused React to crash with "Objects are not valid as a React child" when ConfirmDialog tried to render the object directly. Co-Authored-By: Claude Sonnet 4.6 --- plugins/smartling/src/plugin.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/smartling/src/plugin.tsx b/plugins/smartling/src/plugin.tsx index ddfcdd624dc..bf64b2aa3b9 100644 --- a/plugins/smartling/src/plugin.tsx +++ b/plugins/smartling/src/plugin.tsx @@ -848,9 +848,9 @@ const initializeSmartlingPlugin = async () => { ); }, async onClick(content) { - const result = await appState.dialogs.confirm({ - message: 'This will clear all translation metadata from this content. Are you sure?', - }); + const result = await appState.dialogs.confirm( + 'This will clear all translation metadata from this content. Are you sure?' + ); if (result) { const updatedMeta = { ...content.meta?.toJS() }; delete updatedMeta.translationStatus; From f11e7e6969f0d706482e53c89a96256b89a20fa2 Mon Sep 17 00:00:00 2001 From: Sanyam Kamat <1625114+sanyamkamat@users.noreply.github.com> Date: Tue, 14 Jul 2026 17:29:37 +0530 Subject: [PATCH 3/6] fix[smartling]: restore guarded metadata conversion --- plugins/smartling/src/plugin.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/smartling/src/plugin.tsx b/plugins/smartling/src/plugin.tsx index bf64b2aa3b9..9ae475c53d3 100644 --- a/plugins/smartling/src/plugin.tsx +++ b/plugins/smartling/src/plugin.tsx @@ -852,7 +852,8 @@ const initializeSmartlingPlugin = async () => { 'This will clear all translation metadata from this content. Are you sure?' ); if (result) { - const updatedMeta = { ...content.meta?.toJS() }; + const metadata = typeof content.meta?.toJS === 'function' ? content.meta.toJS() : content.meta; + const updatedMeta = { ...(metadata || {}) }; delete updatedMeta.translationStatus; delete updatedMeta.translationJobId; delete updatedMeta.translationBy; From 55e4f7b30c245805888979d075941fb62ddb7f49 Mon Sep 17 00:00:00 2001 From: Sanyam Kamat <1625114+sanyamkamat@users.noreply.github.com> Date: Tue, 14 Jul 2026 17:33:50 +0530 Subject: [PATCH 4/6] fix[smartling]: update version to 0.1.2-0 in package.json and package-lock.json --- plugins/smartling/package-lock.json | 4 ++-- plugins/smartling/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/smartling/package-lock.json b/plugins/smartling/package-lock.json index c4cdef10696..cc98d6e51fa 100644 --- a/plugins/smartling/package-lock.json +++ b/plugins/smartling/package-lock.json @@ -1,12 +1,12 @@ { "name": "@builder.io/plugin-smartling", - "version": "0.1.1", + "version": "0.1.2-0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@builder.io/plugin-smartling", - "version": "0.1.1", + "version": "0.1.2-0", "license": "MIT", "dependencies": { "@builder.io/utils": "1.1.30", diff --git a/plugins/smartling/package.json b/plugins/smartling/package.json index 7707c947276..efec08fb27a 100644 --- a/plugins/smartling/package.json +++ b/plugins/smartling/package.json @@ -1,6 +1,6 @@ { "name": "@builder.io/plugin-smartling", - "version": "0.1.1", + "version": "0.1.2-0", "description": "", "keywords": [], "main": "dist/plugin.system.js", From e3a9e11a550cd8a078bc724fe61ef9faedda6647 Mon Sep 17 00:00:00 2001 From: Sanyam Kamat <1625114+sanyamkamat@users.noreply.github.com> Date: Tue, 14 Jul 2026 17:35:43 +0530 Subject: [PATCH 5/6] fix[smartling]: update version to 0.1.2-1 in package.json and package-lock.json --- plugins/smartling/package-lock.json | 4 ++-- plugins/smartling/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/smartling/package-lock.json b/plugins/smartling/package-lock.json index cc98d6e51fa..1f4de35bbd3 100644 --- a/plugins/smartling/package-lock.json +++ b/plugins/smartling/package-lock.json @@ -1,12 +1,12 @@ { "name": "@builder.io/plugin-smartling", - "version": "0.1.2-0", + "version": "0.1.2-1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@builder.io/plugin-smartling", - "version": "0.1.2-0", + "version": "0.1.2-1", "license": "MIT", "dependencies": { "@builder.io/utils": "1.1.30", diff --git a/plugins/smartling/package.json b/plugins/smartling/package.json index efec08fb27a..054e8fc41cd 100644 --- a/plugins/smartling/package.json +++ b/plugins/smartling/package.json @@ -1,6 +1,6 @@ { "name": "@builder.io/plugin-smartling", - "version": "0.1.2-0", + "version": "0.1.2-1", "description": "", "keywords": [], "main": "dist/plugin.system.js", From 035fad6056df312bf5ec4df7663dcfb53422c307 Mon Sep 17 00:00:00 2001 From: Sanyam Kamat <1625114+sanyamkamat@users.noreply.github.com> Date: Tue, 14 Jul 2026 19:50:50 +0530 Subject: [PATCH 6/6] fix[smartling]: update version to 0.1.2 in package.json and package-lock.json --- plugins/smartling/package-lock.json | 4 ++-- plugins/smartling/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/smartling/package-lock.json b/plugins/smartling/package-lock.json index 1f4de35bbd3..8945beabc15 100644 --- a/plugins/smartling/package-lock.json +++ b/plugins/smartling/package-lock.json @@ -1,12 +1,12 @@ { "name": "@builder.io/plugin-smartling", - "version": "0.1.2-1", + "version": "0.1.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@builder.io/plugin-smartling", - "version": "0.1.2-1", + "version": "0.1.2", "license": "MIT", "dependencies": { "@builder.io/utils": "1.1.30", diff --git a/plugins/smartling/package.json b/plugins/smartling/package.json index 054e8fc41cd..00fc3bd37ff 100644 --- a/plugins/smartling/package.json +++ b/plugins/smartling/package.json @@ -1,6 +1,6 @@ { "name": "@builder.io/plugin-smartling", - "version": "0.1.2-1", + "version": "0.1.2", "description": "", "keywords": [], "main": "dist/plugin.system.js",