Package translate

[hide private]
[frames] | no frames]

# Package translate

source code

The Translate Toolkit is a Python package that assists in localization of software.

See http://translate.sourceforge.net/wiki/toolkit/index or http://translate.org.za for more information.

Organization: Zuza Software Foundation

Copyright: 2002-2009 Zuza Software Foundation

License: GPL

Submodules | [hide private]

Localization and Localizable File Formats

- translate.storage: translate.storage is part of the translate package It contains classes that represent various storage formats for localization
  - translate.storage.base: Base classes for storage interfaces.
  - translate.storage.benchmark
  - translate.storage.cpo: Classes that hold units of .po files (pounit) or entire files (pofile).
  - translate.storage.csvl10n: classes that hold units of comma-separated values (.csv) files (csvunit) or entire files (csvfile) for use with localisation
  - translate.storage.directory: This module provides functionality to work with directories.
  - translate.storage.dtd: classes that hold units of .dtd files (dtdunit) or entire files (dtdfile) these are specific .dtd files for localisation used by mozilla
  - translate.storage.factory: factory methods to build real storage objects that conform to base.py
  - translate.storage.fpo: Classes for the support of Gettext .po and .pot files.
  - translate.storage.html: module for parsing html files for translation
  - translate.storage.ical: Class that manages iCalender files for translation
  - translate.storage.ini: Class that manages .ini files for translation
  - translate.storage.lisa: Parent class for LISA standards (TMX, TBX, XLIFF)
  - translate.storage.mo: Module for parsing Gettext .mo files for translation.
  - translate.storage.odf_io
  - translate.storage.odf_shared
  - translate.storage.omegat: Manage the OmegaT glossary format
  - translate.storage.oo: Classes that hold units of .oo files (oounit) or entire files (oofile).
  - translate.storage.php: Classes that hold units of PHP localisation files phpunit or entire files phpfile.
  - translate.storage.placeables: This module implements basic functionality to support placeables.
    - translate.storage.placeables.base: Contains base placeable classes with names based on XLIFF placeables.
    - translate.storage.placeables.general: Contains general placeable implementations.
    - translate.storage.placeables.interfaces: This file contains abstract (semantic) interfaces for placeable implementations.
    - translate.storage.placeables.lisa
    - translate.storage.placeables.parse
    - translate.storage.placeables.parse': Contains the `parse` function that parses normal strings into StringElem- based "rich" string element trees.
    - translate.storage.placeables.strelem: Contains the base StringElem class that represents a node in a parsed rich- string tree.
    - translate.storage.placeables.terminology: Contains the placeable that represents a terminology term.
    - translate.storage.placeables.xliff: Contains XLIFF-specific placeables.
  - translate.storage.po: A class loader that will load C or Python implementations of the PO class depending on the USECPO variable.
  - translate.storage.pocommon
  - translate.storage.poheader: class that handles all header functions for a header in a po file
  - translate.storage.poparser
  - translate.storage.poxliff: XLIFF classes specifically suited for handling the PO representation in XLIFF.
  - translate.storage.properties: classes that hold units of .properties files (propunit) or entire files (propfile) these files are used in translating Mozilla and other software
  - translate.storage.pypo: classes that hold units of .po files (pounit) or entire files (pofile) gettext-style .po (or .pot) files are used in translations for KDE et al (see kbabel)
  - translate.storage.qm: Module for parsing Qt .qm files
  - translate.storage.qph: Module for handling Qt Linguist Phrase Book (.qph) files.
  - translate.storage.rc: Classes that hold units of .rc files (rcunit) or entire files (rcfile) used in translating Windows Resources.
  - translate.storage.statistics: Module to provide statistics and related functionality.
  - translate.storage.statsdb: Module to provide a cache of statistics in a database.
  - translate.storage.subtitles: Class that manages subtitle files for translation
  - translate.storage.symbian
  - translate.storage.tbx: module for handling TBX glossary files
  - translate.storage.tiki: Class that manages TikiWiki files for translation.
  - translate.storage.tmdb: Module to provide a translation memory database.
  - translate.storage.tmx: module for parsing TMX translation memeory files
  - translate.storage.ts: Module for parsing Qt .ts files for translation.
  - translate.storage.ts2: Module for handling Qt linguist (.ts) files.
  - translate.storage.txt: This class implements the functionality for handling plain text files, or similar wiki type files.
  - translate.storage.versioncontrol: This module manages interaction with version control systems.
    - translate.storage.versioncontrol.bzr
    - translate.storage.versioncontrol.cvs
    - translate.storage.versioncontrol.darcs
    - translate.storage.versioncontrol.git
    - translate.storage.versioncontrol.hg
    - translate.storage.versioncontrol.svn
  - translate.storage.wordfast: Manage the Wordfast Translation Memory format
  - translate.storage.xliff: Module for handling XLIFF files for translation.
  - translate.storage.xml_extract
    - translate.storage.xml_extract.extract
    - translate.storage.xml_extract.generate
    - translate.storage.xml_extract.misc
    - translate.storage.xml_extract.unit_tree
    - translate.storage.xml_extract.xpath_breadcrumb
  - translate.storage.xml_name
  - translate.storage.xpi: module for accessing mozilla xpi packages
  - translate.storage.zip: This module provides functionality to work with zip files.

