Skip to content

fix: lionbridge connector correctness/compliance fixes + test parity - #656

Open
markdaugherty wants to merge 6 commits into
adobe:mainfrom
markdaugherty:lionbridge-connector
Open

fix: lionbridge connector correctness/compliance fixes + test parity#656
markdaugherty wants to merge 6 commits into
adobe:mainfrom
markdaugherty:lionbridge-connector

Conversation

@markdaugherty

@markdaugherty markdaugherty commented Aug 11, 2026

Copy link
Copy Markdown
Member

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):

  • providerId must be sent on submit, not createJob — the API silently drops it on POST /jobs, then rejects submit with "Job is missing providerId".
  • retrievefile needs Accept: application/octet-stream, not the default application/json (403s otherwise). Other endpoints are unaffected.
  • auth.js now resolves the da-etc origin via the shared DA_ETC export (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:

  • Rate-limit handling: retry 429/503 with exponential backoff, honoring Retry-After.
  • jobName/requestName truncated to the 250-byte limit.
  • Generate and persist a per org/site/env connector GUID (in .da/translate.json, written once), prefixed onto connectorName per their connector-fingerprinting requirement.
  • Call the approve endpoint after a successful download/save, closing out the request in Lionbridge's review workflow (REVIEW_TRANSLATIONTRANSLATION_APPROVED).
  • No cancelTranslation export — their guidelines explicitly prohibit connectors from letting users cancel in-progress jobs; documented inline.

Test parity:

  • Added auth.test.js, connectorGuid.test.js, and full index.test.js coverage for sendAllLanguages/getStatusAll/saveItems/connect (previously only statusFor had tests), matching Trados/Smartling's depth.
  • Two tests directly regression-lock the providerId and Accept-header bugs above.

Verification

  • Standalone scripts against real Lionbridge staging APIs: full sendAllLanguages chain (createJob → upload → addRequest → submit), getStatusAll, saveItems/retrievefile, and approve.
  • Full end-to-end through the real DA Translate app UI (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):

Dependency

This connector can't authenticate against a real Lionbridge account until da-sites/da-etc#2 merges.

Marking as draft pending final review pass.

ravuthu and others added 2 commits August 10, 2026 11:22
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).
- 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
markdaugherty marked this pull request as ready for review August 11, 2026 17:58
Mark Daugherty 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.
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