暫無描述
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

mlnamedobject.py 965B

1234567891011121314151617181920
  1. #-*- coding:utf-8 -*-
  2. from lodel.utils.mlstring import MlString
  3. ## @package lodel.mlnamedobject.mlnamedobject Lodel2 description of objects module
  4. #
  5. # Display name and Description of a lodel2 object
  6. ## @brief Represents a multi-language object (dealing with its translations)
  7. class MlNamedObject(object):
  8. ##
  9. # @param display_name str|dict : displayed string to name the object (either a string or a dictionnary of the translated strings can be passed)
  10. # @param help_text str|dict : description text for this object (either a string or a dictionnary of the translated strings can be passed)
  11. def __init__(self, display_name=None, help_text=None):
  12. ## @brief The object's name which will be used in all the user interfaces
  13. self.display_name = None if display_name is None else MlString(display_name)
  14. ## @brief Description text for this object
  15. self.help_text = None if help_text is None else MlString(help_text)