# qtran - Quick Translation Tool

An enhanced PySide6/QML fork of [Tran](https://github.com/Borber/Tran), originally created by Borber. This implementation provides a lightweight, cross-platform translation experience with a focus on clean architecture and performance.

![Screenshots](images/screenshots.png)

## Features

- **Quick Translation**: Double-click `Ctrl` or `Shift` to translate selected text instantly.
- **Multiple Modes**: Support for Google Translate and custom Mirror modes.
- **Clean UI**: Beautiful, minimalist interface built with QML.
- **Dark/Light Themes**: Automatic and manual theme switching.
- **Pinned Mode**: Keep the translation window on top when needed.
- **Language Detection**: Smart language switching based on source text.

## Architecture

This fork features a clean, modular architecture:

- `tran.core`: Core business logic including configuration, translation services, and input monitoring.
- `tran.ui`: UI-related logic such as system tray management.
- `tran.resources`: Static assets including QML files and icons.
- `tran.app`: Application lifecycle management and coordination.

## Installation

Recommended installation method via [uv](https://github.com/astral-sh/uv):

```bash
uv tool install qtran
```

Alternatively, via pip:

```bash
pip install qtran
```

## Usage

Run the application:

```bash
qtran
```

- **Translate**: Select text and double-click the configured shortcut (`Ctrl` by default).
- **Hide**: Press `Esc` or click outside the window (if not pinned).
- **Settings**: Right-click the system tray icon to change themes, modes, shortcuts, and default languages.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
