|
| 1 | +# Pro Translator |
| 2 | + |
| 3 | +A powerful menu bar application for macOS and Windows and Linux that allows you to instantly translate selected text using AI language models. Built with Electron. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- **Quick Translation**: Translate selected text from any application with a customizable keyboard shortcut |
| 10 | +- **Support for Multiple Languages**: Translate to Persian, English, and more languages |
| 11 | +- **AI-Powered Translation**: Uses advanced AI models through OpenRouter API |
| 12 | +- **Menu Bar Integration**: Stays in your menu/system tray for easy access |
| 13 | +- **Text Selection Tools**: Select, copy, and save specific portions of translations |
| 14 | +- **Dark Mode Support**: Seamlessly integrates with your system theme |
| 15 | +- **Multiple Translation Methods**: |
| 16 | + - Keyboard shortcut (Control+Shift+Q on macOS, Control+Q on Windows) |
| 17 | + - Direct input through the "Translate Now" window |
| 18 | + - Menu bar/tray context menu |
| 19 | + |
| 20 | +## Installation |
| 21 | + |
| 22 | +### macOS |
| 23 | +1. Download the latest `.dmg` file from the [Releases](https://github.com/yourusername/pro-translator/releases) page |
| 24 | +2. Open the `.dmg` file and drag Pro Translator to your Applications folder |
| 25 | +3. Open Pro Translator from your Applications folder |
| 26 | +4. On first launch, you may need to allow accessibility permissions |
| 27 | + |
| 28 | +### Windows |
| 29 | +1. Download the latest `Pro Translator Setup x.x.x.exe` from the [Releases](https://github.com/yourusername/pro-translator/releases) page |
| 30 | +2. Run the installer and follow the on-screen instructions |
| 31 | +3. Launch Pro Translator from the Start menu |
| 32 | + |
| 33 | +## Usage |
| 34 | + |
| 35 | +### Setting up the API Key |
| 36 | +1. Click on the "PT" icon in the menu bar/system tray |
| 37 | +2. Select "Settings" |
| 38 | +3. Enter your OpenRouter API key |
| 39 | +4. Choose your preferred target language |
| 40 | +5. Click "Save Settings" |
| 41 | + |
| 42 | +You can get an API key from [OpenRouter](https://openrouter.ai/). |
| 43 | + |
| 44 | +### Translating Text |
| 45 | +1. Select text in any application |
| 46 | +2. Press the keyboard shortcut (default: Control+Shift+Q on macOS, Control+Q on Windows) |
| 47 | +3. A translation window will appear with the original and translated text |
| 48 | +4. Use the "Copy Translation" button to copy the result to your clipboard |
| 49 | + |
| 50 | +### Direct Translation |
| 51 | +1. Click on the "PT" icon in the menu bar/system tray |
| 52 | +2. Select "Translate Now" |
| 53 | +3. Enter or paste text in the input field |
| 54 | +4. Choose the target language |
| 55 | +5. Click "Translate" |
| 56 | + |
| 57 | +### Text Selection Features |
| 58 | +- Select specific portions of the translated or original text |
| 59 | +- Use the selection status bar to see character count |
| 60 | +- Copy selected portions with one click |
| 61 | +- Context menu support for additional options |
| 62 | + |
| 63 | +## Development |
| 64 | + |
| 65 | +### Prerequisites |
| 66 | +- Node.js (v16 or later) |
| 67 | +- npm |
| 68 | + |
| 69 | +### Setup |
| 70 | +1. Clone the repository |
| 71 | +```bash |
| 72 | +git clone https://github.com/yourusername/pro-translator.git |
| 73 | +cd pro-translator |
| 74 | +``` |
| 75 | + |
| 76 | +2. Install dependencies |
| 77 | +```bash |
| 78 | +npm install |
| 79 | +``` |
| 80 | + |
| 81 | +3. Run the application in development mode |
| 82 | +```bash |
| 83 | +npm start |
| 84 | +``` |
| 85 | + |
| 86 | +### Building |
| 87 | +- Build for all platforms: `npm run build:all` |
| 88 | +- Build for macOS: `npm run build:mac` |
| 89 | +- Build for Windows: `npm run build:win` |
| 90 | +- Build for Linux: `npm run build:linux` |
| 91 | + |
| 92 | +## Technical Details |
| 93 | + |
| 94 | +Pro Translator is built with: |
| 95 | +- Electron |
| 96 | +- Node.js |
| 97 | +- Electron Store (for settings persistence) |
| 98 | +- OpenRouter API for AI translation |
| 99 | + |
| 100 | +The application interfaces with the clipboard to capture selected text and uses platform-specific methods to ensure proper text selection across different operating systems. |
| 101 | + |
| 102 | +## License |
| 103 | + |
| 104 | +This project is licensed under the MIT License - see the LICENSE file for details. |
| 105 | + |
| 106 | +## Acknowledgements |
| 107 | + |
| 108 | +- [OpenRouter](https://openrouter.ai/) for providing the AI translation API |
| 109 | +- [Electron](https://www.electronjs.org/) for the cross-platform framework |
| 110 | +- [Vazirmatn](https://github.com/rastikerdar/vazirmatn) font for Persian text rendering |
0 commit comments