Skip to content

Navigation Menu

Sign in
Sign up

Commit c32450e

Browse files
[plugin][smartling]:ENG-10295 Ability to add content entries to existing job (BuilderIO#4146)
## Description 1. Adding content entries to existing jobs was not working because the content status was still published. 2. View translation job button was not showing earlier due to the cache checks which don't work.
1 parent f818ac4 commit c32450e

4 files changed

Lines changed: 5 additions & 16 deletions

File tree

‎plugins/smartling/package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎plugins/smartling/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@builder.io/plugin-smartling",
3-
"version": "0.0.23-7",
3+
"version": "0.0.23-8",
44
"description": "",
55
"keywords": [],
66
"main": "dist/plugin.system.js",

‎plugins/smartling/src/plugin.tsx‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -664,22 +664,10 @@ const initializeSmartlingPlugin = async () => {
664664
return false;
665665
}
666666

667-
// Show if content has a translation job ID (regardless of status)
668667
if (!translationJobId) {
669668
return false;
670669
}
671-
672-
673-
// Trigger background validation and cleanup if needed
674-
isContentInActiveTranslationJob(content, api).catch(() => {});
675-
676-
// Check cache for immediate result
677-
const cached = jobExistenceCache.get(translationJobId);
678-
if (cached && (Date.now() - cached.timestamp) < CACHE_DURATION) {
679-
return cached.exists; // Show only if job exists
680-
}
681-
682-
// Default to showing while we validate (will hide after background check completes)
670+
683671
return true;
684672
},
685673
async onClick(content) {

‎plugins/smartling/src/smartling.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export class SmartlingApi {
156156
...allContent.map(c => getContentReference(c)),
157157
],
158158
},
159+
published: 'draft',
159160
};
160161

161162
const symbolCount = allContent.length - content.length;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /