Commit d2fc2527 authored by Jérome Perrin's avatar Jérome Perrin

Added getTranslatedTitle


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@4452 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 96860682
...@@ -1535,6 +1535,12 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ): ...@@ -1535,6 +1535,12 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
security.declareProtected( Permissions.View, 'Title' ) security.declareProtected( Permissions.View, 'Title' )
Title = getTitleOrId Title = getTitleOrId
security.declareProtected(Permissions.View, 'getTranslatedTitle')
def getTranslatedTitle(self):
"""Returns the translated title. """
translation_service = getToolByName(self, 'translation_service')
return translation_service.translate('content', self.getTitle()).encode('utf8')
# This method allows to sort objects in list is a more reasonable way # This method allows to sort objects in list is a more reasonable way
security.declareProtected(Permissions.View, 'getIntId') security.declareProtected(Permissions.View, 'getIntId')
def getIntId(self): def getIntId(self):
......
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