A beautiful, lightweight desktop app that translates selected text between Japanese and English using Cloudflare Workers AI with Gemma 3. Works anywhere on your Mac with a global hotkey (Cmd+J).
Cloud-Powered: Powered by Cloudflare Workers AI for accurate translations. Requires internet connection.
✨ Global Hotkey Translation
- Press
Cmd+Janywhere on your Mac to translate selected text - Works in any app (Slack, Gmail, browsers, etc.)
🎯 Smart Language Detection
- Automatically detects if text is Japanese or English
- Translates to the opposite language
☁️ Cloud-Powered
- Uses Cloudflare Workers AI with Gemma 3 model (140+ languages)
- Requires internet connection
- Powered by global edge network for low latency
- Your translations are processed by Cloudflare (see their privacy policy)
🎨 Beautiful UI
- Cute floating overlay with llama mascot 🦙
- Auto-hides after 10 seconds
- Copy translation with one click
- Smooth animations
⚡ Zero Setup
- Cloud-based, nothing to install except the app
- Works immediately after download
- Automatic configuration from Cloudflare Worker URL
- macOS (M1/M2/M3 or Intel)
- Node.js 16+ (for development)
- Rust 1.70+ (for building)
- Internet connection (for translations)
First, set up the translation backend by deploying a Cloudflare Worker:
- Go to https://dash.cloudflare.com
- Navigate to Workers & Pages → Create application → Create Worker
- Name it:
translator-proxy - Copy the Worker code from the plan documentation
- Paste into the Worker editor and deploy
- Copy your Worker URL:
https://translator-proxy.<your-account>.workers.dev
# Clone the repo
git clone https://github.com/yourusername/japanese-slack-translator.git
cd japanese-slack-translator
# Install dependencies
npm install
# Install Cargo
curl https://sh.rustup.rs -sSf | sh
# Start development (hot reload)
npm run tauri dev
# Or build for production
npm run tauri buildThe built app will be in src-tauri/target/release/bundle/.
- Select any text (Japanese or English)
- Press Cmd+J (Ctrl+J on Windows)
- Translation appears in the overlay
- Click "Copy" or wait 10 seconds to auto-hide
On first run, macOS may ask for Accessibility permissions:
- Go to System Settings → Privacy & Security → Accessibility
- Add your Terminal app to the list
- Restart the app
Create a .env file in the project root with your Cloudflare Worker URL:
# Your Cloudflare Worker URL (from step 1)
WORKER_URL=https://translator-proxy.<your-account>.workers.devReplace <your-account> with your Cloudflare account subdomain.
- src/App.tsx - Main app container
- src/components/TranslationOverlay.tsx - Translation result display
- src-tauri/src/lib.rs - Application setup & hotkey registration
- src-tauri/src/commands.rs - Tauri commands (translation)
- src-tauri/src/translation.rs - Cloudflare Worker integration
- src-tauri/src/config.rs - Configuration management
- src-tauri/src/clipboard_manager.rs - Smart clipboard handling
- Hotkey Detection: Global hotkey listener catches Cmd+J
- Clipboard Capture: Simulates Cmd+C to copy selected text
- Language Detection: Analyzes character ranges (Hiragana, Katakana, Kanji)
- Translation: Sends text to Cloudflare Worker proxy for translation
- Display: Shows result in overlay, user can copy
- Cleanup: Restores original clipboard content
npm install # Install Node dependencies
cargo check # Verify Rust setupnpm run tauri devThis opens the app with hot reload for frontend changes.
npm run build # TypeScript check
cargo check # Rust checknpm run tauri buildOutput: src-tauri/target/release/bundle/
All MacBooks:
- Translation latency: 1-2 seconds (network + cloud processing)
- Powered by Cloudflare's global edge network for low latency
- Memory: Minimal (cloud processing)
- CPU: Minimal (only clipboard + UI operations)
Requirements:
- Stable internet connection (required for translations)
- Cloudflare Worker endpoint must be reachable
- Check your internet connection
- Verify your Cloudflare Worker is deployed and running
- Check your
WORKER_URLin.envis correct
Go to System Settings → Privacy & Security → Accessibility and add your Terminal app.
- Check your internet connection speed
- Cloudflare Workers have global edge deployment, so latency is usually <1s
- If translations are slow, it may be a network issue on your end
- Gemma 3 is a high-quality model (12B parameters)
- If translations seem off, try rephrasing your input
- The model is multilingual and optimized for 140+ languages including Japanese
Contributions welcome! Please:
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing-thing) - Commit your changes (
git commit -m 'Add amazing thing') - Push to the branch (
git push origin feature/amazing-thing) - Open a Pull Request
- Additional language support
- Performance optimizations
- Better error messages
- UI improvements
- Translation quality tweaks
- Windows/Linux support
MIT License - see LICENSE file for details
TL;DR: Use it however you want, commercially or personally, just include the license notice.
- Cloudflare Workers AI - Cloud-based AI translation
- Google Gemma 3 - Language model
- Tauri - Desktop app framework
- React - UI library
✅ No telemetry ✅ Cloud-based processing (via Cloudflare) ✅ No credentials in desktop app (API token stays server-side) ✅ Rate limiting (100 requests/hour per IP) ✅ Open source (inspect the code)
- Windows support
- Linux support
- Additional language pairs (Spanish, French, etc.)
- Translation history
- Custom translation styles (formal, casual, etc.)
- Voice input/output
- Batch file translation
Made with ❤️ for translating between Japanese and English.