Format Converters

- translate.convert: translate.convert is part of the translate package It contains code to convert between different storage formats for localizations
  - translate.convert.accesskey: functions used to manipulate access keys in strings
  - translate.convert.convert: Handles converting of files between formats (used by translate.convert tools)
  - translate.convert.csv2po: convert Comma-Separated Value (.csv) files to Gettext PO localization files
  - translate.convert.csv2tbx: convert Comma-Separated Value (.csv) files to a TermBase eXchange (.tbx) glossary file
  - translate.convert.dtd2po: script to convert a mozilla .dtd UTF-8 localization format to a gettext .po localization file using the po and dtd modules, and the dtd2po convertor class which is in this module You can convert back to .dtd using po2dtd.py
  - translate.convert.html2po: convert HTML files to Gettext PO localization files
  - translate.convert.ical2po: convert iCal files to Gettext PO localization files
  - translate.convert.ini2po: convert .ini files to Gettext PO localization files
  - translate.convert.moz2po: convert Mozilla .dtd and .properties files to Gettext PO localization files
  - translate.convert.mozfunny2prop: converts funny mozilla files to properties files
  - translate.convert.odf2xliff: convert OpenDocument (ODF) files to XLIFF localization files
  - translate.convert.oo2po: convert an OpenOffice.org (SDF) localization file to Gettext PO localization files
  - translate.convert.oo2xliff: convert an OpenOffice.org (SDF) localization file to XLIFF localization files
  - translate.convert.php2po: convert PHP localization files to Gettext PO localization files
  - translate.convert.po2csv: convert Gettext PO localization files to Comma-Separated Value (.csv) files
  - translate.convert.po2dtd: script that converts a .po file to a UTF-8 encoded .dtd file as used by mozilla either done using a template or just using the .po file
  - translate.convert.po2html: convert Gettext PO localization files to HTML files
  - translate.convert.po2ical: convert Gettext PO localization files to iCal files
  - translate.convert.po2ini: convert Gettext PO localization files to .ini files
  - translate.convert.po2moz: convert Gettext PO localization files to Mozilla .dtd and .properties files
  - translate.convert.po2oo: convert Gettext PO localization files to an OpenOffice.org (SDF) localization file
  - translate.convert.po2php: convert Gettext PO localization files to PHP localization files
  - translate.convert.po2prop: convert Gettext PO localization files to Java/Mozilla .properties files
  - translate.convert.po2rc: Convert Gettext PO localization files back to Windows Resource (.rc) files
  - translate.convert.po2sub: Convert Gettext PO localization files to subtitle files
  - translate.convert.po2symb: convert Gettext PO localization files to Symbian translation files.
  - translate.convert.po2tiki: Convert .po files to TikiWiki's language.php files.
  - translate.convert.po2tmx: convert Gettext PO localization files to a TMX (Translation Memory eXchange) file
  - translate.convert.po2ts: convert Gettext PO localization files to Qt Linguist (.ts) files
  - translate.convert.po2txt: convert Gettext PO localization files to plain text (.txt) files
  - translate.convert.po2web2py: convert GNU/gettext PO files to web2py translation dictionaries (.py)
  - translate.convert.po2wordfast: convert Gettext PO localization files to a Wordfast translation memory file
  - translate.convert.po2xliff: convert Gettext PO localization files to XLIFF localization files
  - translate.convert.poreplace: simple script to do replacements on translated strings inside po files
  - translate.convert.pot2po: Convert template files (like .pot or template .xlf files) translation files, preserving existing translations.
  - translate.convert.prop2mozfunny: converts properties files back to funny mozilla files
  - translate.convert.prop2po: convert Java/Mozilla .properties files to Gettext PO localization files
  - translate.convert.rc2po: convert .rc files to Gettext PO localization files
  - translate.convert.sub2po: convert subtitle files to Gettext PO localization files
  - translate.convert.symb2po: Convert Symbian localisation files to Gettext PO localization files.
  - translate.convert.tiki2po: Convert TikiWiki's language.php files to GetText PO files.
  - translate.convert.ts2po: convert Qt Linguist (.ts) files to Gettext PO localization files
  - translate.convert.txt2po: convert plain text (.txt) files to Gettext PO localization files
  - translate.convert.web2py2po: convert web2py translation dictionaries (.py) to GNU/gettext PO files
  - translate.convert.xliff2odf: convert OpenDocument (ODF) files to Gettext PO localization files
  - translate.convert.xliff2oo: convert XLIFF localization files to an OpenOffice.org (SDF) localization file
  - translate.convert.xliff2po: Convert XLIFF localization files to Gettext PO localization files.

