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 src/en, mkdir -p src/ua
  7. Associate source and target directories with desired languages
    lesia set-source src/fr french
    lesia set-target src/en english
    lesia set-target src/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.10.tar.gz (434.2 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.10-py3-none-any.whl (369.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lesia-0.1.10.tar.gz
  • Upload date:
  • Size: 434.2 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.10.tar.gz
Algorithm Hash digest
SHA256 382b51865b14c6b2424b30291868c67e367d042c9488633945a0506a06a2e30d
MD5 936babcff38b818bcad98c88340933db
BLAKE2b-256 e01ae824de63e2044ff722e063b461b2faee79f3cd8577e384648dbd3ba6702a

See more details on using hashes here.

Provenance

The following attestation bundles were made for lesia-0.1.10.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.10-py3-none-any.whl.

File metadata

  • Download URL: lesia-0.1.10-py3-none-any.whl
  • Upload date:
  • Size: 369.7 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.10-py3-none-any.whl
Algorithm Hash digest
SHA256 831d183bbd834640bdd686e83d5f592fd677fbb28769a0fc2027f869713c7d65
MD5 7ff49daf3ce07fad359bfda89622dd25
BLAKE2b-256 6b4b872b1a7d0e3eedce1733e878c350e8b7dfcacbe0aeddde9d6738b91f3b5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for lesia-0.1.10-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