A single unit in the file. Provisional work is done to make several
languages possible.
|
__init__(self,
source,
empty=False,
**kwargs)
Constructs a unit containing the given source string |
source code
|
|
Boolean
|
|
|
|
|
createlanguageNode(self,
lang,
text,
purpose=None)
Returns a xml Element setup with given parameters to represent a
single language entry. |
source code
|
|
|
createPHnodes(self,
parent,
text)
Create the text node in parent containing all the ph tags |
source code
|
|
|
getlanguageNodes(self)
Returns a list of all nodes that contain per language information. |
source code
|
|
|
getlanguageNode(self,
lang=None,
index=None)
Retrieves a languageNode either by language or by index |
source code
|
|
|
getNodeText(self,
languageNode,
xml_space=' preserve ' )
Retrieves the term from the given languageNode |
source code
|
|
|
|
|
|
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__
|
|
|
|
|
|
|
|
|
Inherited from base.TranslationUnit :
getsourcelanguage
|
|
set_target_dom(self,
dom_node,
append=False) |
source code
|
|
|
|
|
settarget(self,
text,
lang=' xx ' ,
append=False)
Sets the "target" string (second language), or
alternatively appends to the list |
source code
|
|
|
gettarget(self,
lang=None)
retrieves the "target" text (second entry), or the entry in
the specified language, if it exists |
source code
|
|
Inherited from base.TranslationUnit :
gettargetlanguage ,
gettargetlen
|
Inherited from base.TranslationUnit :
addnote ,
getnotes ,
removenotes
|
Inherited from base.TranslationUnit :
addlocation ,
addlocations ,
getlocations
|
Inherited from base.TranslationUnit :
adderror ,
geterrors
|