Skip to content

Commit 4c03217

Browse files
committed
Revert "View job smartling"
This reverts commit 302dccc.
1 parent 31beff2 commit 4c03217

File tree

1 file changed

+0
-58
lines changed

1 file changed

+0
-58
lines changed

plugins/smartling/src/plugin.tsx

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -649,64 +649,6 @@ const initializeSmartlingPlugin = async () => {
649649
},
650650
});
651651

652-
registerContentAction({
653-
label: 'View job in smartling',
654-
showIf(content, model) {
655-
const translationModel = getTranslationModel();
656-
if (!translationModel) return false;
657-
if (!model?.name || model.name !== translationModel.name) return false;
658-
if (!content || content.published !== 'published') return false;
659-
660-
// Only show if job has been authorized/published to Smartling
661-
// translationBatch is set by backend after job is published
662-
if (!content.meta || !content.data) return false;
663-
664-
const meta = fastClone(content.meta);
665-
const data = content.data;
666-
667-
// Get project ID from jobDetails
668-
const projectId = data?.get?.('jobDetails')?.get?.('project') || data?.get?.('jobDetails')?.project;
669-
670-
// Get job UID from translationBatch (only available after job is authorized in Smartling)
671-
const translationJobUid = meta?.translationBatch?.translationJobUid;
672-
673-
return (
674-
content.published === 'published' &&
675-
projectId &&
676-
translationJobUid
677-
);
678-
},
679-
async onClick(translationJob) {
680-
if (!translationJob) {
681-
appState.snackBar.show('Job information not available');
682-
return;
683-
}
684-
685-
if (!translationJob.meta || !translationJob.data) {
686-
appState.snackBar.show('Job information not available');
687-
return;
688-
}
689-
690-
const meta = fastClone(translationJob.meta);
691-
const data = translationJob.data;
692-
693-
// Get project ID from jobDetails
694-
const projectId = data?.get?.('jobDetails')?.get?.('project') || data?.get?.('jobDetails')?.project;
695-
696-
// Get job UID from translationBatch
697-
const translationJobUid = meta?.translationBatch?.translationJobUid;
698-
699-
if (!projectId || !translationJobUid) {
700-
appState.snackBar.show('Job information not available');
701-
return;
702-
}
703-
704-
// Construct Smartling job URL with format: projectId:translationJobUid
705-
const smartlingJobUrl = `https://dashboard.smartling.com/app/projects/${projectId}/account-jobs/${projectId}:${translationJobUid}`;
706-
window.open(smartlingJobUrl, '_blank', 'noreferrer,noopener');
707-
},
708-
});
709-
710652
registerContentAction({
711653
label: 'View translation job',
712654
showIf(content, model) {

0 commit comments

Comments
 (0)