Package Pootle :: Package storage :: Module api :: Class IModule
[show private | hide private]
[frames | no frames]

Type IModule

 object --+        
          |        
  Interface --+    
              |    
   IAnnotatable --+
                  |
 object --+       |
          |       |
  Interface --+   |
              |   |
IHaveStatistics --+
                  |
 object --+       |
          |       |
  Interface --+   |
              |   |
       IMapping --+
                  |
 object --+       |
          |       |
  Interface --+   |
              |   |
    IRefersToDB --+
                  |
 object --+       |
          |       |
  Interface --+   |
              |   |
    ISearchable --+
                  |
                 IModule


An object corresponding to a project.

This loosely corresponds to a .pot file and a set of its translations.

Maps 'la_CO' identifiers to TranslationStores.

A module contains a 'template' translation store (no translations) and a set of translation stores with translated data.

Note that the different translations can differ structurally from the normal template. The differences can be resolved using merging as an external process.
Method Summary
  add(self, key, copy_template)
Create a new empty TranslationStore bound to this module.
    Inherited from IHaveStatistics
  statistics(self)
Return statistics for this object.
    Inherited from IMapping
  __delitem__(self, key)
Delete key from container.
  __getitem__(self, key)
Get object by key.
  __len__(self)
Return length of store.
  get(self, key, default)
Get object by key, return None if not found.
  items(self)
Return list of tuples (key, value).
  itervalues(self)
Return iterator over values.
  keys(self)
Return list of object keys.
  values(self)
Return list of object values.
    Inherited from ISearchable
  find(self, substring)
Search for a substring in all translation units.
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __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
type description = Pootle.storage.api.Unicode
type folder = Pootle.storage.api.IFolder
type key = Pootle.storage.api.Id
type name = Pootle.storage.api.Unicode
type template = Pootle.storage.api.Interface
    Inherited from IAnnotatable
NoneType annotations = None                                                                  
    Inherited from IRefersToDB
NoneType db = None                                                                  

Method Details

add(self, key, copy_template=False)

Create a new empty TranslationStore bound to this module.

If a template with the given key already exists, raise KeyError.

`lang_key` is a language identifier, e.g., 'pt_BR' or 'lt'. If `lang_key` is None, the resulting template will be put into the `template` attribute. If `copy_template` is True, the template will be copied on the new translation store.
Overrides:
Pootle.storage.api.IMapping.add

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