Skip to content

Translate CLI with Copilot CLI provider - #2

Merged
ivorb merged 4 commits into
ivorb-pptx-to-html-localizationfrom
ivorb-translate-integration
Nov 4, 2026
Merged

ivorb merged 4 commits into
ivorb-pptx-to-html-localizationfrom
ivorb-translate-integration

Conversation

@ivorb

@ivorb ivorb commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Stacked on #1 (base is that branch; retarget to main after #1 merges).

What

tools/translate.mjs translates a deck's strings.json into strings.<lang>.json, following docs/string-table.md. Built in a separate session, rebased onto the converter branch (the only conflict was README), and extended here.

  • New copilot provider, now the default. Runs the GitHub Copilot CLI non-interactively, so translation uses the models included with a Copilot subscription: no API key, nothing to configure beyond signing in once. Tools, MCP servers and custom instructions are disabled, so the model can only answer; the prompt goes in on stdin.
  • Generic OpenAI-compatible provider and an offline mock provider stay available. GitHub Models was retired on 2026-07-30, so it is not offered.
  • Incremental (only new or changed strings), validated (tags and hrefs must survive; one retry, then skip and fall back to source), exit code 2 if anything was skipped.
  • Adds strings.de.json for the 5-slide sample deck so deck.html?d=sample-ai-apps&lang=de works.

Checked

  • node --test: 37 pass (converter tests + 26 translate tests + 2 new provider tests, no network).
  • Mock run on the sample deck: 120 strings, second run keeps all 120.
  • Live run via the Copilot CLI on the sample deck into German: 120/120 translated, 0 skipped, about 45 s. Spot-checked quality (idioms, alt text, copyright line) and viewed the result in the deck.

Not done

Only German was tried live; RTL languages and large decks (about 1,000 strings) are untested live. Batches run sequentially.

@ivorb
ivorb marked this pull request as ready for review November 4, 2026 20:03
@ivorb
ivorb merged commit c0b161b into ivorb-pptx-to-html-localization Nov 4, 2026
2 checks passed
@ivorb
ivorb deleted the ivorb-translate-integration branch November 4, 2026 20:05
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.

1 participant