Package translate :: Package storage :: Module tiki :: Class TikiUnit

[hide private]
[frames] | no frames]

# Class TikiUnit

source code

A tiki unit entry.

Instance Methods | [hide private]

__init__(self, source=None, encoding=`'``UTF-8``'`) Constructs a TranslationUnit containing the given source string. | source code

__unicode__(self) Returns a string formatted to be inserted into a tiki language.php file. | source code

Inherited from `base.TranslationUnit`: `__eq__`, `__str__`, `get_state_id`, `get_state_n`, `getcontext`, `getid`, `getunits`, `hasplural`, `infer_state`, `isblank`, `isfuzzy`, `isheader`, `isobsolete`, `isreview`, `istranslatable`, `istranslated`, `makeobsolete`, `markfuzzy`, `markreviewneeded`, `merge`, `multistring_to_rich`, `set_state_n`, `setcontext`, `setid`, `unit_iter`

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

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

addlocation(self, location) Location is defined by the comments in the file. | source code

List

getlocations(self) Returns the a list of the location(s) of the string. | 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`: `STATE`, `S_EMPTY`, `S_FINAL`, `S_NEEDS_REVIEW`, `S_NEEDS_WORK`, `S_OBSOLETE`, `S_REJECTED`, `S_UNREVIEWED`, `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]

### __init__(self, source=None, encoding=`'``UTF-8``'`)
(Constructor)

source code

Constructs a TranslationUnit containing the given source string.

Overrides: object.__init__
  (inherited documentation)

### addlocation(self, location)

source code

Location is defined by the comments in the file. This function will only set valid locations.

Parameters:
  - `location` - Where the string is located in the file. Must be a valid location.
Overrides: base.TranslationUnit.addlocation

### getlocations(self)

source code

Returns the a list of the location(s) of the string.

Returns: List
Overrides: base.TranslationUnit.getlocations