transpolibre


Nametranspolibre JSON
Version 0.8.15 PyPI version JSON
download
home_pageNone
SummaryAutomate translation of gettext PO files using LibreTranslate, Ollama, and local models
upload_time2025-08-17 19:44:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseApache-2.0
keywords gettext i18n l10n internationalization libretranslate localization ollama machine-translation pofiles po-files python pytorch sphinx text-processing torch translation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # transpolibre
`transpolibre` is a Python program to automate translation of `gettext` PO files
using LibreTranslate, Ollama, or local models.

* https://transpolibre.org

# Install
# PyPI Installation

* https://pypi.org/project/transpolibre/

To install with pip from PyPI, you can do something like this:

```
python -m venv venv
source venv/bin/activate
pip install -U setuptools pip wheel
pip install transpolibre
# For Ollama
pip install transpolibre[ollama]
# For Local Engine
pip install transpolibre[local]
# For all engines
pip install transpolibre[all]
```

## Source Installation
Thusly, suit to taste:

```
git clone https://spacecruft.org/deepcrayon/transpolibre
cd transpolibre/
python -m venv venv
source venv/bin/activate
pip install -U setuptools pip wheel
pip install -e .
```

# Help
```
$ transpolibre --help
usage: transpolibre [-h] [-a API_KEY] [-c CUDA_DEVICE] [-d] [-D {auto,cpu,gpu}] [-e {LibreTranslate,Ollama,Local}] [-f FILE] [-l] [-m MODEL] [-o] [-s SOURCE_LANG] [-t TARGET_LANG] [-u URL] [-v] [-V]

Translate PO files

options:
  -h, --help            show this help message and exit
  -a API_KEY, --api-key API_KEY
                        LibreTranslate API key
  -c CUDA_DEVICE, --cuda-device CUDA_DEVICE
                        Local CUDA device number (Default 0)
  -d, --debug           Debugging
  -D {auto,cpu,gpu}, --device {auto,cpu,gpu}
                        Device to use for local translation: auto, cpu, gpu (Default auto)
  -e {LibreTranslate,Ollama,Local}, --engine {LibreTranslate,Ollama,Local}
                        Translation engine (Default: LibreTranslate)
  -f FILE, --file FILE  PO file to translate
  -l, --list            List available languages
  -m MODEL, --model MODEL
                        Model for Local or Ollama (Default local: ModelSpace/GemmaX2-28-9B-v0.1, default Ollama: aya-expanse:32b)
  -o, --overwrite       Overwrite existing translations
  -s SOURCE_LANG, --source-lang SOURCE_LANG
                        Source Language ISO 639 code (Default en)
  -t TARGET_LANG, --target-lang TARGET_LANG
                        Target Language ISO 639 code (Default es)
  -u URL, --url URL     Engine URL (Default LibreTranslate: http://127.0.0.1:8000, default Ollama: http://127.0.0.1:11434)
  -v, --verbose         Increase output verbosity
  -V, --version         Show version
```

# Status
Beta.

# AI
"Open Source" AI models are used to generate and edit some code.

# Upstream
Projects used by `transpolibre`.

* https://libretranslate.com/
* https://www.gnu.org/software/gettext/manual/gettext.html
* https://polib.readthedocs.io
* https://github.com/argosopentech/LibreTranslate-py
* https://ollama.com/

# License
Apache 2.0 or Creative Commons CC by SA 4.0 International.
You may use this code, files, and text under either license.

Unofficial project, not related to upstream projects.

Upstream sources under their respective copyrights.

