Replace g.gettext by iwla._

Add createCurTitle() to factorize code
This commit is contained in:
2014-12-17 20:31:59 +01:00
parent c278ff30f0
commit ccab40b4e1
9 changed files with 68 additions and 84 deletions

View File

@@ -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