-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix[smartling]: duplicate content entries handling #4169
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
fix[smartling]: duplicate content entries handling #4169
Conversation
|
|
View your CI Pipeline Execution ↗ for commit 4c03217
☁️ Nx Cloud last updated this comment at |
| const existingEntryIds = new Set((latestDraft.data.entries || []).map((entry: any) => entry.content?.id)); | ||
|
|
||
| // Filter out content that already exists in the job | ||
| const newContent = content.filter(c => !existingEntryIds.has(c.id)); |
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.
❔question:
Curious Q: what happens when the smartling job is being processed and we update the content during that time ? Do we have to schedule new job ?
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.
That could cause issues, not handling that right now. It would be a new feature request.
| }; | ||
|
|
||
| const symbolCount = allContent.length - content.length; | ||
| const symbolCount = allContent.length - newContent.length; |
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.
❔question:
Won't allContent and newContent will always have same length here ?
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.
If you check the code above allContent is getting updated. We add symbols to it
Description
If we make changes to a content entry and re-add to existing job, it was adding it twice
Screenshot
If relevant, add a screenshot or two of the changes you made.
Note
Prevents duplicate content when re-adding to Smartling jobs, adds localization support for
Core:Buttontext, updates Smartling strings URL, and bumps versions.updateLocalJobfilters out content already in the job and only processes symbols for newly added items.content.id) to show strings across jobs.0.0.23-9; pin@builder.io/utilsto1.1.25.translation-helpers):Core:Buttonoptions.textlikeText—exposes ingetTranslateableFieldsand writes localized values inapplyTranslation.1.1.25; tsconfig adds emptytypesarray.Written by Cursor Bugbot for commit 4c03217. This will update automatically on new commits. Configure here.