Class representing a XLIFF file store.
|
|
|
initbody(self)
Initialises self.body so it never needs to be retrieved from the XML
again. |
source code
|
|
|
|
|
createfilenode(self,
filename,
sourcelanguage=None,
targetlanguage=None,
datatype='plaintext')
creates a filenode with the given filename. |
source code
|
|
|
getfilename(self,
filenode)
returns the name of the given file |
source code
|
|
|
setfilename(self,
filenode,
filename)
set the name of the given file |
source code
|
|
|
getfilenames(self)
returns all filenames in this XLIFF file |
source code
|
|
|
getfilenode(self,
filename)
finds the filenode with the given name |
source code
|
|
|
|
|
|
|
removedefaultfile(self)
We want to remove the default file-tag as soon as possible if we know
if still present and empty. |
source code
|
|
|
getheadernode(self,
filenode,
createifmissing=False)
finds the header node for the given filenode |
source code
|
|
|
getbodynode(self,
filenode,
createifmissing=False)
finds the body node for the given filenode |
source code
|
|
TranslationUnit
|
addsourceunit(self,
source,
filename="NoName",
createifmissing=False)
adds the given trans-unit to the last used body node if the filename
has changed it uses the slow method instead (will create the nodes
required if asked). |
source code
|
|
|
switchfile(self,
filename,
createifmissing=False)
adds the given trans-unit (will create the nodes required if asked). |
source code
|
|
|
creategroup(self,
filename="NoName",
createifmissing=False,
restype=None)
adds a group tag into the specified file |
source code
|
|
|
|
Inherited from lisa.LISAfile :
addunit ,
namespaced ,
parse ,
setsourcelanguage ,
settargetlanguage
Inherited from base.TranslationStore :
__getstate__ ,
__setstate__ ,
add_unit_to_index ,
findunit ,
findunits ,
getsourcelanguage ,
gettargetlanguage ,
getunits ,
isempty ,
makeindex ,
remove_unit_from_index ,
require_index ,
save ,
savefile ,
translate ,
unit_iter
Inherited from object :
__delattr__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__
|
|
Name = _("XLIFF Translation File")
The human usable name of this store type
|
|
Mimetypes = ["application/x-xliff", "application/x-xliff+xml"]
A list of MIME types associated with this store type
|
|
Extensions = ["xlf", "xliff"]
A list of file extentions associated with this store type
|
|
rootNode = "xliff"
|
|
bodyNode = "body"
|
|
XMLskeleton = '''<?xml version="1.0"...
|
|
namespace = 'urn:oasis:names:tc:xliff:document:1.1'
Parse an instance of this class from the start of the given string.
|
|
suggestions_in_format = True
xliff units have alttrans tags which can be used to store suggestions
|
|