Package translate :: Package storage :: Module tmx :: Class tmxfile

[hide private]
[frames] | no frames]

# Class tmxfile

source code

Class representing a TMX file store.

Nested Classes | [hide private]

| UnitClass The class of units that will be instantiated and used by this class

Instance Methods | [hide private]

addheader(self) Method to be overridden to initialise headers, etc. | source code

addtranslation(self, source, srclang, translation, translang) addtranslation method for testing old unit tests | source code

String or None

translate(self, sourcetext, sourcelang=None, targetlang=None) method to test old unit tests | source code

Inherited from `lisa.LISAfile`: `__init__`, `__str__`, `addsourceunit`, `addunit`, `initbody`, `namespaced`, `parse`

Inherited from `base.TranslationStore`: `__getstate__`, `__setstate__`, `add_unit_to_index`, `detect_encoding`, `findid`, `findunit`, `findunits`, `getids`, `getprojectstyle`, `getsourcelanguage`, `gettargetlanguage`, `getunits`, `isempty`, `makeindex`, `remove_unit_from_index`, `require_index`, `save`, `savefile`, `setprojectstyle`, `setsourcelanguage`, `settargetlanguage`, `unit_iter`

Inherited from `base.TranslationStore` (private): `_assignname`

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

Class Methods | [hide private]

Inherited from `base.TranslationStore`: `parsefile`, `parsestring`

Class Variables | [hide private]

| Name = `_("TMX Translation Memory")` The human usable name of this store type
| Mimetypes = `["application/x-tmx"]` A list of MIME types associated with this store type
| Extensions = `["tmx"]` A list of file extentions associated with this store type
| rootNode = `"tmx"`
| bodyNode = `"body"`
| XMLskeleton = `'''<?xml version="1.0" encoding="utf-8`...``
Inherited from `lisa.LISAfile`: `namespace` Inherited from `base.TranslationStore`: `suggestions_in_format` Inherited from `base.TranslationStore` (private): `_binary`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### addheader(self)

source code

Method to be overridden to initialise headers, etc.

Overrides: lisa.LISAfile.addheader
  (inherited documentation)

### translate(self, sourcetext, sourcelang=None, targetlang=None)

source code

method to test old unit tests

Returns: String or None
Overrides: base.TranslationStore.translate

Class Variable Details | [hide private]

### XMLskeleton

Value:

      '''<?xml version="1.0" encoding="utf-8"?>
      <!DOCTYPE tmx SYSTEM "tmx14.dtd">
      <tmx version="1.4">
      <header></header>
      <body></body>
      </tmx>'''