File: README.rst

package info (click to toggle)
translate-toolkit 3.17.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,780 kB
  • sloc: python: 69,719; sh: 1,412; makefile: 186; xml: 48
file content (190 lines) | stat: -rw-r--r-- 8,307 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
Translate Toolkit
-----------------

.. image:: https://img.shields.io/pypi/v/translate-toolkit.svg
    :alt: Released version
    :target: https://pypi.python.org/pypi/translate-toolkit/

.. image:: https://readthedocs.org/projects/translate-toolkit/badge/
    :target: https://docs.translatehouse.org/projects/translate-toolkit/en/latest/

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

.. image:: https://img.shields.io/pypi/l/translate-toolkit.svg
    :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 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.


Important Links
---------------

* `Latest release downloads <https://github.com/translate/translate/releases>`_
* `Documentation
  <http://docs.translatehouse.org/projects/translate-toolkit/en/latest/>`_,
  also use ``--help`` with any of the commands.
* The Translate Toolkit is released under the `GPL
  <https://github.com/translate/translate/blob/master/COPYING>`_ with
  `contributions from many people
  <https://github.com/translate/translate/blob/master/CREDITS>`_.
* `Reporting issues <https://github.com/translate/translate/issues>`_
* `Installation <http://docs.translatehouse.org/projects/translate-toolkit/en/stable/installation.html>`_


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]

.. note:: Please check ``pyproject.toml``

The Toolkit requires Python 3.10 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.org/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 is needed for sub2po
and po2sub. Some Unicode encoded files (including most files from
<http://dotsub.com/>) require version 0.14 or later.

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

Markdown support requires the mistletoe parser
<https://github.com/miyuchina/mistletoe>

Program overview
----------------

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

.. note::

   This is a selection of the most commonly used tools. For the complete list
   of converters and tools, see the `online documentation
   <https://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/index.html>`_.

* 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)
        md2po    - convert Markdown to PO
        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 PO
        ical2po  - Convert iCalendar files (*.ics) to PO
        sub2po   - Convert many subtitle files to PO
        rc2po    - convert Windows Resource .rc 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