MycroftAI / translate

Useful localization tools with Python API for building localization & translation systems
http://toolkit.translatehouse.org
GNU General Public License v2.0
0 stars 3 forks source link

Translate Toolkit

.. image:: https://img.shields.io/gitter/room/translate/pootle.svg?style=flat-square :alt: Join the chat at https://gitter.im/translate/pootle :target: https://gitter.im/translate/pootle

.. image:: https://img.shields.io/travis/translate/translate/master.svg?style=flat-square :alt: Build Status :target: https://travis-ci.org/translate/translate

.. image:: https://img.shields.io/codecov/c/github/translate/translate/master.svg?style=flat-square :alt: Test Coverage :target: https://codecov.io/gh/translate/translate/branch/master

.. image:: https://img.shields.io/requires/github/translate/translate/master.svg?style=flat-square :target: https://requires.io/github/translate/translate/requirements/?branch=master :alt: Requirements

.. image:: https://img.shields.io/pypi/v/translate-toolkit.svg?style=flat-square :alt: Downloads :target: https://pypi.python.org/pypi/translate-toolkit/

.. image:: https://img.shields.io/pypi/pyversions/translate-toolkit.svg?style=flat-square :alt: Supported Python versions :target: https://pypi.python.org/pypi/translate-toolkit/

.. image:: https://img.shields.io/pypi/l/translate-toolkit.svg?style=flat-square :target: https://pypi.python.org/pypi/translate-toolkit/ :alt: 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 covert 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.

Important Links

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

.. note:: Please check requirements/*.txt::

   pip install -r requirements/recommended.txt

Will install all recommended requirements, while optional.txt will also install support for all other formats.

Python 2.7 or later is required.

Python 2.6 is no longer supported by the Python Software Foundation, while the Toolkit may work in versions before Python 2.7 this is not supported.

The package lxml is needed for XML file processing. You should install version 3.5.0 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://github.com/candlepin/python-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/

CSV based file formats require backports.csv package on Python 2 https://pypi.org/project/backports.csv/.

Program overview

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