*Copyright © 2025 Jeff Moe.*

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "transpolibre",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "gettext, i18n, l10n, internationalization, libretranslate, localization, ollama, machine-translation, pofiles, po-files, python, pytorch, sphinx, text-processing, torch, translation",
    "author": null,
    "author_email": "Jeff Moe <moe@spacecruft.org>",
    "download_url": "https://files.pythonhosted.org/packages/22/a9/940f83b331d1715d41dde9925dcb2526e304b2aedd529135a304521c1250/transpolibre-0.8.15.tar.gz",
    "platform": null,
    "description": "# transpolibre\n`transpolibre` is a Python program to automate translation of `gettext` PO files\nusing LibreTranslate, Ollama, or local models.\n\n* https://transpolibre.org\n\n# Install\n# PyPI Installation\n\n* https://pypi.org/project/transpolibre/\n\nTo install with pip from PyPI, you can do something like this:\n\n```\npython -m venv venv\nsource venv/bin/activate\npip install -U setuptools pip wheel\npip install transpolibre\n# For Ollama\npip install transpolibre[ollama]\n# For Local Engine\npip install transpolibre[local]\n# For all engines\npip install transpolibre[all]\n```\n\n## Source Installation\nThusly, suit to taste:\n\n```\ngit clone https://spacecruft.org/deepcrayon/transpolibre\ncd transpolibre/\npython -m venv venv\nsource venv/bin/activate\npip install -U setuptools pip wheel\npip install -e .\n```\n\n# Help\n```\n$ transpolibre --help\nusage: transpolibre [-h] [-a API_KEY] [-c CUDA_DEVICE] [-d] [-D {auto,cpu,gpu}] [-e {LibreTranslate,Ollama,Local}] [-f FILE] [-l] [-m MODEL] [-o] [-s SOURCE_LANG] [-t TARGET_LANG] [-u URL] [-v] [-V]\n\nTranslate PO files\n\noptions:\n  -h, --help            show this help message and exit\n  -a API_KEY, --api-key API_KEY\n                        LibreTranslate API key\n  -c CUDA_DEVICE, --cuda-device CUDA_DEVICE\n                        Local CUDA device number (Default 0)\n  -d, --debug           Debugging\n  -D {auto,cpu,gpu}, --device {auto,cpu,gpu}\n                        Device to use for local translation: auto, cpu, gpu (Default auto)\n  -e {LibreTranslate,Ollama,Local}, --engine {LibreTranslate,Ollama,Local}\n                        Translation engine (Default: LibreTranslate)\n  -f FILE, --file FILE  PO file to translate\n  -l, --list            List available languages\n  -m MODEL, --model MODEL\n                        Model for Local or Ollama (Default local: ModelSpace/GemmaX2-28-9B-v0.1, default Ollama: aya-expanse:32b)\n  -o, --overwrite       Overwrite existing translations\n  -s SOURCE_LANG, --source-lang SOURCE_LANG\n                        Source Language ISO 639 code (Default en)\n  -t TARGET_LANG, --target-lang TARGET_LANG\n                        Target Language ISO 639 code (Default es)\n  -u URL, --url URL     Engine URL (Default LibreTranslate: http://127.0.0.1:8000, default Ollama: http://127.0.0.1:11434)\n  -v, --verbose         Increase output verbosity\n  -V, --version         Show version\n```\n\n# Status\nBeta.\n\n# AI\n\"Open Source\" AI models are used to generate and edit some code.\n\n# Upstream\nProjects used by `transpolibre`.\n\n* https://libretranslate.com/\n* https://www.gnu.org/software/gettext/manual/gettext.html\n* https://polib.readthedocs.io\n* https://github.com/argosopentech/LibreTranslate-py\n* https://ollama.com/\n\n# License\nApache 2.0 or Creative Commons CC by SA 4.0 International.\nYou may use this code, files, and text under either license.\n\nUnofficial project, not related to upstream projects.\n\nUpstream sources under their respective copyrights.\n\n*Copyright &copy; 2025 Jeff Moe.*\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Automate translation of gettext PO files using LibreTranslate, Ollama, and local models",
    "version": "0.8.15",
    "project_urls": {
        "Changelog": "https://spacecruft.org/deepcrayon/transpolibre/raw/branch/main/CHANGELOG.txt",
        "Documentation": "https://transpolibre.org",
        "Homepage": "https://transpolibre.org",
        "Issues": "https://spacecruft.org/deepcrayon/transpolibre",
        "Repository": "https://spacecruft.org/deepcrayon/transpolibre"
    },
    "split_keywords": [
        "gettext",
        " i18n",
        " l10n",
        " internationalization",
        " libretranslate",
        " localization",
        " ollama",
        " machine-translation",
        " pofiles",
        " po-files",
        " python",
        " pytorch",
        " sphinx",
        " text-processing",
        " torch",
        " translation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "ab203776442a0a076fd9f5a8626e35a49c61afc2884dde9a49c849cfc511352e",
                "md5": "d00b6bdd6e2d33c85b30588c91ef21d8",
                "sha256": "b9e09e703fc0e4ae46f6a3fe2045ea118c20938468f3f3dd4b0009c682453cc8"
            },
            "downloads": -1,
            "filename": "transpolibre-0.8.15-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d00b6bdd6e2d33c85b30588c91ef21d8",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 36785,
            "upload_time": "2025-08-17T19:44:45",
            "upload_time_iso_8601": "2025-08-17T19:44:45.943591Z",
            "url": "https://files.pythonhosted.org/packages/ab/20/3776442a0a076fd9f5a8626e35a49c61afc2884dde9a49c849cfc511352e/transpolibre-0.8.15-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "22a9940f83b331d1715d41dde9925dcb2526e304b2aedd529135a304521c1250",
                "md5": "afef59bc2058653ee14290acdd2597f7",
                "sha256": "8a43d562dda46b6f7ae0b187beee511c618ea2e903d8672b9e1aaccc636d701c"
            },
            "downloads": -1,
            "filename": "transpolibre-0.8.15.tar.gz",
            "has_sig": false,
            "md5_digest": "afef59bc2058653ee14290acdd2597f7",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 685137,
            "upload_time": "2025-08-17T19:44:47",
            "upload_time_iso_8601": "2025-08-17T19:44:47.702340Z",
            "url": "https://files.pythonhosted.org/packages/22/a9/940f83b331d1715d41dde9925dcb2526e304b2aedd529135a304521c1250/transpolibre-0.8.15.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-17 19:44:47",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "transpolibre"
}
        
Elapsed time: 0.42764s