Repository navigation
Conversation
Add Control-Option-T region translation and library screenshot text translation using the rendered image. Keep OCR intermediates out of the clipboard on failure or cancellation. Validation: swift build; OCR/translation checks (157 each in default and English); hotkey, history, image translation and image translation integration scripts passed. Live translation providers and multi-display capture still require manual acceptance.
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.
Summary
Adds two standalone text-action workflows alongside Snapok's existing image OCR and image translation:
Control–Option–O): drag and release to recognize text locally with Apple Vision; choose preserved line breaks, smart paragraphs, or a single line.Control–Option–Shift–O): read accessible text selected in another application and translate using Baidu General Text Translation or the system on-device provider.Region OCR extracts text only; it does not automatically translate the captured region. This PR does not claim to introduce OCR or translation to Snapok for the first time.
Permissions, privacy, and compatibility
Scope
Based on upstream
devatc7012ac. Contains 12 files: 11 feature/integration/test files and one usage document.Explicitly excludes local code-signing certificate lookup/fallback changes, developer install/start scripts, local permission resets, unrelated component-snapping changes, and scrolling-stitch test changes. No dependency changes.
Validation
git diff --checkpassed.swift build -c debug, but their final exit statuses/output were not retained in the resumed session. They were not rerun during this continuation.bash scripts/test-ocr.sh(default-language and English passes) and regression scripts in a reproducible environment.The OCR suite uses injected translation functions and isolated pasteboards; it does not replace live-provider, language-pack, or cross-application permission testing.
Documentation
See
docs/text-actions.mdfor usage, privacy, defaults, limitations, and testing instructions.