| Home | Trees | Index | Help |
|---|
| Package Pootle :: Package storage :: Module ddtp :: Class DDTPModule |
|
object --+
|
DDTPModule
A wrapper for a folder that stores DDTP translations.
Internally the strings are distributed among several modules in order to reduce the size of translation stores.
This class has methods to read/write data into either DDTP translation format or the Pootle database storage.| Method Summary | |
|---|---|
__init__(self,
folder)
| |
Export data from Pootle to DDTP. | |
Import DDTP description translations into Pootle. | |
Import DDTP description translations into Pootle. | |
List all available languages. | |
Parse package descriptions from a Packages file. | |
Parse a DDTP translation from a file. | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Class Variable Summary | |
|---|---|
NoneType |
parsed_template = None |
| Method Details |
|---|
export_to_ddtp(self, translations_dir)Export data from Pootle to DDTP. `translations_dir` is the directory where to put Translation-?? files. If non-existent, it is created. |
import_template(self, template)Import DDTP description translations into Pootle. |
import_translations(self, translations)Import DDTP description translations into Pootle. Overwrites old translations. TODO: do proper merging. import_template() has to be invoked before calling this method. template is a file-like object containing the descriptions (Packages). translations is a list of file-like objects which contain the translations (e.g., Translation-de). |
list_languages(self)List all available languages. |
parse_template(self, f, charset='latin1')Parse package descriptions from a Packages file. Returns a list [(name, md5sum, description)]. `md5sum` is the MD5 checksum of the description. |
parse_translation(self, f, charset='utf-8')Parse a DDTP translation from a file. Returns (lang, [(name, md5sum, description)]). `md5sum` is the MD5 checksum of the description in English. |
| Class Variable Details |
|---|
parsed_template
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Tue Aug 22 04:29:45 2006 | http://epydoc.sf.net |