fix: lionbridge connector correctness/compliance fixes + test parity - #656
Open
markdaugherty wants to merge 6 commits into
Open
fix: lionbridge connector correctness/compliance fixes + test parity#656markdaugherty wants to merge 6 commits into
markdaugherty wants to merge 6 commits into
Conversation
Builds on the initial connector implementation (adobe#651) with fixes found via live testing against Lionbridge's Content API v2: - providerId must be sent on job submit, not job creation (the API silently drops it on POST /jobs; submit fails without it) - retrievefile needs Accept: application/octet-stream, not the default application/json (403s otherwise); other endpoints are unaffected - add rate-limit handling (429/503 retry with exponential backoff, honoring Retry-After) per Lionbridge's dev guidelines - truncate jobName/requestName to the 250-byte guideline limit - generate and persist a per org/site/env connector GUID, prefixed onto connectorName per Lionbridge's connector-fingerprinting guideline - call the approve endpoint after a successful download/save, closing out the request in Lionbridge's review workflow - fix auth.js to resolve the da-etc origin via the shared DA_ETC export (with env-override support) instead of a hardcoded URL - add test coverage for auth.js, connectorGuid.js, and the full sendAllLanguages/getStatusAll/saveItems flow (previously only statusFor had tests) Verified end-to-end against real Lionbridge staging APIs and, separately, through the actual DA Translate app UI against a real test site (scdemos/lionbridge-demo).
3 tasks
- Add JSDoc to every function in index.js, auth.js, and connectorGuid.js that was missing it. - CONNECTOR_NAME is now "DA Live Localization for Lionbridge" instead of the generic "DA Live Localization", to distinguish it from connectors for other vendors in Lionbridge's own job/connector listings.
markdaugherty
marked this pull request as ready for review
August 11, 2026 17:58
usman-khalid
requested review from
hannessolo,
mhaack,
sharanyavinod and
usman-khalid
August 11, 2026 18:01
added 2 commits
August 11, 2026 15:16
…copy Extracted while fixing the same class of issue in the Smartling connector (429s during batch jobs) — rather than maintain two nearly identical retry/backoff implementations, both now share nx/blocks/loc/utils/fetchWithRetry.js. Passes an explicit RETRY_CONFIG (maxRetries: 3, maxDelayMs: 8000, 429/503 only) to preserve this connector's existing tuning exactly; behavior is unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Continues the Lionbridge translation connector work from #651 (thanks @ravuthu). Fixes found by testing against the real Lionbridge Content API v2 and the real DA Translate app UI, plus compliance work against Lionbridge's dev guidelines, plus test parity with the other connectors (Trados/Smartling).
Bug fixes (found via live API testing, not caught by mocked tests):
providerIdmust be sent onsubmit, notcreateJob— the API silently drops it onPOST /jobs, then rejectssubmitwith"Job is missing providerId".retrievefileneedsAccept: application/octet-stream, not the defaultapplication/json(403s otherwise). Other endpoints are unaffected.auth.jsnow resolves the da-etc origin via the sharedDA_ETCexport (env-override support via?da-etc=) instead of a hardcoded URL — needed to actually test this locally, and a real correctness fix regardless.Compliance with Lionbridge's dev guidelines:
Retry-After.jobName/requestNametruncated to the 250-byte limit..da/translate.json, written once), prefixed ontoconnectorNameper their connector-fingerprinting requirement.approveendpoint after a successful download/save, closing out the request in Lionbridge's review workflow (REVIEW_TRANSLATION→TRANSLATION_APPROVED).cancelTranslationexport — their guidelines explicitly prohibit connectors from letting users cancel in-progress jobs; documented inline.Test parity:
auth.test.js,connectorGuid.test.js, and fullindex.test.jscoverage forsendAllLanguages/getStatusAll/saveItems/connect(previously onlystatusForhad tests), matching Trados/Smartling's depth.providerIdandAccept-header bugs above.Verification
sendAllLanguageschain (createJob → upload → addRequest → submit),getStatusAll,saveItems/retrievefile, andapprove.da.live/apps/loc) against a real test site (scdemos/lionbridge-demo— new GitHub repo + AEM Code Sync + DA content), with the backend (da-sites/da-etc#2) running locally via?da-etc=local: created a project, sent a real page for translation, polled status to completion, and confirmed the translated copy landed at/fr/test-page.html.npm test(1236 tests) and lint pass.Documentation
Lionbridge was missing from the public docs.da.live connector documentation. The following pages have draft updates pending publish (not yet live):
getItems()instead of thesaveItems()every real connector implementsauthEndpoint/apiEndpointvaluesDependency
This connector can't authenticate against a real Lionbridge account until da-sites/da-etc#2 merges.
Marking as draft pending final review pass.