Skip to content

Conversation

@anaghav2023
Copy link
Contributor

@anaghav2023 anaghav2023 commented Dec 5, 2025

Description

Fixes in this PR:

  1. Add a "View job in smartling" button on the job menu
  2. Fix the webhook not updating when re-loading the plugin
  3. Fix the content api query issue
  4. Fix the nested symbol data not going for translation

Loom
https://www.loom.com/share/f8b2a75c4e234bbdbae3008f8a345ed0


Note

Adds a Smartling job view action, updates webhooks when URLs change, fixes content picker query, includes nested symbols in translation jobs, and improves localized value extraction in utils.

  • Smartling Plugin:
    • Job UI: Add "View job in smartling" action that opens the job in Smartling using projectId:translationJobUid.
    • Webhooks: Update model webhook whenever the URL differs from the template.
    • Content Picker: Query updated to published or draft for job selection.
    • Translation Jobs:
      • Update existing jobs to include recursively discovered nested Symbol references and avoid duplicates.
      • New jobs also recursively include nested symbols during creation.
  • Utils (packages/utils/src/translation-helpers.ts):
    • When encountering @builder.io/core:LocalizedValue, store string values directly and recurse into arrays/objects to collect nested localized values.
  • Dependencies:
    • Bump @builder.io/utils to 1.1.26 and @builder.io/plugin-smartling to 0.0.23-11.

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

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2025

⚠️ No Changeset found

Latest commit: 35ce193

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 5, 2025

View your CI Pipeline Execution ↗ for commit 35ce193

Command Status Duration Result
nx test @e2e/qwik-city ✅ Succeeded 7m 19s View ↗
nx test @e2e/nextjs-sdk-next-app ✅ Succeeded 6m 45s View ↗
nx test @e2e/angular-17 ✅ Succeeded 6m 26s View ↗
nx test @e2e/react-sdk-next-15-app ✅ Succeeded 4m 53s View ↗
nx test @e2e/nuxt ✅ Succeeded 5m 15s View ↗
nx test @e2e/hydrogen ✅ Succeeded 4m 47s View ↗
nx test @e2e/angular-17-ssr ✅ Succeeded 4m 55s View ↗
nx test @e2e/react-sdk-next-14-app ✅ Succeeded 4m 38s View ↗
Additional runs (37) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-12-12 11:57:56 UTC

property: 'query.published',
operator: 'is',
value: 'published',
value: 'published or draft',
Copy link

Choose a reason for hiding this comment

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

Bug: Query value incorrectly uses literal string instead of array

The query value is set to the literal string 'published or draft' instead of an array of values. Based on the Builder.io Query pattern seen in test files (e.g., value: ['a'] for matching multiple values), the correct syntax for OR-ing values is an array like ['draft', 'published']. The current change will attempt to match content where published equals the literal string "published or draft", which will never match any content and break the content picker dialog.

Fix in Cursor Fix in Web

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is tested and working

"license": "MIT",
"dependencies": {
"@builder.io/utils": "1.1.25",
"@builder.io/utils": "1.1.25-2",
Copy link

Choose a reason for hiding this comment

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

Bug: Version mismatch between package.json and package-lock.json

The package.json declares @builder.io/utils version 1.1.26, but package-lock.json has inconsistent entries: the root packages section specifies 1.1.25-2, while the node_modules and dependencies sections show version 1.1.26 but the resolved URL points to utils-1.1.25.tgz. This mismatch means the installed package won't match the declared version, potentially causing the nested symbol translation fixes in @builder.io/utils to not be included at runtime.

Additional Locations (2)

Fix in Cursor Fix in Web

const translationModel = getTranslationModel();
const allContent = [...content];
const processedSymbols = new Set<string>(); // Avoid duplicates
const processedContentIds = new Set<string>(content.map(c => c.id)); // Track processed content
Copy link

Choose a reason for hiding this comment

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

Bug: Declared variable processedContentIds is never used

The variable processedContentIds is declared and initialized with content IDs but is never used in the createLocalJobWithSymbols function. Given that the similar updateLocalJob function uses existingEntryIds to prevent duplicate symbols from being added, this may indicate missing logic to check if a symbol is already part of the original content, potentially resulting in duplicate entries in translation jobs.

Fix in Cursor Fix in Web

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