parameters: (parent, message, name, desc='', meaning='', translateable=True)
return_statement: return node
docstring: Constructs a new message node that is a child of 'parent', with the
      name, desc, meaning and translateable attributes set using the same-named
      parameters and the text of the message and any placeholders taken from
      'message', which must be a tclib.Message() object.
docstring_summary: Constructs a new message node that is a child of 'parent', with the
      name, desc, meaning and translateable attributes set using the same-named
      parameters and the text of the message and any placeholders taken from
      'message', which must be a tclib.Message() object.
docstring_tokens: Constructs a new message node that is a child of parent with the name desc meaning and translateable attributes set using the same - named parameters and the text of the message and any placeholders taken from message which must be a tclib . Message () object .
function: def Construct(parent, message, name, desc='', meaning='', translateable=True):
      '''Constructs a new message node that is a child of 'parent', with the
      name, desc, meaning and translateable attributes set using the same-named
      parameters and the text of the message and any placeholders taken from
      'message', which must be a tclib.Message() object.'''
      # Convert type to appropriate string
      translateable = 'true' if translateable else 'false'
  
      node = MessageNode()
      node.StartParsing('message', parent)
      node.HandleAttribute('name', name)
      node.HandleAttribute('desc', desc)
      node.HandleAttribute('meaning', meaning)
      node.HandleAttribute('translateable', translateable)
  
      items = message.GetContent()
      for ix, item in enumerate(items):
        if isinstance(item, six.string_types):
          # Ensure whitespace at front and back of message is correctly handled.
          if ix == 0:
            item = "'''" + item
          if ix == len(items) - 1:
            item = item + "'''"
  
          node.AppendContent(item)
        else:
          phnode = PhNode()
          phnode.StartParsing('ph', node)
          phnode.HandleAttribute('name', item.GetPresentation())
          phnode.AppendContent(item.GetOriginal())
  
          if len(item.GetExample()) and item.GetExample() != ' ':
            exnode = ExNode()
            exnode.StartParsing('ex', phnode)
            exnode.AppendContent(item.GetExample())
            exnode.EndParsing()
            phnode.AddChild(exnode)
  
          phnode.EndParsing()
          node.AddChild(phnode)
  
      node.EndParsing()
      return node
function_tokens: def Construct ( parent , message , name , desc = '' , meaning = '' , translateable = True ) : # Convert type to appropriate string translateable = 'true' if translateable else 'false' node = MessageNode ( ) node . StartParsing ( 'message' , parent ) node . HandleAttribute ( 'name' , name ) node . HandleAttribute ( 'desc' , desc ) node . HandleAttribute ( 'meaning' , meaning ) node . HandleAttribute ( 'translateable' , translateable ) items = message . GetContent ( ) for ix , item in enumerate ( items ) : if isinstance ( item , six . string_types ) : # Ensure whitespace at front and back of message is correctly handled. if ix == 0 : item = "'''" + item if ix == len ( items ) - 1 : item = item + "'''" node . AppendContent ( item ) else : phnode = PhNode ( ) phnode . StartParsing ( 'ph' , node ) phnode . HandleAttribute ( 'name' , item . GetPresentation ( ) ) phnode . AppendContent ( item . GetOriginal ( ) ) if len ( item . GetExample ( ) ) and item . GetExample ( ) != ' ' : exnode = ExNode ( ) exnode . StartParsing ( 'ex' , phnode ) exnode . AppendContent ( item . GetExample ( ) ) exnode . EndParsing ( ) phnode . AddChild ( exnode ) phnode . EndParsing ( ) node . AddChild ( phnode ) node . EndParsing ( ) return node