Skip to content

[codex] fix macOS app translation flow - #15

Merged
MarsDoge merged 7 commits into
mainfrom
codex/fix-macos-menu-translation
Apr 25, 2026
Merged

MarsDoge merged 7 commits into
mainfrom
codex/fix-macos-menu-translation

Conversation

@MarsDoge

@MarsDoge MarsDoge commented Apr 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fixes the macOS menu-bar app translation flow after installing the app to /Applications/LLMTranslateMac.app.

  • Sets explicit status-menu item targets so menu actions do not depend on responder-chain dispatch.
  • Adds Test Translation and Show Diagnostics menu items for separating provider/CLI issues from selected-text permission issues.
  • Installs the app to a stable /Applications/LLMTranslateMac.app path via build-app.sh --install.
  • Signs the generated app bundle with a stable bundle identifier for macOS Accessibility permissions.
  • Bundles the existing bin/ and lib/ CLI resources inside the app so /Applications/LLMTranslateMac.app is self-contained.
  • Defaults the app to mymemory whenever LLM_TRANSLATE_PROVIDER is not explicitly configured.
  • Improves error reporting, writes diagnostics to ~/Library/Logs/LLMTranslateMac.log, and fixes result panel text visibility.

Why

The app could launch while translation failed or appeared blank because the installed /Applications app could not reliably find the repository CLI, menu dispatch was ambiguous, and errors were surfaced as generic Swift enum messages. Accessibility permission also needs a stable app path and bundle identity.

Validation

  • swift build in macos/LLMTranslateMac
  • ./scripts/build-app.sh --install in macos/LLMTranslateMac
  • bash -n macos/LLMTranslateMac/scripts/build-app.sh
  • shellcheck macos/LLMTranslateMac/scripts/build-app.sh
  • Bundle CLI smoke test: printf 'Hello, world!' | /Applications/LLMTranslateMac.app/Contents/Resources/llm-translate/bin/llm-translate -p mymemory -t zh-CN
  • Local app log confirmed Test Translation succeeded: 您好,世界!

@MarsDoge MarsDoge changed the title [codex] fix macOS menu translation actions [codex] fix macOS app translation flow Apr 25, 2026
@MarsDoge
MarsDoge marked this pull request as ready for review April 25, 2026 06:21
@MarsDoge
MarsDoge merged commit d25c02a into main Apr 25, 2026
1 check passed
@MarsDoge
MarsDoge deleted the codex/fix-macos-menu-translation branch April 25, 2026 06:21
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