Skip to content

feat: add dedicated translation dictation mode#1144

Draft
adamholter wants to merge 3 commits into
OpenWhispr:mainfrom
adamholter:codex/translate-mode
Draft

feat: add dedicated translation dictation mode#1144
adamholter wants to merge 3 commits into
OpenWhispr:mainfrom
adamholter:codex/translate-mode

Conversation

@adamholter

Copy link
Copy Markdown
Contributor

What changed

  • adds a first-class translation dictation route that is distinct from cleanup and voice-agent behavior
  • supports up to five saved target languages, fast active-target switching, and a dedicated configurable shortcut
  • uses an instruction-resistant translation prompt and works even when ordinary cleanup is disabled
  • preserves source and translated transcript versions and labels the target in History
  • fails closed when translation is unavailable or returns empty output, so untranslated source text is never silently pasted
  • supports globalShortcut plus the existing macOS/Linux native-listener, mouse, GNOME, and preload/IPC plumbing
  • updates all current locales

Why

Translation is possible today only as an ad hoc agent request. A dedicated mode makes source detection, target selection, shortcut behavior, history provenance, and failure handling predictable.

Validation

  • 270 passing tests, 0 failures, 5 macOS-expected Linux skips
  • formatting, TypeScript, i18n, and renderer build pass
  • focused target normalization, routing precedence, empty-output rejection, history persistence, and native-listener conflict coverage
  • headless end-to-end flow passed with cleanup disabled, success and provider-failure paths, target switching, shortcut persistence, history provenance, and zero console errors
  • streaming audit verifies failed translation cannot fall through to source text and batch fallback output is not translated twice

No visible Electron harness is used by this PR's current validation path.

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