translate.storage.mo.mofile

Package translate :: Package storage :: Module mo :: Class mofile |
[hide private]
[frames] | no frames]

# Class mofile

source code

A class representing a .mo file.

Nested Classes | [hide private]
| UnitClass The class of units that will be instantiated and used by this class

Instance Methods | [hide private]
__init__(self, inputfile=None, unitclass=mounit) Constructs a blank TranslationStore. | source code
__str__(self) Output a string representation of the MO data file | source code
parse(self, input) parses the given file or file source string | source code
Inherited from `base.TranslationStore`: `__getstate__`, `__setstate__`, `add_unit_to_index`, `addsourceunit`, `addunit`, `findid`, `findunit`, `findunits`, `getids`, `getsourcelanguage`, `gettargetlanguage`, `getunits`, `isempty`, `makeindex`, `remove_unit_from_index`, `require_index`, `save`, `savefile`, `setsourcelanguage`, `settargetlanguage`, `translate`, `unit_iter` Inherited from `base.TranslationStore` (private): `_assignname` Inherited from `poheader.poheader`: `getheaderplural`, `header`, `makeheader`, `makeheaderdict`, `mergeheaders`, `parseheader`, `updatecontributor`, `updateheader`, `updateheaderplural` 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]
| Name = `_("Gettext MO file")` The human usable name of this store type
| Mimetypes = `["application/x-gettext-catalog", "application/x-mo"]` A list of MIME types associated with this store type
| Extensions = `["mo", "gmo"]` A list of file extentions associated with this store type
| _binary = `True` Indicates whether a file should be accessed as a binary file.
Inherited from `base.TranslationStore`: `suggestions_in_format` Inherited from `poheader.poheader`: `header_order`, `x_generator`

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, inputfile=None, unitclass=mounit) (Constructor) | source code
Constructs a blank TranslationStore. Overrides: object.__init__ (inherited documentation)

### __str__(self) (Informal representation operator) | source code
Output a string representation of the MO data file Overrides: object.__str__

### parse(self, input) | source code
parses the given file or file source string Overrides: base.TranslationStore.parse