Skip to main content

Tools and API for translation and localization engineering.

Project description

Translate Toolkit

Join the chat at https://gitter.im/translate/pootle Build Status Test Coverage Requirements Released version Supported Python versions License

The Translate Toolkit is a set of software and documentation designed to help make the lives of localizers both more productive and less frustrating. The Toolkit is part of the Translate project, hosted at <https://github.com/translate>.

The software includes programs to convert localization formats to the common PO, and emerging XLIFF format. There are also programs to check and manage PO and XLIFF files. Online documentation includes guides on using the tools, running a localization project and how to localize various projects from OpenOffice.org to Mozilla.

At its core the software contains a set of classes for handling various localization storage formats: DTD, properties, OpenOffice.org GSI/SDF, CSV, MO, Qt .ts, TMX, TBX, WordFast txt, Gettext .mo, Windows RC, and of course PO and XLIFF. It also provides scripts to convert between these formats.

Also part of the Toolkit are Python programs to create word counts, merge translations and perform various checks on translation files.

Joining the Translate Project

If you would like to join the translate project mailing list then visit: <http://lists.sourceforge.net/lists/listinfo/translate-devel>.

The vision of the Translate Project is to be a meta project for localizers built on the premise that your language deserves to be a project on its own right not a poor cousin of the main project.

Most projects are inattentive to the needs and difficulties experienced by localizers. To that end the aim is to work towards creating tools and documentation that allows localizers to focus on what they do best: translating software.

Requirements

There are several extra requirements which you might to install to get full feature set. This cal be easily specified during pip installation:

# Install with XML support
pip install translate-toolkit[XML]

# Install all optional dependencies
pip install translate-toolkit[all]

The Toolkit requires Python 3.8 or newer.

The package lxml is required. You should install version 4.6.3 or later. <http://lxml.de/> Depending on your platform, the easiest way to install might be through your system’s package management. Alternatively you can try

pip install lxml

which should install the newest version from the web.

For Mac OSX, the following pages might be of help: <http://lxml.de/build.html#building-lxml-on-macos-x> <http://lxml.de/installation.html#macos-x>

The package lxml has dependencies on libxml2 and libxslt. Please check the lxml site for the recommended versions of these libraries if you need to install them separately at all. Most packaged versions of lxml will already contain these dependencies.

When the environment variable USECPO is set to 1, the toolkit will attempt to use libgettextpo from the gettext-tools package (it might have a slightly different name on your distribution). This can greatly speed up access to PO files, but has not yet been tested as extensively. Feedback is most welcome.

The package iniparse is necessary for ini2po and po2ini: <https://pypi-hypernode.com/project/iniparse/>

The python-Levenshtein package will improve performance for fuzzy matching if it is available. This can improve the performance of pot2po, for example. It is optional and no functionality is lost if it is not installed, only speed. <http://sourceforge.net/projects/translate/files/python-Levenshtein/>

Functions in the lang.data module can supply functions to translate language names using the pycountry package. It can even translate names in the format Language (Country) such as English (South Africa) This is used by Pootle and Virtaal. If the package is not installed, the language names will simply appear in English. It is therefore recommended you install the pycountry package.

The package vobject is needed for ical2po and po2ical.

The aeidon package (or gaupol if aeidon is not available) is needed for sub2po and po2sub. Some Unicode encoded files (including most files from <http://dotsub.com/>) require version 0.14 or later. <http://home.gna.org/gaupol/> Gaupol might need the ‘Universal Encoding Detector’ <http://pypi.python.org/pypi/chardet>

Trados TXT TM support requires the BeautifulSoup parser <http://www.crummy.com/software/BeautifulSoup/>

Program overview

Use --help to find the syntax and options for all programs.

  • Converters:

    oo2po    - convert between OpenOffice.org GSI files and PO
    oo2xliff - convert between OpenOffice.org GSI files and XLIFF
    moz2po   - convert between Mozilla files and PO
    csv2po   - convert PO format to CSV for editing in a spreadsheet program
    php2po   - PHP localisable string arrays converter.
    ts2po    - convert Qt Linguist (.ts) files to PO
    txt2po   - convert simple text files to PO
    html2po  - convert HTML to PO (beta)
    xliff2po - XLIFF (XML Localisation Interchange File Format) converter
    prop2po  - convert Java .properties files to PO
    po2wordfast - Wordfast Translation Memory converter
    po2tmx   - TMX (Translation Memory Exchange) converter
    pot2po   - PO file initialiser
    csv2tbx  - Create TBX (TermBase eXchange) files from Comma Separated
               Value (CSV) files
    ini2po   - convert .ini files to to PO
    ical2po  - Convert iCalendar files (*.ics) to PO
    sub2po   - Convert many subtitle files to PO
    resx2po  - convert .Net Resource (.resx) files to PO
  • Tools (Quality Assurance):

    pofilter - run any of the 40+ checks on your PO files
    pomerge  - merge corrected translations from pofilter back into
               your existing PO files.
    poconflicts - identify conflicting use of terms
    porestructure - restructures po files according to poconflict directives
    pogrep   - find words in PO files
  • Tools (Other):

    pocompile - create a Gettext MO files from PO or XLIFF files
    pocount   - count translatable file formats (PO, XLIFF)
    podebug   - Create comment in your PO files' msgstr which can
                then be used to quickly track down mistranslations
                as the comments appear in the application.
    posegment - Break a PO or XLIFF files into sentence segments,
                useful for creating a segmented translation memory.
    poswap    - uses a translation of another language that you
                would rather use than English as source language
    poterminology - analyse PO or POT files to build a list of
                    frequently occurring words and phrases

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

translate-toolkit-3.9.2.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

translate_toolkit-3.9.2-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file translate-toolkit-3.9.2.tar.gz.

File metadata

  • Download URL: translate-toolkit-3.9.2.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for translate-toolkit-3.9.2.tar.gz
Algorithm Hash digest
SHA256 cd0430f061b135e46ec5eec9350fa8a7745d337826a90f5b6ac2c3b1b0123476
MD5 e87d968308bbfd5a82fbf73f86542aef
BLAKE2b-256 1bb68552b915b1bf2f0e08b96cbbecd4a78c1b4a62d9c473785c11e24abde83e

See more details on using hashes here.

File details

Details for the file translate_toolkit-3.9.2-py3-none-any.whl.

File metadata

File hashes

Hashes for translate_toolkit-3.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bd70e8df9669469ea919f414b17ef48252cfe5b8f2620a4cc492d7f6f3b3200e
MD5 f88ab917474dfc819b13a8b4d70b38b8
BLAKE2b-256 fd7cf0d666f6eda22713166e7acf6bd5c05b6d5d7b6162cde85209a1d2f87d80

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page