Skip to main content

Minimalist offline document translator (PyQt5 + Argos Translate)

Project description

Argonaut

Minimalist document translator with a Qt (PyQt5) interface that uses argos-translate-files as an offline translation engine.

Requirements

pip install PyQt5 argostranslate argos-translate-files langdetect

You need at least one language package installed, for example:

argospm update
argospm install translate-en_es

Usage

From a checkout:

python3 -m argonaut

Or install it (provides the argonaut command):

pip install argonaut-translator

Structure

All modules live in the src/argonaut/ package:

  • __init__.py — package version (__version__).
  • main.py — entry point; silences dependency warnings and launches the window.
  • window.py — main window (PyQt5).
  • worker.py — thread that translates the file list and emits progress signals.
  • pdf.py — fixed PDF translator (paragraphs, progress, cancellation).
  • translation.py — language detection, supported formats and the progress/cache wrapper.
  • i18n.py — interface languages (English by default, Spanish, French, German, Italian and Portuguese).

Packaging lives at the top level: pyproject.toml (PyPI), io.github.nibblex.Argonaut.yml (Flatpak manifest) and data/ (desktop entry, AppStream metainfo and icon for Flathub).

Interface language

The interface starts in English. In the Language menu you can switch to Spanish, French, German, Italian or Portuguese; the change applies instantly and the preference is saved (QSettings) for future launches. To add a language just add its dictionary in i18n.py (missing keys fall back to English). The Help menu includes "About Argonaut", showing the version, a short description of the project, the translation engine, the supported formats, the author and the license.

Persistent settings

When the window closes, QSettings stores — besides the interface language — the source and target languages, the output folder and the window size/position; everything is restored on the next launch. If a saved language is no longer installed or the folder no longer exists, the default value is used.

  1. Choose the source and target languages (⇄ button to swap them). By default the source is "Detect language": each document's language is detected automatically, so you can mix files in different languages in the same batch.
  2. Drag documents onto the window or add them with "Add…".
  3. Optionally pick a folder with "Output…" where all translations are saved (× returns to the default behaviour: next to each original).
  4. Press "Translate". Each translated file is saved with the target language suffix (e.g. report_es.docx).
  5. During translation you can press "Cancel": the operation stops (even mid-file) and the files already translated are kept.

Note about PDFs: they are translated paragraph by paragraph while preserving the layout, so a long document can take a while on CPU. The bar shows the real percentage of translated paragraphs. Rotated text (e.g. vertical watermarks) is kept untranslated, and links from the original document are not preserved in the translated copy.

Supported formats: .txt .docx .odt .odp .pptx .epub .html .srt .pdf

Releasing

To publish a new version, bump __version__ in src/argonaut/__init__.py and add a <release> entry in data/*.metainfo.xml.

PyPI

pip install build twine
python3 -m build
twine upload dist/*

Flathub

The manifest is io.github.nibblex.Argonaut.yml. Flathub builds have no network access, so the Python dependencies must be pinned first with flatpak-pip-generator:

python3 flatpak-pip-generator --requirements-file=requirements.txt \
    --output python3-requirements

Test locally, then lint:

flatpak-builder --user --install --force-clean build-dir \
    io.github.nibblex.Argonaut.yml
flatpak run --command=flatpak-builder-lint org.flatpak.Builder \
    manifest io.github.nibblex.Argonaut.yml

First submission: take a screenshot for the metainfo (see the TODO in data/*.metainfo.xml), then open a PR against flathub/flathub (branch new-pr) adding the manifest, per the submission guide.

Author and license

© 2026 Sergio Rodríguez.

This project is distributed under the GNU GPL v3 license, in line with the license of PyQt5, which the interface depends on.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

argonaut_translator-1.0.0.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

argonaut_translator-1.0.0-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file argonaut_translator-1.0.0.tar.gz.

File metadata

  • Download URL: argonaut_translator-1.0.0.tar.gz
  • Upload date:
  • Size: 30.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for argonaut_translator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8c24d500281f25be47c6b0340794af2eb75cd5afff85127b4917441b772672dd
MD5 4fbb464ae63e1eaf88a16b47e51ed536
BLAKE2b-256 f0953e2a96a10d6fbe95a96ea0a698b98fa8ec5c073eb39c2d7d9589d377eef2

See more details on using hashes here.

File details

Details for the file argonaut_translator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for argonaut_translator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3903b178634eca1ca33c51c7722e8b997d83d29f48278ee6d499ef9ba34d8d4a
MD5 8549573aed1f8f815ade40f6bcc98719
BLAKE2b-256 a1c364557059e74cc5a695532ddf454732144cf5f249221787a3300b8a96437e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page