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.9.tar.gz (415.0 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.9-py3-none-any.whl (364.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lesia-0.1.9.tar.gz
  • Upload date:
  • Size: 415.0 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.9.tar.gz
Algorithm Hash digest
SHA256 32893221df62f466301062c60e304dc2ab8c846d84dad26cd2271fbc432063bb
MD5 c1137d435fbe149b86a3774245c8e6f9
BLAKE2b-256 f012b565438c158780e0cc23d5c832983b978e20ca8f35e555d0c154e891ad21

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: lesia-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 364.3 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 6af70eadfd34c85a1bdf51776b4d348747e6451ba708c18792c1f96e3333dd52
MD5 83be9687f8e46f4b0a3e1a21c61f80b5
BLAKE2b-256 6ea88c5839a1f55bf74312f27a993d8d0f4cd4bab44c403e1ab9df68bd0a4122

See more details on using hashes here.

Provenance

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