A single term in the xliff file.
|
|
__init__(self,
source,
empty=False,
**kwargs)
Override the constructor to set xml:space="preserve". |
source code
|
|
|
|
|
|
|
|
|
|
addalttrans(self,
txt,
origin=None,
lang=None,
sourcetxt=None,
matchquality=None)
Adds an alt-trans tag and alt-trans components to the unit. |
source code
|
|
|
|
|
|
|
delalttrans(self,
alternative)
Removes the supplied alternative from the list of alt-trans tags |
source code
|
|
|
|
isapproved(self)
States whether this unit is approved. |
source code
|
|
|
|
markapproved(self,
value=True)
Mark this unit as approved. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string
|
|
|
|
createcontextgroup(self,
name,
contexts=None,
purpose=None)
Add the context group to the trans-unit with contexts a list with
(type, text) tuples describing each context. |
source code
|
|
|
|
getcontextgroups(self,
name)
Returns the contexts in the context groups with the specified name |
source code
|
|
|
|
getrestype(self)
returns the restype attribute in the trans-unit tag |
source code
|
|
|
|
merge(self,
otherunit,
overwrite=False,
comments=True,
authoritative=False)
Do basic format agnostic merging. |
source code
|
|
|
|
correctorigin(self,
node,
origin)
Check against node tag's origin (e.g note or alt-trans) |
source code
|
|
|
Inherited from lisa.LISAunit:
__eq__,
__str__,
createPHnodes,
getNodeText,
getlanguageNode,
namespaced
Inherited from lisa.LISAunit (private):
_set_property
Inherited from base.TranslationUnit:
getcontext,
getunits,
hasplural,
isblank,
isheader,
isobsolete,
istranslated,
makeobsolete,
setcontext,
unit_iter
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__
|
|
|
| set_rich_source(self,
value,
sourcelang='en') |
source code
|
|
|
|
|
|
Inherited from lisa.LISAunit:
get_source_dom,
getsource,
set_source_dom,
setsource
Inherited from base.TranslationUnit:
getsourcelanguage
|
|
|
| set_rich_target(self,
value,
lang='xx',
append=False) |
source code
|
|
|
|
get_rich_target(self,
lang=None)
retrieves the "target" text (second entry), or the entry in
the specified language, if it exists |
source code
|
|
|
|
settarget(self,
text,
lang='xx',
append=False)
Sets the target string to the given value. |
source code
|
|
|
Inherited from lisa.LISAunit:
get_target_dom,
gettarget,
set_target_dom,
target_dom
Inherited from base.TranslationUnit:
gettargetlanguage,
gettargetlen
|
|
|
addnote(self,
text,
origin=None,
position="append")
Add a note specifically in a "note" tag |
source code
|
|
|
|
getnotelist(self,
origin=None)
Private method that returns the text from notes matching 'origin' or
all notes. |
source code
|
|
|
|
|
|
|
|
|
|
|
|
List
|
|
|
Inherited from base.TranslationUnit:
addlocations
|
|
|
|
|
Dictionary
|
|