-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix[plugin][smartling]: ENG-10907 smartling fixes #4208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix[plugin][smartling]: ENG-10907 smartling fixes #4208
Conversation
|
|
View your CI Pipeline Execution ↗ for commit 35ce193
☁️ Nx Cloud last updated this comment at |
| property: 'query.published', | ||
| operator: 'is', | ||
| value: 'published', | ||
| value: 'published or draft', |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
…ilder into ENG-10907-smartling-fixes
| "license": "MIT", | ||
| "dependencies": { | ||
| "@builder.io/utils": "1.1.25", | ||
| "@builder.io/utils": "1.1.25-2", |
There was a problem hiding this comment.
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)
| 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 |
There was a problem hiding this comment.
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.
Description
Fixes in this PR:
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.
projectId:translationJobUid.published or draftfor job selection.Symbolreferences and avoid duplicates.packages/utils/src/translation-helpers.ts):@builder.io/core:LocalizedValue, store string values directly and recurse into arrays/objects to collect nested localized values.@builder.io/utilsto1.1.26and@builder.io/plugin-smartlingto0.0.23-11.Written by Cursor Bugbot for commit 35ce193. This will update automatically on new commits. Configure here.