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

[hide private]
[frames] | no frames]

# Class tmxfile

source code

               object --+
                        |
    base.TranslationStore --+
                            |
                lisa.LISAfile --+
                                |
                               tmxfile

Class representing a TMX file store.

Nested Classes | [hide private]

| UnitClass A single unit in the TMX file.

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`, `setsourcelanguage`, `settargetlanguage`

Inherited from `base.TranslationStore`: `findunit`, `getunits`, `isempty`, `makeindex`, `save`, `savefile`, `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 file``'``
| Mimetypes = ``[``'``application/x-tmx``'``]``
| Extensions = ``[``'``tmx``'``]``
| rootNode = ``'``tmx``'``
| bodyNode = ``'``body``'``
| XMLskeleton = ``'``<?xml version="1.0" encoding="utf-8"?>\n<!DOCTY``...``
Inherited from `lisa.LISAfile`: `namespace`

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>'''