Package translate :: Package storage :: Module pocommon :: Class pounit

[hide private]
[frames] | no frames]

# Class pounit

source code

              object --+
                       |
    base.TranslationUnit --+
                           |
                          pounit

Known Subclasses:
  - pypo.pounit
  - , cpo.pounit

Instance Methods | [hide private]

markreviewneeded(self, needsreview=True, explanation=None) Marks the unit to indicate whether it needs review. | source code

Inherited from `base.TranslationUnit`: `__eq__`, `__init__`, `getcontext`, `getid`, `getunits`, `hasplural`, `isblank`, `isfuzzy`, `isheader`, `isreview`, `istranslatable`, `istranslated`, `markfuzzy`, `merge`, `unit_iter` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`
Source
Inherited from `base.TranslationUnit`: `getsourcelanguage`
Target
Inherited from `base.TranslationUnit`: `gettargetlanguage`, `gettargetlen`, `settarget`
Notes
Inherited from `base.TranslationUnit`: `addnote`, `getnotes`, `removenotes`
Locations
Inherited from `base.TranslationUnit`: `addlocation`, `addlocations`, `getlocations`
Errors

adderror(self, errorname, errortext) Adds an error message to this unit. | source code

Dictionary

geterrors(self) Get all error messages. | source code

Class Methods | [hide private]

Inherited from `base.TranslationUnit`: `buildfromunit`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### adderror(self, errorname, errortext)

source code

Adds an error message to this unit.

Parameters:
  - `errorname` - A single word to id the error.
  - `errortext` - The text describing the error.
Overrides: base.TranslationUnit.adderror

### geterrors(self)

source code

Get all error messages.

Returns: Dictionary
Overrides: base.TranslationUnit.geterrors

### markreviewneeded(self, needsreview=True, explanation=None)

source code

Marks the unit to indicate whether it needs review. Adds an optional explanation as a note.

Parameters:
  - `needsreview` - Defaults to True.
  - `explanation` - Adds an optional explanation as a note.
Overrides: base.TranslationUnit.markreviewneeded