Commit af33d985 authored by Kevin Deldycke's avatar Kevin Deldycke

Add getTranslatedPortalType() to return the translated portal_type


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3967 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent cf1d0aa8
...@@ -1545,6 +1545,15 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1545,6 +1545,15 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
""" """
return self.portal_type return self.portal_type
security.declareProtected(Permissions.AccessContentsInformation, 'getPortalType')
def getTranslatedPortalType(self):
"""
This returns the translated portal_type
"""
portal_type = self.portal_type
translation_service = getToolByName(self, 'translation_service')
return translation_service.translate('ui', portal_type)
security.declareProtected(Permissions.ModifyPortalContent, 'setPortalType') security.declareProtected(Permissions.ModifyPortalContent, 'setPortalType')
def setPortalType(self, portal_type = None): def setPortalType(self, portal_type = None):
""" """
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment