Skip to content

fix[utils][smartling]: ENG-11017 fix for apply translations#4211

Merged
anaghav2023 merged 2 commits intoBuilderIO:mainfrom
anaghav2023:ENG-11017-nested-symbols-issue
Dec 17, 2025
Merged

fix[utils][smartling]: ENG-11017 fix for apply translations#4211
anaghav2023 merged 2 commits intoBuilderIO:mainfrom
anaghav2023:ENG-11017-nested-symbols-issue

Conversation

@anaghav2023
Copy link
Contributor

@anaghav2023 anaghav2023 commented Dec 15, 2025

Description

Handles apply translation for nested symbols data.

Testing:
loom.com/share/9f493b9bf39b4e74aea1493ad8b089a6?focus_title=1&muted=1&from_recorder=1


Note

Refactors translation application to handle nested LocalizedValue inside symbol inputs, including arrays, and adds tests; bumps utils to 1.1.27.

  • Utils
    • Refactor resolveTranslation to support nested LocalizedValue within symbol inputs, including arrays/objects.
      • Introduce separate translationPath and dataPath to look up vs. set values.
      • Recurse into Default and locale-specific branches; update transformed.symbol.data.* meta keys.
  • Tests
    • Add test for symbol with localized array items containing nested localized fields (uspList).
  • Release
    • Bump @builder.io/utils version to 1.1.27.

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

@changeset-bot
Copy link

changeset-bot bot commented Dec 15, 2025

⚠️ No Changeset found

Latest commit: c886032

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

@nx-cloud
Copy link

nx-cloud bot commented Dec 15, 2025

View your CI Pipeline Execution ↗ for commit c886032

Command Status Duration Result
nx test @e2e/react-native-76-fabric ✅ Succeeded 12m 46s View ↗
nx test @e2e/qwik-city ✅ Succeeded 7m 10s View ↗
nx test @e2e/react-sdk-next-14-app ✅ Succeeded 4m 42s View ↗
nx test @e2e/svelte ✅ Succeeded 4m 22s View ↗
nx test @e2e/hydrogen ✅ Succeeded 4m 46s View ↗
nx test @e2e/sveltekit ✅ Succeeded 4m 19s View ↗
nx test @e2e/angular-17-ssr ✅ Succeeded 5m 5s View ↗
nx test @e2e/nuxt ✅ Succeeded 5m 21s View ↗
Additional runs (37) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-12-15 13:55:07 UTC

data,
basePath,
path,
translationPath,
Copy link
Contributor

Choose a reason for hiding this comment

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

is this method used only by smartling plugin? what about phrase?

Copy link
Contributor Author

@anaghav2023 anaghav2023 Dec 15, 2025

Choose a reason for hiding this comment

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

So this method is called by the applyTranslation method, which is being used in the mesource file, which is the phrase plugin. But I have tested this function for backward compatibility. It is only handling the additional cases and the existing test cases are also passed. So should be okay. For safety, I could introduce a new v2 function and call it from smartling

@anaghav2023 anaghav2023 merged commit 9f092eb into BuilderIO:main Dec 17, 2025
48 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants