Skip to content

Conversation

@anaghav2023
Copy link
Contributor

@anaghav2023 anaghav2023 commented Oct 28, 2025

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:Button text, updates Smartling strings URL, and bumps versions.

  • Smartling plugin:
    • Duplicate handling: updateLocalJob filters out content already in the job and only processes symbols for newly added items.
    • Smartling strings link: Updates URL to filter by file URI (content.id) to show strings across jobs.
    • Versions/Deps: Bump to 0.0.23-9; pin @builder.io/utils to 1.1.25.
  • Utils (translation-helpers):
    • Core:Button localization: Treats Core:Button options.text like Text—exposes in getTranslateableFields and writes localized values in applyTranslation.
    • Tests: Add cases for buttons with plain and pre-localized text.
    • Versions/Config: Bump to 1.1.25; tsconfig adds empty types array.

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

@changeset-bot
Copy link

changeset-bot bot commented Oct 28, 2025

⚠️ No Changeset found

Latest commit: 4c03217

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 Oct 28, 2025

View your CI Pipeline Execution ↗ for commit 4c03217

Command Status Duration Result
nx test @e2e/qwik-city ✅ Succeeded 7m 16s View ↗
nx test @e2e/nextjs-sdk-next-app ✅ Succeeded 6m 53s View ↗
nx test @e2e/angular-19-ssr ✅ Succeeded 5m 40s View ↗
nx test @e2e/angular-17 ✅ Succeeded 6m 27s View ↗
nx test @e2e/react-sdk-next-14-app ✅ Succeeded 5m View ↗
nx test @e2e/solid ✅ Succeeded 4m 7s View ↗
nx test @e2e/nuxt ✅ Succeeded 4m 57s View ↗
nx test @e2e/gen1-remix ✅ Succeeded 4m 50s View ↗
Additional runs (37) ✅ Succeeded ... View ↗

☁️ Nx Cloud last updated this comment at 2025-12-05 03:35:19 UTC

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));
Copy link
Contributor

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 ?

Copy link
Contributor Author

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;
Copy link
Contributor

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 ?

Copy link
Contributor Author

@anaghav2023 anaghav2023 Oct 28, 2025

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

cursor[bot]

This comment was marked as outdated.

@anaghav2023 anaghav2023 enabled auto-merge (squash) December 5, 2025 03:27
@anaghav2023 anaghav2023 merged commit 1304e3e into BuilderIO:main Dec 5, 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