暫無描述
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 1.0KB

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