Skip to main content

Translate .po files using local LLMs via Ollama

Project description

Fluxlate 🌀

Fluxlate is a powerful CLI tool designed to translate .po files using local Large Language Models (LLMs) via Ollama. It focuses on maintaining the structure of your localization files while providing high-quality translations for any target language.

Features

  • 🚀 Local Translation: No API keys required. Uses local models via Ollama.
  • 📦 Structured Output: Forces JSON output from LLMs to ensure reliable extraction.
  • 🔄 Plural Support: Correctly handles plural forms (msgid_plural).
  • 🛠️ Placeholder Preservation: Keeps %1, %{item}, etc., intact.
  • Differential Updates: Skips already translated entries by default (use --force to overwrite).
  • 🔍 Verbose Debugging: Step-by-step visibility into LLM responses.

Installation

pip install fluxlate

Ensure you have Ollama installed and the ministral-3:3b model (or your preferred model) pulled:

ollama pull ministral-3:3b

Quick Start

Translate a file

fluxlate translate path/to/messages.po --language Hebrew

Options

  • -l, --language TEXT: Specify the target language (default: Hebrew).
  • -o, --output TEXT: Specify a custom output path.
  • -f, --force: Overwrite existing translations.
  • -v, --verbose: Show raw LLM input/output.

List available inputs

If you have a project structure with llm_translator_agent/data/input/, you can list files:

fluxlate list-inputs

Development

  1. Clone the repository:

    git clone https://github.com/ereli/Fluxlate.git
    cd Fluxlate
    
  2. Install dependencies using uv:

    uv sync
    
  3. Run tests:

    uv run pytest
    

License

MIT

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

fluxlate-0.1.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

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

fluxlate-0.1.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file fluxlate-0.1.0.tar.gz.

File metadata

  • Download URL: fluxlate-0.1.0.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fluxlate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1c95d8dfa6ab9c081991b0efce63a7085e681d690f5a182d812e2d9fce9b3f2d
MD5 f5a3e2d15e6817812366765e182e1fee
BLAKE2b-256 006ce975c5c00e1c36981a25e7003c21952709d1af72744b9ff4b6c9698859ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for fluxlate-0.1.0.tar.gz:

Publisher: publish.yml on ereli/Fluxlate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fluxlate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fluxlate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fluxlate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 80cd98d739193c2966e5780397ee03fbc53598c5cd1139b3c7febb2db51b960a
MD5 f03f556cf688ee20d4688148d40a94e3
BLAKE2b-256 3c6d012bcf62594e4606041d32454e461dd871069acde0159d399b0198fbc83e

See more details on using hashes here.

Provenance

The following attestation bundles were made for fluxlate-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ereli/Fluxlate

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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