Skip to content

Conversation

@anaghav2023
Copy link
Contributor

@anaghav2023 anaghav2023 commented Dec 18, 2025

Description

This PR has 3 new features

  1. Uploading Visual context to smartling. This PR has the settings part of it
  2. Ability to exclude/include blocks from translations into Smartling
  3. Add/Edit/Delete string instructions to blocks

Loom
For features 1 and 2 -> https://www.loom.com/share/d6d8c880667c4453b43c7c8b7af4de0a
For feature 3 -> https://www.loom.com/share/060f9094fc3c4865972cef2f4624e1d7


Note

Introduces nested block exclusion for translations and expands Smartling plugin capabilities and settings.

  • utils: translation-helpers now honors meta.excludeFromTranslation recursively (tracks depth) across Text, Core:Button, Symbol, and custom localizedTextInputs; updates snapshots to include button texts and carousel/custom component cases
  • smartling plugin: adds enableVisualContextCapture setting; broadens context menu exclude/include to any block; new context menu actions to add, edit, and delete per-string instructions
  • Version bumps: @builder.io/utils to 1.1.29; @builder.io/plugin-smartling to 0.0.23-13 and dependency on utils 1.1.29

Written by Cursor Bugbot for commit 4a0e697. This will update automatically on new commits. Configure here.

@changeset-bot
Copy link

changeset-bot bot commented Dec 18, 2025

⚠️ No Changeset found

Latest commit: 4a0e697

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@anaghav2023 anaghav2023 requested review from a team and AishwaryaParab and removed request for a team December 18, 2025 04:47
@nx-cloud
Copy link

nx-cloud bot commented Dec 18, 2025

View your CI Pipeline Execution ↗ for commit 4a0e697

Command Status Duration Result
nx test @builder.io/sdks ✅ Succeeded 13s View ↗
nx typecheck @builder.io/sdks ✅ Succeeded 6s View ↗
nx build @builder.io/sdk ✅ Succeeded <1s View ↗
nx test @builder.io/sdk ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-23 04:45:00 UTC

}
const element = elements[0];
const instructions = element.meta?.get('instructions');
if (instructions) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Edit String Instructions silently fails for falsy values

The showIf function checks element.meta?.get('instructions') !== undefined, which returns true for falsy non-undefined values like null, empty string, or 0. However, the onClick handler uses if (instructions) which is a truthiness check. If instructions is a falsy but non-undefined value, the "Edit String Instructions" menu item will appear, but clicking it will silently do nothing because the truthiness check fails. The onClick check should use !== undefined to match the showIf logic.

Fix in Cursor Fix in Web

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anaghav2023 can you please check if this is relevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AishwaryaParab Thanks, resolved it !

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Missing excludeFromTranslation check for Symbol in applyTranslation

The excludeFromTranslation check was added for Symbol components in getTranslateableFields (line 267), but the corresponding check is missing in applyTranslation (line 320). This inconsistency means that when a Symbol is marked with excludeFromTranslation, it won't have its text extracted for translation (correct), but applyTranslation will still process it and set translated: true in its metadata (incorrect). Other component types like Text, Core:Button, and localizedTextInputs all have the check in both functions.

packages/utils/src/translation-helpers.ts#L319-L320

traverse(blocks).forEach(function (el) {
if (el && el.id && el.component?.name === 'Symbol') {

Fix in Cursor Fix in Web


Copy link

@AishwaryaParab AishwaryaParab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@AishwaryaParab
Copy link

⚠️ No Changeset found

Latest commit: b2f99ba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@anaghav2023 Is this relevant since we're bumping up the version?

@anaghav2023
Copy link
Contributor Author

⚠️ No Changeset found

Latest commit: b2f99ba
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR

@anaghav2023 Is this relevant since we're bumping up the version?

No, I have managed the version updates on my own

@anaghav2023 anaghav2023 enabled auto-merge (squash) December 22, 2025 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants