def getSelectableModels(self): model_ids = self.context.getAvailableLayouts() registry = getModelRegistry() result = [] for model_id, utitle in model_ids: model = registry.get(model_id, None) if model is None: continue description = _(model.description_msgid, default=model.description) result.append({ 'id': model.id, 'title': model.Title(), 'description': description, 'icon': model.icon, }) return result
def Title(self): """Return the translated title of this model""" return _(self.title_msgid, default=self.title)
def Description(self): """Return the translated description""" return _(self.description_msgid, default=self.description)