Module pylupdate :: Class Message
[hide private]
[frames] | no frames]

Class Message

source code

object --+
         |
        Message

Wrapper for a translated message

Instance Methods [hide private]
 
__init__(self, sourcetext, disambiguation, nused, finished=False)
Instantiates a new Message object
source code
 
sourcetext(self, val) source code
 
disambiguation(self, val) source code
 
isNumerous(self, val) source code
 
isFinished(self, val) source code
str
__iter__(self)
Yields the translations of the Message
source code
 
__repr__(self)
repr(x)
source code
 
setTranslation(self, trans, numeroustrans=None)
Sets the translation of the Message
source code
 
update(self, msg)
Updates the properties with the ones from another message
source code
ElementTree.Element
toXml(self)
Creates the xml elements of the message
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
Message
fromXml(elem)
Parses the xml element message to a Message object
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, sourcetext, disambiguation, nused, finished=False)
(Constructor)

source code 

Instantiates a new Message object

Parameters:
  • sourcetext (str) - sourcetext
  • disambiguation (str or None) - string to distinguish between two equal sourcetexts
  • nused (bool) - if True, numerous translations will be used
  • finished (bool) - defines, whether the translation is finished. defaults to False
Overrides: object.__init__

sourcetext(self, val)

source code 
Decorators:
  • @sourcetext.setter

disambiguation(self, val)

source code 
Decorators:
  • @disambiguation.setter

isNumerous(self, val)

source code 
Decorators:
  • @isNumerous.setter

isFinished(self, val)

source code 
Decorators:
  • @isFinished.setter

__iter__(self)

source code 

Yields the translations of the Message

Returns: str
the translated string(s)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

setTranslation(self, trans, numeroustrans=None)

source code 

Sets the translation of the Message

Parameters:
  • trans (str) - the translation
  • numeroustrans (str or None) - if not None, the numerous translation

update(self, msg)

source code 

Updates the properties with the ones from another message

Parameters:
  • msg (Message) - the other message

fromXml(elem)
Static Method

source code 

Parses the xml element message to a Message object

Parameters:
  • elem (ElementTree.Element) - the xml element
Returns: Message
a new created message object

toXml(self)

source code 

Creates the xml elements of the message

Returns: ElementTree.Element
the xml element