Package Pootle :: Package storage :: Module ddtp :: Class DDTPPackage
[show private | hide private]
[frames | no frames]

Type DDTPPackage

object --+
         |
        DDTPPackage


Method Summary
  __init__(self, name, md5sum, paras)
Create a DDTP package.
  _export_description(self, paras)
  _parseComment(comment)
(Static method)
  _split(self, description)
  export(self, lang_key, charset)
Export to RFC822-style description.
  import_description(self, description, translation)
Import RFC822-style description and translation.
  istranslated(self)
  make_units(self, makeunit)
Make a list of translation units for a package description.
  parse_units(units)
Parse an iterable of translation units into DDTPPackage objects. (Static method)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
str ddtp_entry_template = 'Package: %(name)s\nDescription-md...

Instance Method Details

__init__(self, name, md5sum, paras=None)
(Constructor)

Create a DDTP package.

You may pass in `paras`, which should be a list of tuples: [(description_paragraph, translated_paragraph)]. `translated_paragraph` may be None.
Overrides:
__builtin__.object.__init__

export(self, lang_key, charset='utf-8')

Export to RFC822-style description.

import_description(self, description, translation)

Import RFC822-style description and translation.

make_units(self, makeunit)

Make a list of translation units for a package description.

`makeunit` is a callable that creates a translation (typically SomeTranslationStore.makeunit).

Static Method Details

parse_units(units)

Parse an iterable of translation units into DDTPPackage objects.

Note that you can just pass in a TranslationStore.

Returns a list of DDTPPackages.

Class Variable Details

ddtp_entry_template

Type:
str
Value:
'''Package: %(name)s
Description-md5: %(md5)s
Description-%(lang)s: %(short)s
%(description)s
'''                                                                    

Generated by Epydoc 2.1 on Tue Aug 22 04:29:46 2006 http://epydoc.sf.net