Package translate :: Package storage :: Module pocommon :: Class pounit |
[hide private]
[frames] | no frames]

# Class pounit

source code

Instance Methods | [hide private]
markreviewneeded(self, needsreview=True, explanation=None) Marks the unit to indicate whether it needs review. | source code
istranslated(self) Indicates whether this unit is translated. | source code
istranslatable(self) Indicates whether this unit can be translated. | source code
isreview(self) Indicates whether this unit needs review. | source code
Inherited from `base.TranslationUnit`: `__eq__`, `__init__`, `getcontext`, `getid`, `getunits`, `hasplural`, `isblank`, `isfuzzy`, `isheader`, `markfuzzy`, `merge`, `multistring_to_rich`, `unit_iter` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`
Source
Inherited from `base.TranslationUnit`: `getsourcelanguage`, `setsource` Inherited from `base.TranslationUnit` (private): `_get_rich_source`, `_set_rich_source`
Target
Inherited from `base.TranslationUnit`: `gettargetlanguage`, `gettargetlen`, `settarget` Inherited from `base.TranslationUnit` (private): `_get_rich_target`, `_set_rich_target`
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`, `rich_to_multistring`

Class Variables | [hide private]
Inherited from `base.TranslationUnit`: `rich_parsers`

Properties | [hide private]
Inherited from `base.TranslationUnit`: `rid`, `xid` Inherited from `object`: `__class__`
Source
Inherited from `base.TranslationUnit`: `rich_source`, `source`
Target
Inherited from `base.TranslationUnit`: `rich_target`, `target`

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

### istranslated(self) | source code
Indicates whether this unit is translated. This should be used rather than deducing it from .target, to ensure that other classes can implement more functionality (as XLIFF does). Overrides: base.TranslationUnit.istranslated (inherited documentation)

### istranslatable(self) | source code
Indicates whether this unit can be translated. This should be used to distinguish real units for translation from header, obsolete, binary or other blank units. Overrides: base.TranslationUnit.istranslatable (inherited documentation)

### isreview(self) | source code
Indicates whether this unit needs review. Overrides: base.TranslationUnit.isreview (inherited documentation)