Package translate :: Package storage :: Module html :: Class htmlunit

[hide private]
[frames] | no frames]

# Class htmlunit

source code

A unit of translatable/localisable HTML content

Instance Methods | [hide private]

__init__(self, source=None) Constructs a TranslationUnit containing the given source string. | source code

Inherited from `base.TranslationUnit`: `__eq__`, `getcontext`, `getid`, `getunits`, `hasplural`, `isblank`, `isfuzzy`, `isheader`, `isobsolete`, `isreview`, `istranslatable`, `istranslated`, `makeobsolete`, `markfuzzy`, `markreviewneeded`, `merge`, `multistring_to_rich`, `unit_iter`

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

Source

getsource(self) | source code

setsource(self, source) Sets the source string to the given value. | source code

Inherited from `base.TranslationUnit`: `getsourcelanguage` 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

addlocation(self, location) Add one location to the list of locations. | source code

List

getlocations(self) A list of source code locations. | source code

Inherited from `base.TranslationUnit`: `addlocations`
Errors
Inherited from `base.TranslationUnit`: `adderror`, `geterrors`

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
| source
Inherited from `base.TranslationUnit`: `rich_source`
Target
Inherited from `base.TranslationUnit`: `rich_target`, `target`

Method Details | [hide private]

### __init__(self, source=None)
(Constructor)

source code

Constructs a TranslationUnit containing the given source string.

Overrides: object.__init__
  (inherited documentation)

### setsource(self, source)

source code

Sets the source string to the given value.

Overrides: base.TranslationUnit.setsource
  (inherited documentation)

### addlocation(self, location)

source code

Add one location to the list of locations.

Overrides: base.TranslationUnit.addlocation
  (inherited documentation)

### getlocations(self)

source code

A list of source code locations.

Returns: List
Overrides: base.TranslationUnit.getlocations
  (inherited documentation)

Property Details | [hide private]

### source

Get Method:
  getsource(self)
Set Method:
  setsource(self, source) - Sets the source string to the given value.