feat translator: add transcription translation hotkey via OpenRouter + translate target language#729
Closed
Alexintosh wants to merge 2 commits intocjpais:mainfrom
Closed
feat translator: add transcription translation hotkey via OpenRouter + translate target language#729Alexintosh wants to merge 2 commits intocjpais:mainfrom
Alexintosh wants to merge 2 commits intocjpais:mainfrom
Conversation
Owner
|
#355 was merged yesterday, I think this should suffice for the time being I don't want to add many shortcuts without better UI to support all the features people want. |
Author
|
sounds good, personally I'd love to have a shortcut for each one of the postprocessing prompts. |
Owner
|
I understand, UI needs to be thought out first |
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.
This PR adds an optional “translate after transcription” flow powered by an LLM (OpenRouter), alongside a target-language selector.
What changed
• Added a new shortcut binding: Transcribe with Translation (transcribe_with_translation).
• Added a new setting: Translate To (translate_target_language).
• Implemented translation post-action using OpenRouter (reuses existing Post-Process provider config: post_process_api_keys["openrouter"] and post_process_models["openrouter"], with a fallback model when unset).
• Added ${translate_target_language} variable support in Post Process prompt templates (alongside ${output}).
• Added overlay state "translating" so the overlay shows “Translating…” during the OpenRouter request.
How to configure / use
• Set Translate To in settings.
• Configure OpenRouter in the existing Post Process settings (behind the Post-Processing toggle), then use the Translate hotkey.
Testing
• Manual testing (macOS): verified translation hotkey works once OpenRouter key/model are configured; verified overlay shows “Translating…” during the API call.
• Automated:
• bun run lint
• bun run format:check
• bun run build
• cargo +1.88.0 test
• cargo +1.88.0 clippy --all-targets (passes; warnings exist in repo)
AI Assistance Disclosure
• AI used: Yes
• Extent: helped design and implement the feature end-to-end