def truncate_title(title):
 if (not title):
  return _(u'(none)')
 if (len(title) > 25):
  return (u'%s...' % title[:22])
 return title

def truncate_title ( title ) : if ( not title ) : return _ ( u'(none)' ) if ( len ( title ) > 25 ) : return ( u'%s...' % title [ : 22 ] ) return title
truncate a title to be displayed in notifications messages .