Skip to content

SWI-11363 chore: replace "adapter" with "translator" throughout - #24

Merged
kshahbw merged 1 commit into
mainfrom
chore/rename-adapter-to-translator
Aug 21, 2026
Merged

SWI-11363 chore: replace "adapter" with "translator" throughout#24
kshahbw merged 1 commit into
mainfrom
chore/rename-adapter-to-translator

Conversation

@kshahbw

@kshahbw kshahbw commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

BLUF

Finishes the Migration Toolkit rebrand (#21), which renamed the product in prose but left 229 references to "adapter" in env vars, code identifiers, filenames, and runtime strings. Zero remain. No backward-compatible aliases — existing deployments must update their environment.

Three referents, three words

The word "adapter" was doing three different jobs, so a blanket find-and-replace would have made things worse:

Referent Now called Why
The running proxy translator Matches the product name the rebrand already established ("Real-Time Translator")
The src/server types server TranslatorConfig would collide with the much narrower src/translator module — it's the server's config, not the translation engine's
The whole three-step product toolkit AGENTS.md's paired model, CONTRIBUTING, and the issue templates cover all three tools

⚠️ Breaking change

Old New
ADAPTER_ACCOUNT_SID TRANSLATOR_ACCOUNT_SID
ADAPTER_AUTH_TOKEN TRANSLATOR_AUTH_TOKEN
ADAPTER_CAPTURE_DIR TRANSLATOR_CAPTURE_DIR
ADAPTER_LOG TRANSLATOR_LOG

What changed

Renamed identifiersAdapterConfig/AdapterDeps/AdapterError/adapterErrorsServerConfig/ServerDeps/ServerError/serverErrors.

User-visible strings — the 90002 body is now "Internal translator error"; the message played into the call on an unsupported verb; the translator listening on… startup log; 7 finding messages in translate.ts; 8 notes fields in twilio-voice.json (these surface in the playground and compat reports).

OpenAPI spec — retitled Real-Time Translator (Voice), adapterHosttranslatorHost.

Files renamedopenapi/twilio-compat-adapter.ymltwilio-compat.yml ("compat" already carries it); scripts/bench-adapter-overhead.tsbench-translator-overhead.ts. The bench:overhead npm script name is unchanged.

Docs — README, SECURITY, docs/demo.md, AGENTS.md, CONTRIBUTING, web/README.md, and both issue templates. Also fixed the stale bw-voice-adapter repo URL in the issue-template config (it was redirect-only).

Tests — ~30 inert fixture hostnames (adapter.testtranslator.test) plus the assertions that move in lockstep with the message changes above.

Verification

  • npm run typecheck — clean
  • npm test303/303 passing across 43 files
  • npm run playground:build — builds (506 KB)
  • npm run compatibility-check -- examples/full-pv-app — smoke-tested, correct output

Reviewer notes

  • The sed passes ran over the tracked web/fonts/*.woff2 binaries. I verified them byte-for-byte against HEADunchanged — and removed three zero-byte temp files macOS sed left behind. Worth a glance.
  • Not fixed here (pre-existing): AGENTS.md still references a "checked-in .env" that isn't tracked in the repo. Happy to clean that up separately.
  • Old adapter/* branch names are left alone — they're historical.

🤖 Generated with Claude Code

Finishes the Migration Toolkit rebrand (#21), which renamed the product in
prose but left "adapter" in env vars, code identifiers, filenames, and
runtime strings. No backward-compatible aliases.

Three referents, three words:

- The running proxy is the **translator** — env vars (ADAPTER_* ->
  TRANSLATOR_*), user-facing strings, matrix notes, OpenAPI spec, docs,
  comments, and test fixture hostnames.
- The `src/server` types are the **server** — AdapterConfig/Deps/Error and
  adapterErrors become ServerConfig/Deps/Error and serverErrors. Naming them
  Translator* would collide with the narrower `src/translator` module.
- Whole-product framing is the **toolkit** — AGENTS.md's paired model,
  CONTRIBUTING.md, and the issue templates cover all three tools, not just
  the translator.

Also: openapi/twilio-compat-adapter.yml -> twilio-compat.yml,
scripts/bench-adapter-overhead.ts -> bench-translator-overhead.ts, and the
stale bw-voice-adapter repo URL in the issue-template config.

BREAKING: TRANSLATOR_ACCOUNT_SID, TRANSLATOR_AUTH_TOKEN,
TRANSLATOR_CAPTURE_DIR, and TRANSLATOR_LOG replace their ADAPTER_*
equivalents. Existing deployments must update their environment.
@kshahbw
kshahbw requested review from a team as code owners August 20, 2026 18:37
@kshahbw kshahbw changed the title chore: replace "adapter" with "translator" throughout SWI-11363 chore: replace "adapter" with "translator" throughout Aug 20, 2026
@bwappsec

bwappsec commented Aug 20, 2026

Copy link
Copy Markdown

Snyk checks have passed. No issues have been found so far.

Status Scan Engine Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues
Code Security 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@kshahbw
kshahbw merged commit b3a076d into main Aug 21, 2026
6 checks passed
@kshahbw
kshahbw deleted the chore/rename-adapter-to-translator branch August 21, 2026 14:04
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.

3 participants