Package translate :: Package storage :: Module qph :: Class QphUnit |
[hide private]
[frames] | no frames]

# Class QphUnit

source code

A single term in the qph file.

Instance Methods | [hide private]
createlanguageNode(self, lang, text, purpose) Returns an xml Element setup with given parameters. | source code
getlanguageNodes(self) We override this to get source and target nodes. | source code
Inherited from `lisa.LISAunit`: `__eq__`, `__init__`, `__str__`, `createPHnodes`, `getNodeText`, `getlanguageNode`, `namespaced` Inherited from `lisa.LISAunit` (private): `_set_property` Inherited from `base.TranslationUnit`: `getcontext`, `getid`, `getunits`, `hasplural`, `isblank`, `isfuzzy`, `isheader`, `isreview`, `istranslatable`, `istranslated`, `markfuzzy`, `markreviewneeded`, `merge`, `multistring_to_rich`, `unit_iter` Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`
Source
_getsourcenode(self) | source code
Inherited from `lisa.LISAunit`: `get_source_dom`, `getsource`, `set_source_dom`, `setsource` Inherited from `base.TranslationUnit`: `getsourcelanguage` Inherited from `base.TranslationUnit` (private): `_get_rich_source`, `_set_rich_source`
Target
_gettargetnode(self) | source code
Inherited from `lisa.LISAunit`: `get_target_dom`, `gettarget`, `set_target_dom`, `settarget`, `target_dom` Inherited from `base.TranslationUnit`: `gettargetlanguage`, `gettargetlen` Inherited from `base.TranslationUnit` (private): `_get_rich_target`, `_set_rich_target`
Notes
addnote(self, text, origin=None) Add a note specifically in a "definition" tag | source code
getnotes(self, origin=None) Returns all notes about this unit. | source code
removenotes(self) Remove all the translator notes. | source code
Locations
Inherited from `base.TranslationUnit`: `addlocation`, `addlocations`, `getlocations`
Errors
Inherited from `base.TranslationUnit`: `adderror`, `geterrors`

Class Methods | [hide private]
Inherited from `lisa.LISAunit`: `createfromxmlElement` Inherited from `base.TranslationUnit`: `buildfromunit`, `rich_to_multistring`

Class Variables | [hide private]
| rootNode = `"phrase"`
| languageNode = `"source"`
| textNode = `""`
| namespace = `''` Parse an instance of this class from the start of the given string.
Inherited from `lisa.LISAunit`: `rid`, `xid` Inherited from `lisa.LISAunit` (private): `_default_xml_space` Inherited from `base.TranslationUnit`: `rich_parsers`
Source
Inherited from `lisa.LISAunit`: `source`, `source_dom`
Target
Inherited from `lisa.LISAunit`: `target`

Properties | [hide private]
Inherited from `object`: `__class__`
Source
Inherited from `base.TranslationUnit`: `rich_source`
Target
Inherited from `base.TranslationUnit`: `rich_target`

Method Details | [hide private]

### createlanguageNode(self, lang, text, purpose) | source code
Returns an xml Element setup with given parameters. Overrides: lisa.LISAunit.createlanguageNode

### getlanguageNodes(self) | source code
We override this to get source and target nodes. Overrides: lisa.LISAunit.getlanguageNodes

### addnote(self, text, origin=None) | source code
Add a note specifically in a "definition" tag Parameters: `text` - Usually just a sentence or two. `origin` - Specifies who/where the comment comes from. Origin can be one of the following text strings: 'translator' 'developer', 'programmer', 'source code' (synonyms) Overrides: base.TranslationUnit.addnote

### getnotes(self, origin=None) | source code
Returns all notes about this unit. It will probably be freeform text or something reasonable that can be synthesised by the format. It should not include location comments (see getlocations()). Overrides: base.TranslationUnit.getnotes (inherited documentation)

### removenotes(self) | source code
Remove all the translator notes. Overrides: base.TranslationUnit.removenotes