Package translate :: Package storage :: Module pypo :: Class pofile
[hide private]
[frames] | no frames]

Class pofile

source code


A .po file containing various units

Nested Classes [hide private]
  UnitClass
The class of units that will be instantiated and used by this class
Instance Methods [hide private]
 
changeencoding(self, newencoding)
Deprecated: changes the encoding on the file.
source code
 
parse(self, input)
Parses the given file or file source string.
source code
 
removeduplicates(self, duplicatestyle="merge")
Make sure each msgid is unique ; merge comments etc from duplicates into original
source code
 
__str__(self)
Convert to a string.
source code
 
_getoutput(self)
convert the units back to lines
source code
 
encode(self, lines)
encode any unicode strings in lines in self._encoding
source code
 
decode(self, lines)
decode any non-unicode strings in lines with self._encoding
source code
 
unit_iter(self)
Iterator over all the units in this store.
source code

Inherited from poheader.poheader: getheaderplural, gettargetlanguage, header, makeheader, makeheaderdict, mergeheaders, parseheader, settargetlanguage, updatecontributor, updateheader, updateheaderplural

Inherited from base.TranslationStore: __getstate__, __init__, __setstate__, add_unit_to_index, addsourceunit, addunit, findid, findunit, findunits, getids, getsourcelanguage, getunits, isempty, makeindex, remove_unit_from_index, require_index, save, savefile, setsourcelanguage, translate

Inherited from base.TranslationStore (private): _assignname

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__

Class Methods [hide private]

Inherited from base.TranslationStore: parsefile, parsestring

Class Variables [hide private]

Inherited from pocommon.pofile: Extensions, Mimetypes, Name

Inherited from poheader.poheader: header_order, x_generator

Inherited from base.TranslationStore: suggestions_in_format

Inherited from base.TranslationStore (private): _binary

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

parse(self, input)

source code 

Parses the given file or file source string.

Overrides: base.TranslationStore.parse

__str__(self)
(Informal representation operator)

source code 

Convert to a string. double check that unicode is handled somehow here

Overrides: object.__str__

unit_iter(self)

source code 

Iterator over all the units in this store.

Overrides: base.TranslationStore.unit_iter
(inherited documentation)