Replace g.gettext by iwla._
Add createCurTitle() to factorize code
This commit is contained in:
@@ -348,3 +348,8 @@ def generateHTMLLink(url, name=None, max_length=100, prefix=u'http'):
|
||||
if not name: name = unicode(url)
|
||||
if not url.startswith(prefix): url = u'%s://%s' % (prefix, url)
|
||||
return u'<a href="%s">%s</a>' % (url, name[:max_length])
|
||||
|
||||
def createCurTitle(iwla, title):
|
||||
title = iwla._(title) + time.strftime(u' - %B %Y', iwla.getCurTime())
|
||||
return title
|
||||
|
||||
|
||||
Reference in New Issue
Block a user