pax_global_header00006660000000000000000000000064131522672460014522gustar00rootroot0000000000000052 comment=f7a330c102abdde46774e55f81370d394fbc789e translate-2.2.5/000077500000000000000000000000001315226724600135255ustar00rootroot00000000000000translate-2.2.5/.gitignore000066400000000000000000000012251315226724600155150ustar00rootroot00000000000000# / /LICENSE # /docs/ /docs/_build/ # Python *.py[cod] *.egg-info # pytest .cache/ # vim .*.swp *~ # distutils /build/ /dist/ MANIFEST MANIFEST.in # Requirements generation .reqs requirements/min-versions.txt # Coverage .coverage* ############################## # translate/ specific excludes ############################## translate/storage/properties.class # Testing # ####### # Roundtrip testing noise translate/convert/diff_*.diff translate/convert/mozilla-l10n/ translate/convert/mozilla-gaia/ translate/convert/rewritten-po/ translate/convert/templates-recreated/ # other tests/xliff_conformance/af-pootle.xlf # cli testing tests/cli/results translate-2.2.5/.gitmodules000066400000000000000000000001441315226724600157010ustar00rootroot00000000000000[submodule "docs/_themes"] path = docs/_themes url = git://github.com/translate/sphinx-themes.git translate-2.2.5/.travis.yml000066400000000000000000000046061315226724600156440ustar00rootroot00000000000000#True httpsTrue://travis-ci.org/#!/translate/translate sudo: required # For now these builds are faster language: python python: - 2.7 - 3.3 - 3.4 - 3.5 - 3.6 env: matrix: - USECPO=0 MINVERSION=1 META= - USECPO=0 MINVERSION= META= - USECPO=0 MINVERSION= META=1 - USECPO=1 MINVERSION= META= #- USECPO=2 matrix: exclude: - python: 3.3 env: USECPO=0 MINVERSION=1 META= - python: 3.3 env: USECPO=0 MINVERSION=1 META=1 - python: 3.3 env: USECPO=0 MINVERSION= META=1 - python: 3.4 env: USECPO=0 MINVERSION=1 META= - python: 3.4 env: USECPO=0 MINVERSION=1 META=1 - python: 3.4 env: USECPO=0 MINVERSION= META=1 - python: 3.5 env: USECPO=0 MINVERSION=1 META= - python: 3.5 env: USECPO=0 MINVERSION=1 META=1 - python: 3.5 env: USECPO=0 MINVERSION= META=1 - python: 3.6 env: USECPO=0 MINVERSION=1 META= - python: 3.6 env: USECPO=0 MINVERSION=1 META=1 - python: 3.6 env: USECPO=0 MINVERSION= META=1 allow_failures: - python: 2.7 env: USECPO=1 MINVERSION= META= - python: 3.3 env: USECPO=1 MINVERSION= META= - python: 3.4 env: USECPO=1 MINVERSION= META= - python: 3.5 env: USECPO=1 MINVERSION= META= - python: 3.6 env: USECPO=1 MINVERSION= META= #before_install: # # Ubuntu used by Travis only supports python3-aeidon. # - sudo apt-get install python-aeidon install: - pip install coveralls - pip install codecov - if [[ $MINVERSION ]]; then make requirements/min-versions.txt; cat requirements/min-versions.txt; CFLAGS="-O0" pip install -r requirements/min-versions.txt; fi - if [[ ! $MINVERSION ]]; then CFLAGS="-O0" pip install -r requirements/dev.txt; fi # Still need to handle with indexing engines - pip freeze script: - if [[ ! $META ]]; then python -m compileall -q -f .; fi # Compile all the files - if [[ ! $META ]]; then python setup.py --quiet build; fi - if [[ ! $META ]]; then pip install .; fi - if [[ ! $META ]]; then py.test --cov=. -r EfsxX; fi - if [[ ! $META ]]; then make test-functional; fi - if [[ $META ]]; then pycodestyle; fi - if [[ $META ]]; then pydocstyle; fi - if [[ $META ]]; then make docs; fi after_success: - coveralls - codecov notifications: email: on_failure: always on_success: change addons: apt: packages: - gettext - libgettextpo-dev translate-2.2.5/COPYING000066400000000000000000000431101315226724600145570ustar00rootroot00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. translate-2.2.5/CREDITS000066400000000000000000000033011315226724600145420ustar00rootroot00000000000000Translate Toolkit Credits ========================= See the README file for an explanation of what the Translate Toolkit is See the ChangeLog (or version control history) for more detailed credits These are people who have contributed documentation or code, but bug reports are also a valuable contribution! Many people have contributed suggestions etc on the translate-devel list and these are also appreciated If you've been left out, let us know! Alphabetical Order of Contributors ---------------------------------- Alexander Dupuy: poterminology, quality checks Caio Begotti: documentation Clytie Siddall: testing and bugreporting Dan Schafer (Mozilla): improvements to html2po David Farning: testing David Fraser: main development Dwayne Bailey: added tests, checks in pofilter, some helpful bash scripts, testing Filip Miletic: fixes for unicode problems, skype conversion Fredrik Corneliusson: xliff work Friedel Wolff: bug fixes, development Geoffrey Hutchison: better Qt .ts support Grégory Journé: better .rc support Ivan Masár: improvements to pocount Javier Sola: documentation Kaloian Doganov: improvement of po2html Lars Kruse: version control, indexing, support, reviews Marek Wieckowski: Qt ts file enhancements Matt Chisholm: fixes Matthias Klose: extra file options for converters Miklos Vajna: patches and testing of version control Nicolas François: po4a integration, performance Ognyan Kulev: testing and fixes Pavel Janík: testing Rail Aliev (Раиль Алиев): testing, converters, podebug Thomas Fogwill: portal code Tom Cato Amundsen: patch to enable pogrep to search anywhere in the PO unit Torsten Martinsen: patches to po2ts Walter Leibbrandt: development Wynand Winterbach: development translate-2.2.5/LICENSES000066400000000000000000000013161315226724600146560ustar00rootroot00000000000000================================== Licenses of Toolkit and Other Code ================================== The Translate Toolkit is released the license listed in COPYING. Other licenses ============== We import or have used code from the following projects: CherryPy -------- This is used by tmserver. Depending on the whole of CherryPy was overkill for just needing this server component. License: BSD copy in translate/misc/wsgiserver/LICENSE.txt Used in: translate/misc/wsgiserver/* From: CherryPy 3.2.4 https://pypi.python.org/packages/source/C/CherryPy/CherryPy-3.2.4.tar.gz#md5=e2c8455e15c39c9d60e0393c264a4d16 The code has been changed slightly: 1. from cherrypy import -> from translate.misc import translate-2.2.5/Makefile000066400000000000000000000055151315226724600151730ustar00rootroot00000000000000DOCS_DIR = docs .PHONY: all build docs requirements help sort-imports all: help build: docs python setup.py sdist --formats=gztar docs: # Make sure that the submodule with docs theme is pulled and up-to-date. git submodule update --init # The following creates the HTML docs. # NOTE: cd and make must be in the same line. cd ${DOCS_DIR}; make SPHINXOPTS="-T -W -q -j 4" html ${TAIL} docs-review: docs python -mwebbrowser file://$(shell pwd)/${DOCS_DIR}/_build/html/index.html sort-imports: isort -rc . help: @echo "Help" @echo "----" @echo @echo " build - create sdist with required prep" @echo " docs - build Sphinx docs" @echo " docs-review - launch webbrowser to review docs" @echo " requirements - (re)generate pinned and minimum requirements" @echo " sort-imports - sort Python imports" @echo " test - run unit test suite" @echo " test-functional - run the functional test suite" # Perform forced build using -W for the (.PHONY) requirements target requirements: $(MAKE) -W $(REQFILE) requirements/min-versions.txt requirements.txt REQS=.reqs REQFILE=requirements/recommended.txt requirements.txt: $(REQFILE) @set -e; \ case `pip --version` in \ "pip 0"*|"pip 1.[012]"*) \ virtualenv --no-site-packages --clear $(REQS); \ source $(REQS)/bin/activate; \ echo starting clean install of requirements from PyPI; \ pip install --use-mirrors -r $(REQFILE); \ : trap removes partial/empty target on failure; \ trap 'if [ "$$?" != 0 ]; then rm -f $@; fi' 0; \ pip freeze | grep -v '^wsgiref==' | sort > $@ ;; \ *) \ : only pip 1.3.1+ processes --download recursively; \ rm -rf $(REQS); mkdir $(REQS); \ echo starting download of requirements from PyPI; \ pip install --download $(REQS) -r $(REQFILE); \ : trap removes partial/empty target on failure; \ trap 'if [ "$$?" != 0 ]; then rm -f $@; fi' 0; \ (cd $(REQS) && ls *.tar* | \ sed -e 's/-\([0-9]\)/==\1/' -e 's/\.tar.*$$//') > $@; \ esac; requirements/min-versions.txt: requirements/*.txt @if grep -q '>[0-9]' $^; then \ echo "Use '>=' not '>' for requirements"; exit 1; \ fi @echo "creating $@" @echo "# Automatically generated: DO NOT EDIT" > $@ @echo "# Regenerate using 'make requirements'" >> $@ @echo "# ====================================" >> $@ @echo "# Minimum Requirements" >> $@ @echo "# ====================================" >> $@ @echo "#" >> $@ @echo "# These are the minimum versions of dependencies that the developers" >> $@ @echo "# claim will work." >> $@ @echo "#" >> $@ @echo "# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" >> $@ @echo "#" >> $@ @echo >> $@ @cat $^ | sed -n '/=/{s/>=/==/;s/,<.*//;s/,!=.*//;p;};/^[-#]/d;/^$$/d;/=/d;p;' >> $@ test: @py.test --boxed -r EfsxX test-functional: @tests/cli/run_tests.sh translate-2.2.5/README.rst000066400000000000000000000210431315226724600152140ustar00rootroot00000000000000Translate 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 . 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 --------------- * `Latest release downloads `_ * `Documentation `_, also use ``--help`` with any of the commands. * The Translate Toolkit is released under the `GPL `_ with `contributions from many people `_. * `Reporting issues `_ * `Installation `_ Joining the Translate Project ----------------------------- If you would like to join the translate project mailing list then visit: . 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. 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: 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. http://code.google.com/p/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. 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 ) require version 0.14 or later. Gaupol might need the 'Universal Encoding Detector' Trados TXT TM support requires the BeautifulSoup parser 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 translate-2.2.5/codecov.yml000066400000000000000000000000171315226724600156700ustar00rootroot00000000000000comment: false translate-2.2.5/docs/000077500000000000000000000000001315226724600144555ustar00rootroot00000000000000translate-2.2.5/docs/Makefile000066400000000000000000000131571315226724600161240ustar00rootroot00000000000000# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . # the i18n builder cannot share the environment and doctrees with the others I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext coverage help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " dirhtml to make HTML files named index.html in directories" @echo " singlehtml to make a single large HTML file" @echo " pickle to make pickle files" @echo " json to make JSON files" @echo " htmlhelp to make HTML files and a HTML help project" @echo " qthelp to make HTML files and a qthelp project" @echo " devhelp to make HTML files and a Devhelp project" @echo " epub to make an epub" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " latexpdf to make LaTeX files and run them through pdflatex" @echo " text to make text files" @echo " man to make manual pages" @echo " texinfo to make Texinfo files" @echo " info to make Texinfo files and run them through makeinfo" @echo " gettext to make PO message catalogs" @echo " changes to make an overview of all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" @echo " doctest to run all doctests embedded in the documentation (if enabled)" clean: -rm -rf $(BUILDDIR)/* html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml @echo @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." singlehtml: $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml @echo @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." pickle: $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle @echo @echo "Build finished; now you can process the pickle files." json: $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json @echo @echo "Build finished; now you can process the JSON files." htmlhelp: $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in $(BUILDDIR)/htmlhelp." qthelp: $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp @echo @echo "Build finished; now you can run "qcollectiongenerator" with the" \ ".qhcp project file in $(BUILDDIR)/qthelp, like this:" @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/TranslateToolkit.qhcp" @echo "To view the help file:" @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/TranslateToolkit.qhc" devhelp: $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp @echo @echo "Build finished." @echo "To view the help file:" @echo "# mkdir -p $$HOME/.local/share/devhelp/TranslateToolkit" @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/TranslateToolkit" @echo "# devhelp" epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub @echo @echo "Build finished. The epub file is in $(BUILDDIR)/epub." latex: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." @echo "Run \`make' in that directory to run these through (pdf)latex" \ "(use \`make latexpdf' here to do that automatically)." latexpdf: $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex @echo "Running LaTeX files through pdflatex..." $(MAKE) -C $(BUILDDIR)/latex all-pdf @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." text: $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text @echo @echo "Build finished. The text files are in $(BUILDDIR)/text." man: $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man @echo @echo "Build finished. The manual pages are in $(BUILDDIR)/man." texinfo: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." @echo "Run \`make' in that directory to run these through makeinfo" \ "(use \`make info' here to do that automatically)." info: $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo @echo "Running Texinfo files through makeinfo..." make -C $(BUILDDIR)/texinfo info @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." gettext: $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale @echo @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." changes: $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes @echo @echo "The overview file is in $(BUILDDIR)/changes." linkcheck: $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in $(BUILDDIR)/linkcheck/output.txt." doctest: $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest @echo "Testing of doctests in the sources finished, look at the " \ "results in $(BUILDDIR)/doctest/output.txt." coverage: $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage @echo "Coverage report is in $(BUILDDIR)/coverage." translate-2.2.5/docs/_ext/000077500000000000000000000000001315226724600154145ustar00rootroot00000000000000translate-2.2.5/docs/_ext/translate_docs.py000066400000000000000000000020461315226724600207750ustar00rootroot00000000000000# -*- coding: utf-8 -*- # # Copyright 2012 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . """Sphinx extension with custom stuff for Translate Toolkit docs.""" import docutils def setup(app): # :opt: to mark options -P --pot and options values --progress=dots app.add_generic_role( name="opt", nodeclass=docutils.nodes.literal ) return {"parallel_read_safe": True} translate-2.2.5/docs/_static/000077500000000000000000000000001315226724600161035ustar00rootroot00000000000000translate-2.2.5/docs/_static/README.txt000066400000000000000000000000671315226724600176040ustar00rootroot00000000000000In this directory go static files, for example images. translate-2.2.5/docs/_themes/000077500000000000000000000000001315226724600161015ustar00rootroot00000000000000translate-2.2.5/docs/api/000077500000000000000000000000001315226724600152265ustar00rootroot00000000000000translate-2.2.5/docs/api/convert.rst000066400000000000000000000120261315226724600174410ustar00rootroot00000000000000convert ======= .. automodule:: translate.convert :show-inheritance: acesskey -------- .. automodule:: translate.convert.accesskey :members: :inherited-members: convert ------- .. automodule:: translate.convert.convert :members: :inherited-members: csv2po ------ .. automodule:: translate.convert.csv2po :members: :inherited-members: csv2tbx ------- .. automodule:: translate.convert.csv2tbx :members: :inherited-members: dtd2po ------ .. automodule:: translate.convert.dtd2po :members: :inherited-members: factory ------- .. automodule:: translate.convert.factory :members: :inherited-members: html2po ------- .. automodule:: translate.convert.html2po :members: :inherited-members: ical2po ------- .. automodule:: translate.convert.ical2po :members: :inherited-members: ini2po ------ .. automodule:: translate.convert.ini2po :members: :inherited-members: json2po ------- .. automodule:: translate.convert.json2po :members: :inherited-members: moz2po ------ .. automodule:: translate.convert.moz2po :members: :inherited-members: mozfunny2prop ------------- .. automodule:: translate.convert.mozfunny2prop :members: :inherited-members: mozlang2po ---------- .. automodule:: translate.convert.mozlang2po :members: :inherited-members: odf2xliff --------- .. automodule:: translate.convert.odf2xliff :members: :inherited-members: oo2po ----- .. automodule:: translate.convert.oo2po :members: :inherited-members: oo2xliff -------- .. automodule:: translate.convert.oo2xliff :members: :inherited-members: php2po ------ .. automodule:: translate.convert.php2po :members: :inherited-members: po2csv ------ .. automodule:: translate.convert.po2csv :members: :inherited-members: po2dtd ------ .. automodule:: translate.convert.po2dtd :members: :inherited-members: po2html ------- .. automodule:: translate.convert.po2html :members: :inherited-members: po2ical ------- .. automodule:: translate.convert.po2ical :members: :inherited-members: po2ini ------ .. automodule:: translate.convert.po2ini :members: :inherited-members: po2json ------- .. automodule:: translate.convert.po2json :members: :inherited-members: po2mozlang ---------- .. automodule:: translate.convert.po2mozlang :members: :inherited-members: po2moz ------ .. automodule:: translate.convert.po2moz :members: :inherited-members: po2oo ----- .. automodule:: translate.convert.po2oo :members: :inherited-members: po2php ------ .. automodule:: translate.convert.po2php :members: :inherited-members: po2prop ------- .. automodule:: translate.convert.po2prop :members: :inherited-members: po2rc ----- .. automodule:: translate.convert.po2rc :members: :inherited-members: po2sub ------ .. automodule:: translate.convert.po2sub :members: :inherited-members: po2symb ------- .. automodule:: translate.convert.po2symb :members: :inherited-members: po2tiki ------- .. automodule:: translate.convert.po2tiki :members: :inherited-members: po2tmx ------ .. automodule:: translate.convert.po2tmx :members: :inherited-members: po2ts ----- .. automodule:: translate.convert.po2ts :members: :inherited-members: po2txt ------ .. automodule:: translate.convert.po2txt :members: :inherited-members: po2web2py --------- .. automodule:: translate.convert.po2web2py :members: :inherited-members: po2wordfast ----------- .. automodule:: translate.convert.po2wordfast :members: :inherited-members: po2xliff -------- .. automodule:: translate.convert.po2xliff :members: :inherited-members: poreplace --------- .. automodule:: translate.convert.poreplace :members: :inherited-members: pot2po ------ .. automodule:: translate.convert.pot2po :members: :inherited-members: prop2mozfunny ------------- .. automodule:: translate.convert.prop2mozfunny :members: :inherited-members: prop2po ------- .. automodule:: translate.convert.prop2po :members: :inherited-members: rc2po ----- .. automodule:: translate.convert.rc2po :members: :inherited-members: sub2po ------ .. automodule:: translate.convert.sub2po :members: :inherited-members: symb2po ------- .. automodule:: translate.convert.symb2po :members: :inherited-members: tiki2po ------- .. automodule:: translate.convert.tiki2po :members: :inherited-members: ts2po ----- .. automodule:: translate.convert.ts2po :members: :inherited-members: txt2po ------ .. automodule:: translate.convert.txt2po :members: :inherited-members: web2py2po --------- .. automodule:: translate.convert.web2py2po :members: :inherited-members: xliff2odf --------- .. automodule:: translate.convert.xliff2odf :members: :inherited-members: xliff2oo -------- .. automodule:: translate.convert.xliff2oo :members: :inherited-members: xliff2po -------- .. automodule:: translate.convert.xliff2po :members: :inherited-members: translate-2.2.5/docs/api/filters.rst000066400000000000000000000014221315226724600174270ustar00rootroot00000000000000filters ======= .. automodule:: translate.filters :show-inheritance: autocorrect ----------- .. automodule:: translate.filters.autocorrect :members: :inherited-members: checks ------ .. automodule:: translate.filters.checks :members: :inherited-members: decoration ---------- .. automodule:: translate.filters.decoration :members: :inherited-members: helpers -------- .. automodule:: translate.filters.helpers :members: :inherited-members: pofilter -------- .. automodule:: translate.filters.pofilter :members: :inherited-members: prefilters ---------- .. automodule:: translate.filters.prefilters :members: :inherited-members: spelling -------- .. automodule:: translate.filters.spelling :members: :inherited-members: translate-2.2.5/docs/api/index.rst000066400000000000000000000014501315226724600170670ustar00rootroot00000000000000.. _api: API === The Translate Toolkit provides several modules for programmers to build their own tools. Module overview ---------------- The following will give you an idea about what each module is capable of. convert ^^^^^^^ .. automodule:: translate.convert filters ^^^^^^^ .. automodule:: translate.filters lang ^^^^ .. automodule:: translate.lang misc ^^^^ .. automodule:: translate.misc search ^^^^^^ .. automodule:: translate.search services ^^^^^^^^ .. automodule:: translate.services storage ^^^^^^^ .. automodule:: translate.storage tools ^^^^^ .. automodule:: translate.tools Module list ------------ All the modules included in the Translated Toolkit are listed here. .. toctree:: :maxdepth: 3 convert filters lang misc search services storage tools translate-2.2.5/docs/api/lang.rst000066400000000000000000000063651315226724600167130ustar00rootroot00000000000000lang ==== .. automodule:: translate.lang :show-inheritance: af -- .. automodule:: translate.lang.af :members: :inherited-members: am -- .. automodule:: translate.lang.am :members: :inherited-members: ar -- .. automodule:: translate.lang.ar :members: :inherited-members: bn -- .. automodule:: translate.lang.bn :members: :inherited-members: code_or ------- .. automodule:: translate.lang.code_or :members: :inherited-members: common ------ .. automodule:: translate.lang.common :members: :inherited-members: data ---- .. automodule:: translate.lang.data :members: :inherited-members: de -- .. automodule:: translate.lang.de :members: :inherited-members: el -- .. automodule:: translate.lang.el :members: :inherited-members: es -- .. automodule:: translate.lang.es :members: :inherited-members: factory ------- .. automodule:: translate.lang.factory :members: :inherited-members: fa -- .. automodule:: translate.lang.fa :members: :inherited-members: fi -- .. automodule:: translate.lang.fi :members: :inherited-members: fr -- .. automodule:: translate.lang.fr :members: :inherited-members: gu -- .. automodule:: translate.lang.gu :members: :inherited-members: he -- .. automodule:: translate.lang.he :members: :inherited-members: hi -- .. automodule:: translate.lang.hi :members: :inherited-members: hy -- .. automodule:: translate.lang.hy :members: :inherited-members: identify -------- .. automodule:: translate.lang.identify :members: :inherited-members: ja -- .. automodule:: translate.lang.ja :members: :inherited-members: km -- .. automodule:: translate.lang.km :members: :inherited-members: kn -- .. automodule:: translate.lang.kn :members: :inherited-members: ko -- .. automodule:: translate.lang.ko :members: :inherited-members: ml -- .. automodule:: translate.lang.ml :members: :inherited-members: mr -- .. automodule:: translate.lang.mr :members: :inherited-members: ne -- .. automodule:: translate.lang.ne :members: :inherited-members: ngram ----- .. automodule:: translate.lang.ngram :members: :inherited-members: pa -- .. automodule:: translate.lang.pa :members: :inherited-members: poedit ------ .. automodule:: translate.lang.poedit :members: :inherited-members: si -- .. automodule:: translate.lang.si :members: :inherited-members: st -- .. automodule:: translate.lang.st :members: :inherited-members: sv -- .. automodule:: translate.lang.sv :members: :inherited-members: ta -- .. automodule:: translate.lang.ta :members: :inherited-members: team ---- .. automodule:: translate.lang.team :members: :inherited-members: te -- .. automodule:: translate.lang.te :members: :inherited-members: th -- .. automodule:: translate.lang.th :members: :inherited-members: ug -- .. automodule:: translate.lang.ug :members: :inherited-members: ur -- .. automodule:: translate.lang.ur :members: :inherited-members: vi -- .. automodule:: translate.lang.vi :members: :inherited-members: zh -- .. automodule:: translate.lang.zh :members: :inherited-members: translate-2.2.5/docs/api/misc.rst000066400000000000000000000021431315226724600167130ustar00rootroot00000000000000misc ==== .. automodule:: translate.misc :show-inheritance: dictutils --------- .. automodule:: translate.misc.dictutils :members: :inherited-members: file_discovery -------------- .. automodule:: translate.misc.file_discovery :members: :inherited-members: lru --- .. automodule:: translate.misc.lru :members: :inherited-members: multistring ----------- .. automodule:: translate.misc.multistring :members: :inherited-members: optrecurse ---------- .. automodule:: translate.misc.optrecurse :members: :inherited-members: ourdom ------ .. automodule:: translate.misc.ourdom :members: :inherited-members: progressbar ----------- .. automodule:: translate.misc.progressbar :members: :inherited-members: quote ----- .. automodule:: translate.misc.quote :members: :inherited-members: wsgi ---- .. automodule:: translate.misc.wsgi :members: :inherited-members: wStringIO --------- .. automodule:: translate.misc.wStringIO :members: xml_helpers ----------- .. automodule:: translate.misc.xml_helpers :members: :inherited-members: translate-2.2.5/docs/api/search.rst000066400000000000000000000016301315226724600172250ustar00rootroot00000000000000search ====== .. automodule:: translate.search :show-inheritance: indexing -------- .. automodule:: translate.search.indexing :show-inheritance: CommonIndexer ~~~~~~~~~~~~~ .. automodule:: translate.search.indexing.CommonIndexer :members: :inherited-members: PyLuceneIndexer ~~~~~~~~~~~~~~~ .. automodule:: translate.search.indexing.PyLuceneIndexer :members: :inherited-members: XapianIndexer ~~~~~~~~~~~~~ .. automodule:: translate.search.indexing.XapianIndexer :members: :inherited-members: lshtein ------- .. automodule:: translate.search.lshtein :members: :inherited-members: match ----- .. automodule:: translate.search.match :members: :inherited-members: segment ------- .. automodule:: translate.search.segment :members: :inherited-members: terminology ----------- .. automodule:: translate.search.terminology :members: :inherited-members: translate-2.2.5/docs/api/services.rst000066400000000000000000000002611315226724600176020ustar00rootroot00000000000000services ======== .. automodule:: translate.services :show-inheritance: tmserver -------- .. automodule:: translate.services.tmserver :members: :inherited-members: translate-2.2.5/docs/api/storage.rst000066400000000000000000000163361315226724600174350ustar00rootroot00000000000000storage ======= .. automodule:: translate.storage :show-inheritance: base ---- .. automodule:: translate.storage.base :members: :inherited-members: benchmark --------- .. automodule:: translate.storage.benchmark :members: :inherited-members: bundleprojstore --------------- .. automodule:: translate.storage.bundleprojstore :members: :inherited-members: catkeys ------- .. automodule:: translate.storage.catkeys :members: :inherited-members: cpo --- .. automodule:: translate.storage.cpo :members: :inherited-members: csvl10n ------- .. automodule:: translate.storage.csvl10n :members: :inherited-members: directory --------- .. automodule:: translate.storage.directory :members: :inherited-members: dtd --- .. automodule:: translate.storage.dtd :members: :inherited-members: _factory_classes ---------------- .. automodule:: translate.storage._factory_classes :members: :inherited-members: factory ------- .. automodule:: translate.storage.factory :members: :inherited-members: fpo --- .. automodule:: translate.storage.fpo :members: :inherited-members: html ---- .. automodule:: translate.storage.html :members: :inherited-members: ical ---- .. automodule:: translate.storage.ical :members: :inherited-members: ini --- .. automodule:: translate.storage.ini :members: :inherited-members: jsonl10n -------- .. automodule:: translate.storage.jsonl10n :members: :inherited-members: lisa ---- .. automodule:: translate.storage.lisa :members: :inherited-members: mo -- .. automodule:: translate.storage.mo :members: :inherited-members: mozilla_lang ------------ .. automodule:: translate.storage.mozilla_lang :members: :inherited-members: odf_io ------ .. automodule:: translate.storage.odf_io :members: :inherited-members: odf_shared ---------- .. automodule:: translate.storage.odf_shared :members: :inherited-members: omegat ------ .. automodule:: translate.storage.omegat :members: :inherited-members: oo -- .. automodule:: translate.storage.oo :members: :inherited-members: placeables ---------- .. automodule:: translate.storage.placeables :show-inheritance: base ~~~~ .. automodule:: translate.storage.placeables.base :members: :inherited-members: general ~~~~~~~ .. automodule:: translate.storage.placeables.general :members: :inherited-members: interfaces ~~~~~~~~~~ .. automodule:: translate.storage.placeables.interfaces :members: :inherited-members: lisa ~~~~ .. automodule:: translate.storage.placeables.lisa :members: :inherited-members: parse ~~~~~ .. automodule:: translate.storage.placeables.parse :members: :inherited-members: strelem ~~~~~~~ .. automodule:: translate.storage.placeables.strelem :members: :inherited-members: terminology ~~~~~~~~~~~ .. automodule:: translate.storage.placeables.terminology :members: :inherited-members: xliff ~~~~~ .. automodule:: translate.storage.placeables.xliff :members: :inherited-members: php --- .. automodule:: translate.storage.php :members: :inherited-members: pocommon -------- .. automodule:: translate.storage.pocommon :members: :inherited-members: poheader -------- .. automodule:: translate.storage.poheader :members: :inherited-members: poparser -------- .. automodule:: translate.storage.poparser :members: :inherited-members: po -- .. automodule:: translate.storage.po :members: :inherited-members: poxliff ------- .. automodule:: translate.storage.poxliff :members: :inherited-members: project ------- .. automodule:: translate.storage.project :members: :inherited-members: projstore --------- .. automodule:: translate.storage.projstore :members: :inherited-members: properties ---------- .. automodule:: translate.storage.properties :members: :inherited-members: pypo ---- .. automodule:: translate.storage.pypo :members: :inherited-members: qm -- .. automodule:: translate.storage.qm :members: :inherited-members: qph --- .. automodule:: translate.storage.qph :members: :inherited-members: rc -- .. automodule:: translate.storage.rc :members: :inherited-members: statistics ---------- .. automodule:: translate.storage.statistics :members: :inherited-members: statsdb ------- .. automodule:: translate.storage.statsdb :members: :inherited-members: subtitles --------- .. automodule:: translate.storage.subtitles :members: :inherited-members: symbian ------- .. automodule:: translate.storage.symbian :members: :inherited-members: tbx --- .. automodule:: translate.storage.tbx :members: :inherited-members: tiki ---- .. automodule:: translate.storage.tiki :members: :inherited-members: tmdb ---- .. automodule:: translate.storage.tmdb :members: :inherited-members: tmx --- .. automodule:: translate.storage.tmx :members: :inherited-members: trados ------ .. automodule:: translate.storage.trados :members: :inherited-members: ts2 --- .. automodule:: translate.storage.ts2 :members: :inherited-members: ts -- .. automodule:: translate.storage.ts :members: :inherited-members: :deprecated: txt --- .. automodule:: translate.storage.txt :members: :inherited-members: utx --- .. automodule:: translate.storage.utx :members: :inherited-members: versioncontrol -------------- .. automodule:: translate.storage.versioncontrol :members: :show-inheritance: bzr ~~~ .. automodule:: translate.storage.versioncontrol.bzr :members: :inherited-members: cvs ~~~ .. automodule:: translate.storage.versioncontrol.cvs :members: :inherited-members: darcs ~~~~~ .. automodule:: translate.storage.versioncontrol.darcs :members: :inherited-members: git ~~~ .. automodule:: translate.storage.versioncontrol.git :members: :inherited-members: hg ~~ .. automodule:: translate.storage.versioncontrol.hg :members: :inherited-members: svn ~~~ .. automodule:: translate.storage.versioncontrol.svn :members: :inherited-members: wordfast -------- .. automodule:: translate.storage.wordfast :members: :inherited-members: workflow -------- .. automodule:: translate.storage.workflow :members: :inherited-members: xliff ----- .. automodule:: translate.storage.xliff :members: :inherited-members: xml_extract ----------- .. automodule:: translate.storage.xml_extract :show-inheritance: extract ~~~~~~~ .. automodule:: translate.storage.xml_extract.extract :members: :inherited-members: generate ~~~~~~~~ .. automodule:: translate.storage.xml_extract.generate :members: :inherited-members: misc ~~~~ .. automodule:: translate.storage.xml_extract.misc :members: :inherited-members: unit_tree ~~~~~~~~~ .. automodule:: translate.storage.xml_extract.unit_tree :members: :inherited-members: xpath_breadcrumb ~~~~~~~~~~~~~~~~ .. automodule:: translate.storage.xml_extract.xpath_breadcrumb :members: :inherited-members: xml_name -------- .. automodule:: translate.storage.xml_name :members: :inherited-members: zip --- .. automodule:: translate.storage.zip :members: :inherited-members: translate-2.2.5/docs/api/tools.rst000066400000000000000000000032201315226724600171150ustar00rootroot00000000000000tools ===== .. automodule:: translate.tools :show-inheritance: build_tmdb ---------- .. automodule:: translate.tools.build_tmdb :members: :inherited-members: phppo2pypo ---------- .. automodule:: translate.tools.phppo2pypo :members: :inherited-members: poclean ------- .. automodule:: translate.tools.poclean :members: :inherited-members: pocompile --------- .. automodule:: translate.tools.pocompile :members: :inherited-members: poconflicts ----------- .. automodule:: translate.tools.poconflicts :members: :inherited-members: pocount ------- .. automodule:: translate.tools.pocount :members: :inherited-members: podebug ------- .. automodule:: translate.tools.podebug :members: :inherited-members: pogrep ------ .. automodule:: translate.tools.pogrep :members: :inherited-members: pomerge ------- .. automodule:: translate.tools.pomerge :members: :inherited-members: porestructure ------------- .. automodule:: translate.tools.porestructure :members: :inherited-members: posegment --------- .. automodule:: translate.tools.posegment :members: :inherited-members: poswap ------ .. automodule:: translate.tools.poswap :members: :inherited-members: poterminology ------------- .. automodule:: translate.tools.poterminology :members: :inherited-members: pretranslate ------------ .. automodule:: translate.tools.pretranslate :members: :inherited-members: pydiff ------ .. automodule:: translate.tools.pydiff :members: :inherited-members: pypo2phppo ---------- .. automodule:: translate.tools.pypo2phppo :members: :inherited-members: translate-2.2.5/docs/commands/000077500000000000000000000000001315226724600162565ustar00rootroot00000000000000translate-2.2.5/docs/commands/csv2po.rst000066400000000000000000000116351315226724600202320ustar00rootroot00000000000000 .. _csv2po: .. _po2csv: csv2po ****** Convert between CSV (Comma Separated Value) files and the PO format. This is useful for those translators who can only use a Spreadsheet, a modern spreadsheet can open CSV files for editing. It is also useful if you have other data such as translation memory in CSV format and you wish to use it with your PO translations. If you are starting out with your own CSV files (not created by po2csv), take note of the assumptions of the column layout explained below. .. _csv2po#usage: Usage ===== :: csv2po [options] po2csv [options] Where: +--------+----------------------------------------------+ | | is a file or directory containing CSV files | +--------+----------------------------------------------+ | | is a file or directory containing PO files | +--------+----------------------------------------------+ Options (csv2po): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in csv format -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in po, pot formats -t TEMPLATE, --template=TEMPLATE read from TEMPLATE in po, pot, pot formats -S, --timestamp skip conversion if the output file has newer timestamp -P, --pot output PO Templates (.pot) rather than PO files (.po) --charset=CHARSET set charset to decode from csv files --columnorder=COLUMNORDER specify the order and position of columns (location,source,target) --duplicates=DUPLICATESTYLE what to do with duplicate strings (identical source text): :doc:`merge, msgctxt ` (default: 'msgctxt') Options (po2csv): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in po, pot formats -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in csv format -S, --timestamp skip conversion if the output file has newer timestamp --columnorder=COLUMNORDER specify the order and position of columns (location,source,target) .. _csv2po#csv_file_layout: CSV file layout =============== The resultant CSV file has the following layout +--------+-----------------+---------------------------------------------+ | Column | Data | Description | +========+=================+=============================================+ | A | Location | All the PO #: location comments. These are | | | | needed to reconstruct or merge the CSV back | | | | into the PO file | +--------+-----------------+---------------------------------------------+ | B | Source Language | The msgid or source string | +--------+-----------------+---------------------------------------------+ | C | Target Language | The msgstr or target language | +--------+-----------------+---------------------------------------------+ .. _csv2po#examples: Examples ======== These examples demonstrate the use of csv2po:: po2csv -P pot csv We use the :opt:`-P` option to recognise POT files found in *pot* and convert them to CSV files placed in *csv*:: csv2po csv po Convert CSV files in *csv* to PO files placed in *po*:: csv2po --charset=windows-1250 -t pot csv po User working on Windows will often return files encoded in everything but Unicode. In this case we convert CSV files found in *csv* from *windows-1250* to UTF-8 and place the correctly encoded files in *po*. We use the templates found in *pot* to ensure that we preserve formatting and other data. Note that UTF-8 is the only available destination encoding. :: csv2po --columnorder=location,target,source fr.csv fr.po In case the CSV file has the columns in a different order you may use ``--columnorder``. .. _csv2po#bugs: Bugs ==== * Translation comments #[space] and KDE comments _: are not available in CSV mode which effects the translators effectiveness * Locations #: that are not conformant to PO (i.e. have spaces) will get messed up by PO tools. translate-2.2.5/docs/commands/csv2tbx.rst000066400000000000000000000064421315226724600204110ustar00rootroot00000000000000 .. _csv2tbx: csv2tbx ******* Convert between CSV (Comma Separated Value) files and the :doc:`/formats/tbx` format for terminology exchange. .. _csv2tbx#usage: Usage ===== :: csv2tbx [--charset=CHARSET] [--columnorder=COLUMNORDER] Where: +--------+------------------------+ | | is a CSV file | +--------+------------------------+ | | is the target TBX file | +--------+------------------------+ Options (csv2tbx): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in csv format -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in tbx format -S, --timestamp skip conversion if the output file has newer timestamp --charset=CHARSET set charset to decode from csv files --columnorder=COLUMNORDER specify the order and position of columns (comment,source,target) .. _csv2tbx#csv_file_layout: CSV file layout =============== The CSV file is expected to have three columns (separated by commas, not other characters like semicolons), of which the default layout is +--------+-----------------+-------------------------------------------------+ | Column | Data | Description | +========+=================+=================================================+ | A | Comment | All the PO #: location comments. These are not | | | | used in the TBX files, and can be left empty, | | | | but could be generated by :doc:`po2csv `| +--------+-----------------+-------------------------------------------------+ | B | Source Language | The msgid or source string | +--------+-----------------+-------------------------------------------------+ | C | Target Language | The msgstr or target language | +--------+-----------------+-------------------------------------------------+ .. _csv2tbx#examples: Examples ======== These examples demonstrate the use of csv2tbx:: csv2tbx terms.csv terms.tbx to simply convert *terms.csv* to *terms.tbx*. To convert a directory recursively to another directory with the same structure of files:: csv2tbx csv-dir tbx-target-dir This will convert CSV files in *csv-dir* to TBX files placed in *tbx-target-dir*.:: csv2tbx --charset=windows-1250 csv tbx Users working on Windows will often return files in encoding other the Unicode based encodings. In this case we convert CSV files found in *csv* from *windows-1250* to UTF-8 and place the correctly encoded files in *tbx*. Note that UTF-8 is the only available destination encoding. .. _csv2tbx#two_column_csv: Two column CSV ============== :: csv2tbx --columnorder=source,target foo.csv foo.tbx .. _csv2tbx#notes: Notes ===== For conformance to the standards and to see which features are implemented, see :doc:`/formats/csv` and :doc:`/formats/tbx`. translate-2.2.5/docs/commands/general_usage.rst000066400000000000000000000040171315226724600216130ustar00rootroot00000000000000 .. _general_usage: General Usage ************* The tools follow a general usage convention which is helpful to understand. .. _general_usage#input_&_output: Input & Output ============== The last two arguments of your command are the input and output files/directories:: moz2po You can of course still use the :opt:`-i` and :opt:`-o` options which allows you to reorder commands :: moz2po -o -i .. _general_usage#error_reporting: Error Reporting =============== All tools accept the option :opt:`--errorlevel`. If you find a bug, add this option and send the traceback to the developers. :: moz2po --errorlevel=traceback .. _general_usage#templates: Templates ========= If you are working with any file format and you wish to preserve comments and layout then use your source file as a template. :: po2dtd -t This will use the files in ```` as a template, merge the PO files in ````, and create new DTD files in ```` If you ran this without the templates you would get valid DTD files but they would not preserve the layout or all the comments from the source DTD file The same concept of templates is also used when you merge files. :: pomerge -t This would take the ```` files merge in the ```` and output new PO files, preserving formatting, into ````. You can use the same directory for ```` and ```` if you want the merges to overwrite files in ````. .. _general_usage#source2target: source2target ============= The converters all follow this convention: * source = the format from which you are converting e.g. in :doc:`oo2po ` we are converting from OpenOffice.org SDF/GSI * target = the format into which you are converting e.g. in :doc:`oo2po ` we are converting to Gettext PO .. _general_usage#getting_help: Getting Help ============ The :opt:`--help` option will always list the available commands for the tool. :: moz2po --help translate-2.2.5/docs/commands/html2po.rst000066400000000000000000000071711315226724600204030ustar00rootroot00000000000000 .. _html2po: .. _po2html: html2po ******* Convert translatable items in HTML to the PO format. .. _html2po#usage: Usage ===== :: html2po [options] po2html [options] Where: +---------+-----------------------------------------------+ | | is an HTML file or a directory of HTML files | +---------+-----------------------------------------------+ | | is a PO file or directory of PO files | +---------+-----------------------------------------------+ Options (html2po): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in htm, html, xhtml formats -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in po, pot formats -S, --timestamp skip conversion if the output file has newer timestamp -P, --pot output PO Templates (.pot) rather than PO files (.po) -u, --untagged include untagged sections --keepcomments preserve html comments as translation notes in the output --duplicates=DUPLICATESTYLE what to do with duplicate strings (identical source text): :doc:`merge, msgctxt ` (default: 'msgctxt') Options (po2html): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in po, pot formats -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in htm, html, xhtml formats -t TEMPLATE, --template=TEMPLATE read from TEMPLATE in htm, html, xhtml formats -S, --timestamp skip conversion if the output file has newer timestamp --threshold=PERCENT only convert files where the translation completion is above PERCENT --fuzzy use translations marked fuzzy --nofuzzy don't use translations marked fuzzy (default) .. _html2po#examples: Examples ======== :: html2po -P site pot This will find all HTML files (.htm, .html, .xhtml) in *site*, convert them to POT files and place them in *pot*:: po2html -t site xh site-xh All the PO translations in *xh* will be converted to html using html files in *site* as templates and outputting new translated HTML files in *site-xh* .. _html2po#bugs: Bugs ==== We don't hide enough of some of the tags, e.g. tags have too much exposed, we should expose only what needs to be translated and allow the changing on position of the tag within the translation block. Similarly there is some markup that could be excluded e.g. tags that appear at the start and end of a msgid, i.e. they don't need placement from the translator. If the HTML is indented you get very odd msgid's Some items end up in the msgid's that should not be translated It might be worth investigating http://opensource.bureau-cornavin.com/html2pot-po2html/index.html which uses XSLT to transform XHTML to Gettext PO translate-2.2.5/docs/commands/ical2po.rst000066400000000000000000000102771315226724600203500ustar00rootroot00000000000000 .. _ical2po: .. _po2ical: ical2po ******* .. versionadded:: 1.2 Converts iCalendar (\*.ics) files to Gettext PO format. .. _ical2po#usage: Usage ===== :: ical2po [options] po2ical [options] -t Where: +---------+---------------------------------------------------+ | | is a valid .ics file or directory of those files | +---------+---------------------------------------------------+ | | is a directory of PO or POT files | +---------+---------------------------------------------------+ Options (ical2po): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in ics format -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in po, pot formats -t TEMPLATE, --template=TEMPLATE read from TEMPLATE in ics format -S, --timestamp skip conversion if the output file has newer timestamp -P, --pot output PO Templates (.pot) rather than PO files (.po) --duplicates=DUPLICATESTYLE what to do with duplicate strings (identical source text): :doc:`merge, msgctxt ` (default: 'msgctxt') Options (po2ical): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in po, pot formats -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in ics format -t TEMPLATE, --template=TEMPLATE read from TEMPLATE in ics format -S, --timestamp skip conversion if the output file has newer timestamp --threshold=PERCENT only convert files where the translation completion is above PERCENT --fuzzy use translations marked fuzzy --nofuzzy don't use translations marked fuzzy (default) .. _ical2po#examples: Examples ======== This example looks at roundtrip of iCalendar translations. While you can do recovery of translations, its unlikely that you will ever need to do that. First we need to create a set of POT files. :: ical2po -P ical.ics ical.pot The ical.ics file is converted to Gettext POT files called ical.pot. Directories of iCalendar files can also be processed. Begin translating the ical.pot file by first copying it to make a PO file. :: cp ical.pot ical-af.po You are now in a position to translate the file ical-af.po in your favourite translation tool. Once translated you can convert back as follows:: po2ical -t ical.ics ical-af.po ical-af.ics Your translations found in the Afrikaans PO file, ``ical-af.po``, will be converted to .ics using the file ``ical.ics`` as a template and creating your newly translated .ics file ``ical-af.ics``. To update your translations simply redo the POT creation step and make use of :doc:`pot2po` to bring your translation up-to-date. .. _ical2po#notes: Notes ===== The converter will only process events in the calendar file, the file itself can contain many other things that could be localisable. Please raise a bug if you want to extract additional items. The converter does not make use of the LANGUAGE attribute which is permitted in the format. The LANGUAGE attribute does not aid multilingualism in this context so is ignored. The converter could conceivably also process :wp:`vCard ` files, but this has not been implemented for lack of a clear need. Please raise a bug with an example if you have such a file that could benefit from localisation. translate-2.2.5/docs/commands/index.rst000066400000000000000000000137111315226724600201220ustar00rootroot00000000000000.. _commands: .. _commands#converters: Converters ********** .. toctree:: :maxdepth: 1 :hidden: general_usage moz2po oo2po odf2xliff prop2po php2po sub2po txt2po po2wordfast po2tmx pot2po csv2po csv2tbx tbx2po html2po ical2po ini2po json2po web2py2po rc2po resx2po symb2po tiki2po ts2po xliff2po l20n2po .. toctree:: :maxdepth: 1 :hidden: option_errorlevel option_duplicates option_progress option_filteraction option_multifile option_personality option_accelerator Converters change many different formats to PO and back again. Sometimes only one direction is supported, or conversion is done using non-PO formats. The converters follow a :doc:`general pattern of usage `, understanding that will make the converters much easier to use and understand. * :doc:`moz2po ` -- Mozilla .properties and .dtd converter. Works with Firefox and Thunderbird * :doc:`oo2po ` -- OpenOffice.org SDF converter (Also works as ``oo2xliff``). * :doc:`odf2xliff ` -- Convert OpenDocument (ODF) documents to XLIFF and vice-versa. * :doc:`prop2po ` -- Java property file (.properties) converter * :doc:`php2po ` -- PHP localisable string arrays converter. * :doc:`sub2po ` -- Converter for various subtitle files * :doc:`txt2po ` -- Plain text to PO converter * :doc:`po2wordfast ` -- Wordfast Translation Memory converter * :doc:`po2tmx ` -- TMX (Translation Memory Exchange) converter * :doc:`pot2po ` -- initialise PO Template files for translation * :doc:`csv2po ` -- Comma Separated Value (CSV) converter. Useful for doing translations using a spreadsheet. * :doc:`csv2tbx ` -- Create TBX (TermBase eXchange) files from Comma Separated Value (CSV) files * :doc:`html2po ` -- HTML converter * :doc:`ical2po ` -- iCalendar file converter * :doc:`ini2po ` -- Windows INI file converter * :doc:`json2po ` -- JSON file converter * :doc:`web2py2po` -- web2py translation to PO converter * :doc:`rc2po ` -- Windows Resource .rc (C++ Resource Compiler) converter * :doc:`resx2po ` -- .Net Resource (.resx) file converter * :doc:`symb2po ` -- Symbian-style translation to PO converter * :doc:`tiki2po ` -- `TikiWiki `_ language.php converter * :doc:`ts2po ` -- Qt Linguist .ts converter * :doc:`xliff2po ` -- XLIFF (XML Localisation Interchange File Format) converter .. _commands#tools: Tools ***** The PO tools allow you to manipulate and work with PO files .. _commands#quality_assurance: Quality Assurance ================= .. toctree:: :maxdepth: 1 :hidden: poconflicts pofilter pofilter_tests pogrep pomerge porestructure junitmsgfmt These tools are especially useful for measuring and improving translation quality. * :doc:`poconflicts` -- extract messages that have conflicting translation * :doc:`pofilter` -- filter PO files to find common errors using a :doc:`number of tests ` * :doc:`pogrep` -- find strings in your PO files * :doc:`pomerge` -- merge file extracted using pofilter back into the original files * :doc:`porestructure` -- restructures PO files according to poconflict directives * :doc:`junitmsgfmt` -- run msgfmt and provide JUnit type output for use in continuous integration systems like Hudson and Jenkins .. _commands#other_tools: Other tools =========== .. toctree:: :maxdepth: 1 :hidden: tmserver poterminology poterminology_stopword_file pocount podebug option_rewrite posegment pocompile poswap poclean pretranslate levenshtein_distance * :doc:`tmserver` -- a Translation Memory server, can be queried over HTTP using JSON * :doc:`poterminology` -- extracts potential terminology from your translation files * :doc:`pocount` -- Count words and strings in PO, XLIFF and other types of translatable files * :doc:`podebug` -- Add debug strings to messages * :doc:`posegment` -- Break a PO or XLIFF files into sentence segments, useful for creating a segmented translation memory * :doc:`pocompile` -- create an MO (Machine Object) file from a PO or XLIFF file * :doc:`poswap` -- uses a translation of another language that you would rather use than English as source language * :doc:`poclean` -- produces a clean file from an unclean file (Trados/Wordfast) by stripping out the tw4win indicators * :doc:`pretranslate` -- fill any missing translations from translation memory via fuzzy matching. * :doc:`levenshtein_distance` -- edit distance algorithms for translation memory matching .. _commands#scripts: Scripts ******* .. toctree:: :maxdepth: 1 :hidden: mozilla_l10n_scripts moz-l10n-builder phase pocompendium pocommentclean pomigrate2 popuretext poreencode posplit The scripts are for working with and manipulating PO files. Unlike the ``tools`` which are written in Python, the scripts are written in ``bash``. Some of them are packaged since version 1.0 of the Toolkit, but you might need to download them from version control and do a manual installation . * :doc:`moz-l10n-builder` -- Create Mozilla XPIs and rebuild Windows installers from existing translations * :doc:`mozilla_l10n_scripts` -- Build Mozilla products Firefox and Thunderbird * :doc:`phase` -- Helps manage a project divided into phases of work, including sending, checking, etc * :doc:`pocompendium` -- Creates various types of PO compendium (i.e. combines many PO files into a single PO file) * :doc:`pocommentclean` -- Remove all translator comments from a PO file * :doc:`pomigrate2` -- Migrate older PO files to new POT files * :doc:`popuretext` -- Extracts all the source text from a directory of POT files * :doc:`poreencode` -- Converts PO files to a new character encoding * :doc:`posplit` -- Split a PO file into translate, untranslated and fuzzy files translate-2.2.5/docs/commands/ini2po.rst000066400000000000000000000125521315226724600202150ustar00rootroot00000000000000 .. _ini2po: .. _po2ini: ini2po ****** Converts .ini files to Gettext PO format. .. _ini2po#usage: Usage ===== :: ini2po [options] po2ini [options] -t Where: +---------+---------------------------------------------------+ | | is a valid .ini file or directory of those files | +---------+---------------------------------------------------+ | | is a directory of PO or POT files | +---------+---------------------------------------------------+ Options (ini2po): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in ini, isl, iss formats -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in po, pot formats -t TEMPLATE, --template=TEMPLATE read from TEMPLATE in ini, isl, iss formats -S, --timestamp skip conversion if the output file has newer timestamp -P, --pot output PO Templates (.pot) rather than PO files (.po) --duplicates=DUPLICATESTYLE what to do with duplicate strings (identical source text): :doc:`merge, msgctxt ` (default: 'msgctxt') Options (po2ini): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in po, pot formats -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in ini, isl formats -t TEMPLATE, --template=TEMPLATE read from TEMPLATE in ini, isl formats -S, --timestamp skip conversion if the output file has newer timestamp --threshold=PERCENT only convert files where the translation completion is above PERCENT --fuzzy use translations marked fuzzy --nofuzzy don't use translations marked fuzzy (default) .. _ini2po#formats_supported: Formats Supported ================= INI files need to be organized into separate languages per file and in the following format:: [Section] ; a comment a = a string Comment marked with the hash symbol (#) are also allowed, and the colon (:) is also accepted as key-value delimiter:: [Section] # another comment b : a string This variants in comment marks and key-value delimiters can be mixed in one single INI file:: [Section] ; a comment a = a string # another comment b : a string c:'other example with apostrophes' d:"example with double quotes" The spacing between the key-value delimiter and the key, and the between the value and the key-value delimiter is not important since the converter automatically strips the blank spaces. .. note:: A section must be present at the file beginning in order to get ini2po working properly. You may add it by hand at the file beginning. .. note:: Strings marked with double quotes and/or apostrophes will carry these quotation marks to the generated .po file, so they will appear like: .. code-block:: po #: [Section]c msgid "'other example with apostrophes'" msgstr "" #: [Section]d msgid "\"example with double quotes\"" msgstr "" .. _ini2po#examples: Examples ======== This example looks at roundtrip of .ini translations as well as recovery of existing translations. First we need to create a set of POT files. :: ini2po -P ini/ pot/ All .ini files found in the ``ini/`` directory are converted to Gettext POT files and placed in the ``pot/`` directory. If you are translating for the first time then you can skip the next step. If you need to recover your existing translations then we do the following:: ini2po -t lang/ zu/ po-zu/ Using the English .ini files found in ``lang/`` and your existing Zulu translation in ``zu/`` we create a set of PO files in ``po-zu/``. These will now have your translations. Please be aware that in order for the to work 100% you need to have both English and Zulu at the same revision. If they are not, you will have to review all translations. You are now in a position to translate your recovered translations or your new POT files. Once translated you can convert back as follows:: po2ini -t lang/ po-zu/ zu/ Your translations found in the Zulu PO directory, ``po-zu/``, will be converted to .ini using the files in ``lang/`` as templates and placing your newly translated .ini files in ``zu/``. To update your translations simply redo the POT creation step and make use of :doc:`pot2po` to bring your translation up-to-date. .. _ini2po#issues: Issues ====== We do not extract comments from .ini files. These are sometimes needed as developers provide guidance to translators in these comments. translate-2.2.5/docs/commands/json2po.rst000066400000000000000000000100121315226724600203740ustar00rootroot00000000000000 .. _json2po: .. _po2json: json2po ******* Converts .json files to Gettext PO format. .. _json2po#usage: Usage ===== :: json2po [options] po2json [options] -t Where: +---------+---------------------------------------------------+ | | is a valid .json file or directory of those files | +---------+---------------------------------------------------+ | | is a directory of PO or POT files | +---------+---------------------------------------------------+ Options (json2po): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in JSON format -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in po, pot formats -t TEMPLATE, --template=TEMPLATE read from TEMPLATE in JSON format -S, --timestamp skip conversion if the output file has newer timestamp -P, --pot output PO Templates (.pot) rather than PO files (.po) --filter=FILTER leaves to extract e.g. 'name,desc': (default: extract everything) --duplicates=DUPLICATESTYLE what to do with duplicate strings (identical source text): :doc:`merge, msgctxt ` (default: 'msgctxt') Options (po2json): --version show program's version number and exit -h, --help show this help message and exit --manpage output a manpage based on the help --progress=PROGRESS show progress as: :doc:`dots, none, bar, names, verbose ` --errorlevel=ERRORLEVEL show errorlevel as: :doc:`none, message, exception, traceback ` -i INPUT, --input=INPUT read from INPUT in po, pot formats -x EXCLUDE, --exclude=EXCLUDE exclude names matching EXCLUDE from input paths -o OUTPUT, --output=OUTPUT write to OUTPUT in JSON format -t TEMPLATE, --template=TEMPLATE read from TEMPLATE in JSON format -S, --timestamp skip conversion if the output file has newer timestamp --threshold=PERCENT only convert files where the translation completion is above PERCENT --fuzzy use translations marked fuzzy --nofuzzy don't use translations marked fuzzy (default) --removeuntranslated remove untranslated strings from output .. _json2po#examples: Examples ======== This example looks at roundtrip of .json translations as well as recovery of existing translations. First we need to create a set of POT files. :: json2po -P json/ pot/ All .json files found in the ``json/`` directory are converted to Gettext POT files and placed in the ``pot/`` directory. If you are translating for the first time then you can skip the next step. If you need to recover your existing translations then we do the following:: json2po -t lang/ zu/ po-zu/ Using the English .json files found in ``lang/`` and your existing Zulu translation in ``zu/`` we create a set of PO files in ``po-zu/``. These will now have your translations. Please be aware that in order for the to work 100% you need to have both English and Zulu at the same revision. If they are not, you will have to review all translations. You are now in a position to translate your recovered translations or your new POT files. Once translated you can convert back as follows:: po2json -t lang/ po-zu/ zu/ Your translations found in the Zulu PO directory, ``po-zu/``, will be converted to .json using the files in ``lang/`` as templates and placing your newly translated .json files in ``zu/``. To update your translations simply redo the POT creation step and make use of :doc:`pot2po` to bring your translation up-to-date. translate-2.2.5/docs/commands/junitmsgfmt.rst000066400000000000000000000004031315226724600213540ustar00rootroot00000000000000 .. _junitmsgfmt: junitmsgfmt *********** .. versionadded:: 1.7 Run msgfmt and provide JUnit type output for use in continuous integration systems like Hudson and Jenkins. .. _junitmsgfmt#usage: Usage ===== :: junitmsgfmt po/*.po > msgfmt_junit.xml translate-2.2.5/docs/commands/l20n2po.rst000066400000000000000000000112341315226724600202050ustar00rootroot00000000000000 .. _l20n2po: .. _po2l20n: l20n2po ******* Convert between L20n files (.ftl) and Gettext PO format. .. _l20n2po#usage: Usage ===== :: l20n2po [options] po2l20n [options] -t