No description
  • C 63%
  • Python 18.4%
  • Shell 12.1%
  • CMake 6.5%
Find a file
MoDD0 d4d40cfe42
Some checks failed
CI / quick-check (push) Has been cancelled
CI / build-and-test (push) Has been cancelled
feat: release 1.2.2 — dark-mode readability fix for translated mail
Wrap translator output in a minimal HTML document with explicit
color-scheme: light + white background before loading into the
message view. Without this wrapper e_web_view_load_string()
loads the content raw and WebKit applies its dark UA stylesheet
on dark desktops (KDE Breeze Dark, GNOME dark preference) —
making white mails flip to dark on translate, hurting readability.

Cache stores the raw translation; the wrap is applied at load
time, so it is idempotent across cache hits. Restore-original
goes through Evolution's normal pipeline and is unaffected.

Mails carrying their own inline body styling (e.g. dark-themed
newsletters) keep their look — inline styles outrank the
wrapper's CSS rule via specificity.

Long-standing readability bug inherited from the upstream
project (costantinoai/evolution-mail-translate); never fixed
there.
2026-05-20 22:58:26 +02:00
.github/workflows ci: prevent CI workflow from triggering on release tags 2025-11-06 23:31:40 +01:00
data feat: release 1.2.0 — toolbar button and custom keyboard shortcut 2026-03-01 16:23:48 +01:00
debian feat: release 1.2.2 — dark-mode readability fix for translated mail 2026-05-20 22:58:26 +02:00
docs feat: release 1.2.2 — dark-mode readability fix for translated mail 2026-05-20 22:58:26 +02:00
scripts repo: make release preparation script public 2025-11-06 16:33:24 +01:00
src feat: release 1.2.2 — dark-mode readability fix for translated mail 2026-05-20 22:58:26 +02:00
tools/translate feat: release 1.2.1 — Evolution 3.60 verified, optional CPU quantization 2026-05-04 15:22:54 +02:00
.gitattributes docs: integrate CONTRIBUTING into docs/DEVELOPER_GUIDE.md; add docs/USER_GUIDE.md and docs/CHANGELOG.md; ignore tests/ folder to keep local tests untracked; keep CI build and release workflows unchanged. 2025-11-06 12:19:23 +01:00
.gitignore chore: explicitly gitignore CLAUDE.md alongside .claude/ 2026-05-04 15:53:32 +02:00
cmake_uninstall.cmake.in Add CMake build system 2025-11-06 03:36:53 +01:00
CMakeLists.txt feat: release 1.2.2 — dark-mode readability fix for translated mail 2026-05-20 22:58:26 +02:00
LICENSE legal: add complete LGPL-2.1 license text 2025-11-06 16:24:44 +01:00
README.md feat: release 1.2.2 — dark-mode readability fix for translated mail 2026-05-20 22:58:26 +02:00
requirements.txt feat: add multi-provider translation support with deep-translator 2025-11-06 23:17:21 +01:00

Moddo Evolution Translator

Offline email translation for GNOME Evolution using ArgosTranslate

Latest release Release date Last commit License Documentation

🆕 Latest: v1.2.2 — Dark-mode readability fix: translated mails no longer flip to a dark background under dark GTK themes (KDE Breeze Dark, GNOME dark preference). Previous release (v1.2.1) verified the plugin on GNOME Evolution 3.60.1 and added optional CPU quantization (ARGOS_COMPUTE_TYPE=int8). See the release notes or the full CHANGELOG.

Tested on Manjaro Linux with GNOME Evolution 3.58.3 and 3.60.1. Originally forked from costantinoai/evolution-mail-translate, extended and maintained independently. Compatibility with Evolution ≥ 3.56's new EUIManager API was the original motivation — see Changes from upstream.

Overview

This Evolution extension adds instant, privacy-preserving email translation directly within GNOME Evolution. Translate foreign language emails to your preferred language with a single click—all processing happens locally on your machine with no data ever leaving your computer.

Key Features

  • One-Click Translation: Translate emails directly from the toolbar, menu, or keyboard shortcut
  • Toggle back instantly: Press the shortcut (or click the toolbar button) again to restore the original
  • 100% Offline & Private: Uses local translation models (ArgosTranslate), no internet required, no data transmitted
  • Toolbar button: Translate icon appears next to Reply/Forward in the mail toolbar
  • Custom keyboard shortcut: Default Alt+Shift+T, fully configurable in Translate Settings
  • Install-on-Demand: Automatically downloads missing translation models as needed
  • HTML Email Support: Preserves formatting, styles, and structure in translated emails
  • Auto Language Detection: Automatically detects source language
  • 50+ Languages: Supports translation between 50+ language pairs
  • GPU Acceleration: Automatically uses CUDA when available for faster translation

Quick Start

Installation

No prebuilt packages yet. All distros currently install via build-from-source. Prebuilt .deb and an AUR package are on the roadmap (alongside our v1.5 release). If you want a .deb locally, run cd build && cpack -G DEB after the build step below — it'll produce moddo-evolution-translator_1.2.2-1_<arch>.deb you can apt install ./....

