Package translate :: Package storage :: Module wordfast :: Class WordfastUnit
[hide private]
[frames] | no frames]

Class WordfastUnit

source code

          object --+    
                   |    
base.TranslationUnit --+
                       |
                      WordfastUnit

A Wordfast translation memory unit

Instance Methods [hide private]
 
__init__(self, source=None)
Constructs a TranslationUnit containing the given source string.
source code
 
_update_timestamp(self)
Refresh the timestamp for the unit
source code
 
getdict(self)
Get the dictionary of values for a Wordfast line
source code
 
setdict(self, newdict)
Set the dictionary of values for a Wordfast line
source code
 
__str__(self)
str(x)
source code
 
istranslated(self)
Indicates whether this unit is translated.
source code

Inherited from base.TranslationUnit: __eq__, getcontext, getid, getunits, hasplural, isblank, isfuzzy, isheader, isreview, istranslatable, markfuzzy, markreviewneeded, merge, unit_iter

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

    Source
 
_get_source_or_target(self, key) source code
 
_set_source_or_target(self, key, newvalue) source code
 
getsource(self) source code
 
setsource(self, newsource) source code

Inherited from base.TranslationUnit: getsourcelanguage

    Target
 
gettarget(self) source code
 
settarget(self, newtarget)
Sets the target string to the given value.
source code
 
settargetlang(self, newlang) source code

Inherited from base.TranslationUnit: gettargetlanguage, gettargetlen

    Notes

Inherited from base.TranslationUnit: addnote, getnotes, removenotes

    Locations

Inherited from base.TranslationUnit: addlocation, addlocations, getlocations

    Errors

Inherited from base.TranslationUnit: adderror, geterrors

Class Methods [hide private]

Inherited from base.TranslationUnit: buildfromunit

Properties [hide private]
  dict
Get the dictionary of values for a Wordfast line

Inherited from object: __class__

    Source
  source
    Target
  target
  targetlang
Method Details [hide private]

__init__(self, source=None)
(Constructor)

source code 

Constructs a TranslationUnit containing the given source string.

Overrides: object.__init__
(inherited documentation)

setdict(self, newdict)

source code 

Set the dictionary of values for a Wordfast line

Parameters:
  • newdict (Dict) - a new dictionary with Wordfast line elements

settarget(self, newtarget)

source code 

Sets the target string to the given value.

Overrides: base.TranslationUnit.settarget
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

istranslated(self)

source code 

Indicates whether this unit is translated.

This should be used rather than deducing it from .target, to ensure that other classes can implement more functionality (as XLIFF does).

Overrides: base.TranslationUnit.istranslated
(inherited documentation)

Property Details [hide private]

dict

Get the dictionary of values for a Wordfast line

Get Method:
getdict(self) - Get the dictionary of values for a Wordfast line
Set Method:
setdict(self, newdict) - Set the dictionary of values for a Wordfast line

source

Get Method:
getsource(self)
Set Method:
setsource(self, newsource)

target

Get Method:
gettarget(self)
Set Method:
settarget(self, newtarget) - Sets the target string to the given value.

targetlang

Set Method:
settargetlang(self, newlang)