Skip to main content

A library for automated directory translation

Project description

Lesia

DOI Tests GitHub Release

About

Lesia is a tool to help you maintain your multilingual documents that integrates easily into your workflow.

Features

  • Translate documents easily
  • Preserves syntax (LaTeX/Markdown/MyST/Typst)
  • Learns from your post-edits
  • Preserves terminology (you may provide your vocabulary)
  • Good quality translation
  • Integrates easily in any workflow
  • Easy to use for collaborative use (e.g. git)
  • Supports any LLM of your choice

Documentation

Installation

  1. Make sure you have uv installed
  2. Install it via uv uv tool install lesia
  3. Verify that it works lesia --help

Usage

  1. Create a directory dedicated for the project: mkdir my-dir
  2. cd my-dir
  3. Initialize the project lesia init
  4. Create a directory for the documents you want to translate mkdir -p src/fr
    • In this example our source language is French
  5. Move your files to the created source directory src/fr
  6. Create directories for target languages mkdir -p tgt/en, mkdir -p tgt/ua
  7. Associate source and target directories with desired languages
    lesia set-source srs/fr french
    lesia set-target tgt/en english
    lesia set-target tgt/ua ukrainian
    
  8. Mark files that should be translated lesia add src/fr/main.md
  9. Synchronize directories lesia sync
  10. Set a model you want to use for translation lesia set-llm google gemini-3.0-flash
  11. Set a token (if needed) export LLM_API_KEY=your-key
  12. Translate
    lesia translate all english
    lesia translate all ukrainian
    
  13. Learn more in the docs

Development

  1. Ensure you have uv tool installed (visit their site for the installation guide)
  2. Clone the repo: git clone https://github.com/DobbiKov/lesia
  3. Enter cd lesia
  4. Install dependencies uv sync
  5. Install tool from your directory and make it editable uv tool install -e .
  6. Enjoy

Contributing

The suggestions and pull requests are welcome.

Citation

If you use this software in your research or writing, please cite it as follows:

@software{korotenko_lesia_2026,
  author       = {Korotenko, Yehor},
  title        = {lesia},
  month        = jun,
  year         = 2026,
  publisher    = {Zenodo},
  version      = {v0.1.7},
  doi          = {10.5281/zenodo.20610935},
  url          = {https://doi.org/10.5281/zenodo.20610935}
}

French University Support

Free access to open-source models via ILaaS; no API key required for Paris-Saclay members if running your translations from MyDocker.

Credits

  • Nicolas M. Thiéry - for supervising this project.
  • LISN (Université Paris-Saclay) - for financing the internship and providing workspace.
  • CMA SaclAI-School - for financing the project.

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

lesia-0.1.8.tar.gz (146.9 kB view details)

Uploaded Source

Built Distribution

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

lesia-0.1.8-py3-none-any.whl (100.1 kB view details)

Uploaded Python 3

File details

Details for the file lesia-0.1.8.tar.gz.

File metadata

  • Download URL: lesia-0.1.8.tar.gz
  • Upload date:
  • Size: 146.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lesia-0.1.8.tar.gz
Algorithm Hash digest
SHA256 41801eae8868032df60ef1febe2f01e39a84547a6777eb3a206ed6ed8719e79d
MD5 1072d4383b4e01cc6d1cfdba4e199b9b
BLAKE2b-256 7bf891b283145ecff3907324ad2997eea4214d3e8fcde178319136359cfd6740

See more details on using hashes here.

Provenance

The following attestation bundles were made for lesia-0.1.8.tar.gz:

Publisher: release.yml on DobbiKov/lesia

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

File details

Details for the file lesia-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: lesia-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 100.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lesia-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 af9311016e5de1dba94768eb56e95c614fec62434e13ac81b1b7f6b61f3d8d97
MD5 9ed65545e739a7d12611dc783ea0d25d
BLAKE2b-256 c0707b023d5d07482743e126a4f26ed6603c3c628cd2787b07099f9e254e2fbe

See more details on using hashes here.

Provenance

The following attestation bundles were made for lesia-0.1.8-py3-none-any.whl:

Publisher: release.yml on DobbiKov/lesia

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