Ubuntu / Debian

# 1. Install build dependencies
sudo apt install cmake pkg-config evolution-dev evolution-data-server-dev \
  python3 python3-venv python3-pip

# 2. Clone and build
git clone https://github.com/MoDD0/moddo-evolution-translator.git
cd moddo-evolution-translator
./scripts/install-from-source.sh

# 3. Restart Evolution
killall evolution 2>/dev/null || true
evolution &

Manjaro / Arch Linux

Tested on Manjaro with GNOME Evolution 3.58.3 and 3.60.1. On Arch-based distros the evolution package already includes development headers, so no separate -dev package is needed.

# 1. Install build dependencies
sudo pacman -S --needed cmake pkgconf python python-pip

# 2. Clone and build
git clone https://github.com/MoDD0/moddo-evolution-translator.git
cd moddo-evolution-translator
./scripts/install-from-source.sh

# 3. Restart Evolution
killall evolution 2>/dev/null || true
evolution &

Notes:

  • Evolution only loads modules from /usr/lib*/evolution/modules/, so installation requires sudo
  • The module is installed to /usr/lib*/evolution/modules/libtranslate-module.so
  • Python helper scripts are installed to /usr/share/evolution-translate/translate/
  • Python environment and models are per-user: run evolution-translate-setup to create a venv under ~/.local/lib/evolution-translate/venv and install models under ~/.local/share/argos-translate/packages/

Uninstall:

# From the repository directory
./scripts/uninstall.sh

See USER_GUIDE.md for detailed installation instructions and all available methods.

Usage

  1. Select an email and press Alt+Shift+T — or click the Translate button in the toolbar
  2. Press the same shortcut (or click the toolbar button) again to toggle back to the original
  3. Configure settings in EditTranslate Settings
    • Change the target language, translation provider, or keyboard shortcut

See USER_GUIDE.md for complete usage documentation.

Documentation

Settings

Open “Translate Settings” via Edit → Translate Settings.

  • Target language: Choose your default translation target
  • Provider: Argos Translate (offline) or Google Translate (online)
  • Translate shortcut: Customize the keyboard shortcut (default: Alt+Shift+T). Takes effect after restarting Evolution.
  • Install models on demand: If enabled, missing Argos models are downloaded automatically the first time a pair is needed
  • Python venv: Create and manage your per-user venv with evolution-translate-setup (installs Python deps and optionally models)

Tip: You can also set environment variables for development overrides:

  • TRANSLATE_HELPER_PATH to point to a local translate_runner.py
  • TRANSLATE_PYTHON_BIN to point to a specific Python interpreter
  • ARGOS_COMPUTE_TYPE to opt into ctranslate2 quantization for faster CPU translation. Recommended: int8 (or int8_float32 for slightly higher quality). Default is argos's auto. Invalid values fall back to default.

Security & Privacy

  • No Data Transmission: All translation happens locally; message content never leaves your machine
  • Body Only: Only email body is processed; headers, addresses, and attachments are never touched
  • Open Source Models: Uses transparent, auditable open-source translation models
  • No API Keys: No accounts, no tracking, no telemetry

Requirements

  • GNOME Evolution ≥ 3.36
  • Python 3.8+
  • CMake 3.10+ (for building from source)

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

License

This project follows the same LGPL-2.1+ licensing model as the Evolution example module files.

Changes from upstream

This fork fixes two issues that prevent the plugin from building and running on Evolution ≥ 3.56 (which ships with Manjaro, Fedora, and other rolling-release distros):

1. e_ui_manager_add_actions_with_eui_data API change

Evolution 3.56 reduced the function from 10 arguments to 7. The name string, -1 length, and &error parameters were removed, and user_data moved before eui:

/* Old (Evolution < 3.56) */
e_ui_manager_add_actions_with_eui_data(ui_manager, group, domain,
    entries, n_entries, "ui-name", eui_def, -1, user_data, &error);

/* New (Evolution ≥ 3.56) */
e_ui_manager_add_actions_with_eui_data(ui_manager, group, domain,
    entries, n_entries, user_data, eui_def);

2. EUI XML format for custom submenus

The new EUI parser requires <submenu action='...'> referencing a registered action. The old <submenu id='...'> with <attribute name='label'> and after= attributes are no longer valid. Custom plugin menus must use the custom-menus placeholder:

<eui>
  <menu id='main-menu'>
    <placeholder id='custom-menus'>
      <submenu action='translate-menu'>
        <item action='translate-message-action'/>
        ...
      </submenu>
    </placeholder>
  </menu>
</eui>

The submenu header (translate-menu) must be registered as an EUIActionEntry with a NULL activate callback.

Why a separate project?

This started as a fork of costantinoai/evolution-mail-translate. While extending it, we noticed the upstream project independently tagged their own v1.2.0 release with different content — making it clear that the two projects had diverged enough to warrant a distinct identity rather than risk confusing users about which v1.2.0 is which.

The rename to Moddo Evolution Translator reflects that this is now an independently maintained project, not just a patch on top of the original.

Credits