Localisation File Checker

- translate.filters: Filters that can be used on translations...
  - translate.filters.autocorrect: A set of autocorrect functions that fix common punctuation and space problems automatically
  - translate.filters.checks: This is a set of validation checks that can be performed on translation units.
  - translate.filters.decoration: functions to get decorative/informative text out of strings...
  - translate.filters.helpers: a set of helper functions for filters...
  - translate.filters.pofilter: Perform quality checks on Gettext PO, XLIFF and TMX localization files
  - translate.filters.prefilters: This is a set of string filters that strings can be passed through before certain tests.
  - translate.filters.spelling: An API to provide spell checking for use in checks or elsewhere.

Localization File Manipulation Tools

- translate.tools: translate.tools is part of the translate package It contains code to perform various operations (mostly on po files)
  - translate.tools.build_tmdb: Import units from translations files into tmdb.
  - translate.tools.phppo2pypo: Convert PHP format .po files to Python format .po files
  - translate.tools.poclean: Produces a clean file from an unclean file (Trados/Wordfast) by stripping out the tw4win indicators.
  - translate.tools.pocompile: Compile XLIFF and Gettext PO localization files into Gettext MO (Machine Object) files
  - translate.tools.poconflicts: Conflict finder for Gettext PO localization files
  - translate.tools.pocount: Create string and word counts for supported localization files including: XLIFF, TMX, Gettex PO and MO, Qt .ts and .qm, Wordfast TM, etc
  - translate.tools.podebug: Insert debug messages into XLIFF and Gettext PO localization files
  - translate.tools.pogrep: Grep XLIFF, Gettext PO and TMX localization files
  - translate.tools.pomerge: Merges XLIFF and Gettext PO localization files
  - translate.tools.porestructure: Restructure Gettxt PO files produced by poconflicts into the original directory tree for merging using pomerge
  - translate.tools.posegment: Segment Gettext PO, XLIFF and TMX localization files at the sentence level.
  - translate.tools.poswap: Builds a new translation file with the target of the input language as source language.
  - translate.tools.poterminology: reads a set of .po or .pot files to produce a pootle-terminology.pot
  - translate.tools.pretranslate: Fill localization files with suggested translations based on translation memory and existing translations.
  - translate.tools.pydiff: diff tool like GNU diff, but lets you have special options that are useful in dealing with PO files
  - translate.tools.pypo2phppo: Convert Python format .po files to PHP format .po files

Language Specifications

