for git v1.5.2 (and below): chdir to the directory of the target file before executin...
[translate_toolkit.git] / README
blob1eecc4c7b9961160e136e9c68e6b7de9318bbf3c
1 Translate Toolkit
2 -----------------
4 The Translate Toolkit is a set of software and documentation designed to help
5 make the lives of localizers both more productive and less frustrating.  
6 The Toolkit is part of the translate.sourceforge.net project, 
7 hosted at http://translate.sourceforge.net/
9 The software includes programs to covert localization formats to the common 
10 PO, and emerging XLIFF format.  Programs to check and manage PO and XLIFF 
11 files.  Online documentation includes guides on using the tools, running a 
12 localization project and how to localize various projects from OpenOffice.org 
13 to Mozilla.
15 At its core the software contains a set of classes for handling various 
16 localization storage formats: DTD, properties, OpenOffice.org GSI/SDF,
17 CSV, MO, Qt .ts and of course PO and XLIFF.  It also provides scripts to 
18 convert between these formats.
20 Also part of the Toolkit are Python programs to create word counts, merge
21 translations and perform various checks on PO and XLIFF files.
24 Download
25 --------
26 The latest version of the Translate Toolkit can be downloaded from:
27 http://sourceforge.net/project/showfiles.php?group_id=91920
29 The latest documentation is always available at:
30 http://translate.sourceforge.net/wiki/toolkit/index
31 Documentation is also included in the doc directory.
34 Copying
35 -------
36 The Translate Toolkit is developed and Copyright:
37         Zuza Software Foundation (Translate.org.za), and
38         St James Software
40 and is released under the GPL license.
42 The Translate Toolkit Documentation is Copyright:
43         Dwayne Bailey
44         Javier SOLA
45         David Fraser
46         Friedel Wolff
47         and others
49 and is released under the GPL.
51 Where useful emails have been quoted we have attempted to preserve the authors
52 name and assume that their work may be republished.
54 Joining the Translate Project
55 -----------------------------
56 If you would like to join the translate project mailing list then visit:
57 http://lists.sourceforge.net/lists/listinfo/translate-devel
59 The vision of the Translate Project is to be a meta project for localizers
60 built on the premise that your language deserves to be a project on its own
61 right not a poor cousin of the main project.
63 Most projects are inattentive to the needs and difficulties experienced by
64 localizers. To that end the aim is to work towards creating tools and
65 documentation that allows localizers to focus on what they do best: translating
66 software.
68 Requirements
69 ------------
70 Python 2.4 or later is recommended.
72 The Toolkit mostly still works using Python 2.3 but is now most extensively 
73 tested using Python 2.4.  If you experience any errors and are using Python 2.2 
74 or 2.3, please first check that the error also occurs in 2.4 or 2.5 before 
75 reporting it as a bug.
77 The package lxml is needed for XML file processing. Version 1.3.4 and upwards 
78 should work. Alpha versions of lxml 2.0.0 have been tested.
79 http://codespeak.net/lxml/
81 The package lxml has dependencies on libxml2 and libxslt. Please check the lxml
82 site for the recommended versions of these libraries.
84 Python 2.5 includes pysqlite, but pysqlite2 needs to be installed if you are 
85 using an older version of Python.
86 http://www.initd.org/tracker/pysqlite/wiki/pysqlite
88 When the environment variable USECPO is set to 1, the toolkit will attempt to 
89 use libgettextpo from the gettext-tools package (it might have a slightly 
90 different name on your distribution). This can greatly speed up access to PO 
91 files, but has not yet been tested as extensively. Feedback is most welcome.
93 Psyco can help to speed up several of the programs in the toolkit. It is
94 optional, but highly recommended.
95 http://psyco.sourceforge.net/
97 The python wrapper to htmltidy is needed for po2html.
98 http://utidylib.berlios.de/
100 The package iniparse is necessary for ini2po and po2ini.
101 http://code.google.com/p/iniparse/
103 The python-Levenshtein package will improve performance for fuzzy matching if
104 it is available. This can improve the performance of pot2po, for example.  It 
105 is optional and no functionality is lost if it is not installed, only speed.
106 https://sourceforge.net/project/showfiles.php?group_id=91920&package_id=260161
108 Functions in the lang.data module can supply functions to translate language 
109 names using the iso-codes package. It can even translate names in the format 
110   Language (Country)
111 such as
112   English (South Africa)
113 This is used by Pootle 1.0 and later. If the package is not installed, the 
114 language names will simply appear in English. It is therefore recommended you 
115 install the iso-codes package for your distribution, but it is optional.
116 Alternatively, it is also available from
117 http://packages.debian.org/unstable/source/iso-codes
119 The programs have been tested on Linux and Windows.
122 Installation
123 ------------
125 To install the Translate Toolkit
127 * Windows
128 Double Click on translate-toolkit-N.N-setup.exe (the larger download file).
129 This installer contains all dependencies you will need, including Python. To 
130 use any of the command line tools, just type their name in a command window.
131 For example:
132   moz2po --version
134 Alternatively you can install the smaller translate-toolkit-N.N.N.win32.exe
135 This needs an existing Python installation, and assumes you will install all 
136 the dependencies yourself. You will probably need to edit your PATH environment
137 variable to be able to use the tools in any command window. 
139 * Linux
140 tar xzf translate-N.N.tar.gz
141 cd translate-N.N
142 su -c ./setup.py install
144 If you get this error along the lines of
145 Unable to open /usr/lib/python2.N/config/Makefile (no such file or directory)
146 while running setup.py, you need to install python-dev or libpython2.N-devel
147 package. Try to install python2.N-dev or libpython2.N-devel or something 
148 similar with your distribution's package manager.
151 Bugs
152 ----
153 We think there might be some :)
155 Please send your bug reports to:
156   translate-devel at lists.sourceforge.net
157 or report them at our bugzilla server at
158   http://bugs.locamotion.org/
160 Some help in writing useful bug reports are mentioned here:
161   http://translate.sourceforge.net/wiki/developers/reporting_bugs
163 Documentation
164 -----------
165 Please read our documentation online at 
166   http://translate.sourceforge.net/wiki/toolkit/index
167 There they are constantly being updated. Please feel free to contribute new 
168 sections and suggest corrections.
170 Most tools support the options --help and --manpage of which the output is 
171 automatically generated. The output of --manpage produces output suitable for 
172 formatting as a standard manpage. This can be viewed on UNIX platforms with 
173   nroff -Tutf8 -mandoc
174 With pot2po as example:
175   pot2po --manpage| /usr/bin/nroff -Tutf8 -mandoc|less
176 This is probably most useful for packagers to help them generate manual pages 
177 for the packaged versions.
179 Program overview
180 ----------------
182 Use --help to find the syntax and options for all programs.
184 * Converters
185 oo2po    - convert between OpenOffice.org GSI files and PO
186 oo2xliff - convert between OpenOffice.org GSI files and XLIFF
187 moz2po   - convert from a Mozilla XPI file and PO.  Including unpacking
188            and building a translated XPI.
189 csv2po   - convert PO format to CSV for editing in a spreadsheet program
190 php2po   - PHP localisable string arrays converter.
191 ts2po    - convert Qt Linguist (.ts) files to PO
192 txt2po   - convert simple text files to PO
193 html2po  - convert HTML to PO (beta)
194 xliff2po - XLIFF (XML Localisation Interchange File Format) converter
195 prop2po  - convert Java .properties files to PO
196 po2wordfast - Wordfast Translation Memory converter
197 po2tmx   - TMX (Translation Memory Exchange) converter
198 pot2po   - PO file initialiser
199 csv2tbx  - Create TBX (TermBase eXchange) files from Comma Separated Value (CSV) files
201 * Tools (Quality Assurance)
202 pofilter - run any of the 40+ checks on your PO files
203 pomerge  - merge corrected translations from pofilter back into your existing
204            PO files.
205 poconflicts - identify conflicting use of terms
206 porestructure - restructures po files according to poconflict directives
207 pogrep   - find words in PO files
209 * Tools (Other)
210 pocompile - create a Gettext MO files from PO or XLIFF files
211 pocount   - count translatable file formats (PO, XLIFF)
212 podebug   - Create comment in your PO files' msgstr which can then be used to quickly 
213             track down mistranslations as the comments appear in the application.
214 posegment - Break a PO or XLIFF files into sentence segments, useful 
215             for creating a segmented translation memory.
216 poswap    - uses a translation of another language that you would rather use 
217             than English as source language