Package translate :: Package storage :: Module poxliff :: Class PoXliffFile

[hide private]
[frames] | no frames]

# Class PoXliffFile

source code

a file for the po variant of Xliff files

Nested Classes | [hide private]

| UnitClass The class of units that will be instantiated and used by this class

Instance Methods | [hide private]

__init__(self, *args, **kwargs) Constructs a blank TranslationStore. | source code

createfilenode(self, filename, sourcelanguage="en-US", datatype="po") creates a filenode with the given filename. | source code

_insert_header(self, header) | source code

addheaderunit(self, target, filename) | source code

addplural(self, source, target, filename, createifmissing=False) This method should now be unnecessary, but is left for reference | source code

parse(self, xml) Populates this object from the given xml string | source code

Inherited from `xliff.xlifffile`: `__str__`, `addheader`, `addsourceunit`, `creategroup`, `getbodynode`, `getdatatype`, `getdate`, `getfilename`, `getfilenames`, `getfilenode`, `getheadernode`, `getids`, `getsourcelanguage`, `gettargetlanguage`, `initbody`, `removedefaultfile`, `setfilename`, `setsourcelanguage`, `settargetlanguage`, `switchfile`

Inherited from `lisa.LISAfile`: `addunit`, `namespaced`

Inherited from `base.TranslationStore`: `__getstate__`, `__setstate__`, `add_unit_to_index`, `detect_encoding`, `findid`, `findunit`, `findunits`, `getprojectstyle`, `getunits`, `isempty`, `makeindex`, `remove_unit_from_index`, `require_index`, `save`, `savefile`, `setprojectstyle`, `translate`, `unit_iter`

Inherited from `base.TranslationStore` (private): `_assignname`

Inherited from `poheader.poheader`: `getheaderplural`, `header`, `init_headers`, `makeheader`, `makeheaderdict`, `mergeheaders`, `parseheader`, `updatecontributor`, `updateheader`, `updateheaderplural`

Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Methods | [hide private]

Inherited from `xliff.xlifffile`: `parsestring` Inherited from `base.TranslationStore`: `parsefile`

Class Variables | [hide private]

Inherited from `xliff.xlifffile`: `Extensions`, `Mimetypes`, `Name`, `XMLskeleton`, `bodyNode`, `namespace`, `rootNode`, `sourcelanguage`, `suggestions_in_format`, `targetlanguage` Inherited from `base.TranslationStore` (private): `_binary` Inherited from `poheader.poheader`: `header_order`, `x_generator`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, *args, **kwargs)
(Constructor)

source code

Constructs a blank TranslationStore.

Overrides: object.__init__
  (inherited documentation)

### createfilenode(self, filename, sourcelanguage="en-US", datatype="po")

source code

creates a filenode with the given filename. All parameters are needed for XLIFF compliance.

Overrides: xliff.xlifffile.createfilenode
  (inherited documentation)

### _insert_header(self, header)

source code

Overrides: poheader.poheader._insert_header

### parse(self, xml)

source code

Populates this object from the given xml string

Overrides: base.TranslationStore.parse