- translate.lang: lang contains classes that represent languages and provides language specific information.
  - translate.lang.af: This module represents Afrikaans language.
  - translate.lang.am: This module represents Amharic language.
  - translate.lang.ar: This module represents Arabic language.
  - translate.lang.bn: This module represents Bengali language.
  - translate.lang.code_or: This module represents Oriya language.
  - translate.lang.common: This module contains all the common features for languages.
  - translate.lang.data: This module stores information and functionality that relates to plurals.
  - translate.lang.de: This module represents German language.
  - translate.lang.el: This module represents Greek language.
  - translate.lang.es: This module represents Spanish language.
  - translate.lang.fa: This module represents Persian language.
  - translate.lang.factory: This module provides a factory to instantiate language classes.
  - translate.lang.fi: This module represents the Finish language.
  - translate.lang.fr: This module represents French language.
  - translate.lang.he: This module represents Hebrew language.
  - translate.lang.hy: This module represents Armenian language.
  - translate.lang.identify: This module contains functions for identifying languages based on language models.
  - translate.lang.ja: This module represents Japanese language.
  - translate.lang.km: This module represents Khmer language.
  - translate.lang.kn: This module represents Kannada language.
  - translate.lang.ko: This module represents Korean language.
  - translate.lang.ml: This module represents Malayalam language.
  - translate.lang.ne: This module represents Nepali language.
  - translate.lang.ngram
  - translate.lang.pa: This module represents Punjabi language.
  - translate.lang.poedit: Functions to manage Poedit's language features.
  - translate.lang.si: This module represents Sinhala language.
  - translate.lang.st: This module represents the Southern Sotho language.
  - translate.lang.sv: This module represents the Swedish language.
  - translate.lang.te: This module represents Telugu language.
  - translate.lang.team: Module to guess the language ISO code based on the 'Language-Team entry in the header of a Gettext PO file.
  - translate.lang.th: This module represents Thai language.
  - translate.lang.ur: This module represents Urdu language.
  - translate.lang.vi: This module represents Vietnamese language.
  - translate.lang.zh: This module represents Chinese language.

Search and String Matching

- translate.search: translate.search is part of the Translate Toolkit.
  - translate.search.indexing: interface for differrent indexing engines for the translate toolkit
    - translate.search.indexing.CommonIndexer: base class for interfaces to indexing engines for pootle
    - translate.search.indexing.PyLuceneIndexer: interface for the PyLucene (v2.x) indexing engine
    - translate.search.indexing.PyLuceneIndexer1: interface for the pylucene (v1.x) indexing engine
    - translate.search.indexing.XapianIndexer: Interface to the Xapian indexing engine for the Translate Toolkit
  - translate.search.lshtein: A class to calculate a similarity based on the Levenshtein distance.
  - translate.search.match: Class to perform translation memory matching from a store of translation units
  - translate.search.segment: Module to deal with different types and uses of segmentation
  - translate.search.terminology: A class that does terminology matching

Services

- translate.services: translate.services is part of the translate toolkit.
  - translate.services.lookupclient: Small example program for querying an XML-RPC lookup service
  - translate.services.lookupservice: Server program to serve messages over XML-RPC
  - translate.services.tmserver: A translation memory server using tmdb for storage, communicates with clients using JSON over HTTP.

Miscellaneous

- translate.__version__: This file contains the version of the Translate Toolkit.
- translate.i18n: Internationalization functions and functionality
- translate.misc: Miscellaneous modules for translate - including modules for backward compatibility with pre-2.3 versions of Python
  - translate.misc.autoencode: Supports a hybrid Unicode string that knows which encoding is preferable, and uses this when converting to a string.
  - translate.misc.context
  - translate.misc.contextlib: Utilities for with-statement contexts.
  - translate.misc.dictutils: Implements a case-insensitive (on keys) dictionary and order-sensitive dictionary
  - translate.misc.file_discovery
  - translate.misc.hash: This module contains some temporary glue to make us work with md5 hashes on old and new versions of Python.
  - translate.misc.ini: Access and/or modify INI files
  - translate.misc.lru
  - translate.misc.multistring: Supports a hybrid Unicode string that can also have a list of alternate strings in the strings attribute
  - translate.misc.optrecurse
  - translate.misc.ourdom: module that provides modified DOM functionality for our needs
  - translate.misc.progressbar: progress bar utilities for reporting feedback on progress of application...
  - translate.misc.quote: String processing utilities for extracting strings with various kinds of delimiters
  - translate.misc.selector: selector - WSGI delegation based on URL path and method.
  - translate.misc.sparse: simple parser / string tokenizer rather than returning a list of token types etc, we simple return a list of tokens...
  - translate.misc.stdiotell: A wrapper for sys.stdout etc that provides tell() for current position
  - translate.misc.textwrap: Text wrapping and filling.
  - translate.misc.typecheck
    - translate.misc.typecheck.mixins
    - translate.misc.typecheck.sets
    - translate.misc.typecheck.typeclasses
  - translate.misc.wStringIO: A wrapper for cStringIO that provides more of the functions of StringIO at the speed of cStringIO
  - translate.misc.wsgi: wrapper tht tries to pick the best available wsgi server
  - translate.misc.xml_helpers: Helper functions for working with XML.
  - translate.misc.xmlwrapper: simpler wrapper to the elementtree XML parser
  - translate.misc.zipfileext: extensions to zipfile standard module that will hopefully get included in future...

Imports: storage, i18n, lang