Append domain_name in pages title
This commit is contained in:
parent
d47a4609d8
commit
ea32f7f0ae
14
display.py
14
display.py
|
@ -27,6 +27,12 @@ import logging
|
|||
# Create output HTML files
|
||||
#
|
||||
|
||||
# Just for detection
|
||||
def _(name): pass
|
||||
_('January'), _('February'), _('March'), _('April'), _('May'), _('June'), _('July')
|
||||
_('August'), _('September'), _('October'), _('November'), _('December')
|
||||
del _
|
||||
|
||||
class DisplayHTMLRaw(object):
|
||||
|
||||
def __init__(self, iwla, html=u''):
|
||||
|
@ -370,6 +376,12 @@ def generateHTMLLink(url, name=None, max_length=100, prefix=u'http'):
|
|||
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())
|
||||
title = iwla._(title)
|
||||
month_name = time.strftime(u'%B', iwla.getCurTime())
|
||||
year = time.strftime(u'%Y', iwla.getCurTime())
|
||||
title += u' - %s %s' % (iwla._(month_name), year)
|
||||
domain_name = iwla.getConfValue('domain_name', '')
|
||||
if domain_name:
|
||||
title += u' - %s' % (domain_name)
|
||||
return title
|
||||
|
||||
|
|
312
iwla.pot
312
iwla.pot
|
@ -4,242 +4,276 @@
|
|||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: iwla\n"
|
||||
"POT-Creation-Date: 2014-12-16 21:36+CET\n"
|
||||
"PO-Revision-Date: 2014-12-17 19:07+0100\n"
|
||||
"Last-Translator: Soutadé <soutade@gmail.com>\n"
|
||||
"Language-Team: iwla <iwla>\n"
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"POT-Creation-Date: 2014-12-19 17:46+CET\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: ENCODING\n"
|
||||
"Generated-By: pygettext.py 1.5\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Language: en\n"
|
||||
"X-Generator: Poedit 1.6.10\n"
|
||||
"X-Poedit-SourceCharset: UTF-8\n"
|
||||
|
||||
#: iwla.py:343
|
||||
msgid "Statistics"
|
||||
|
||||
#: display.py:32
|
||||
msgid "April"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:349
|
||||
msgid "By day"
|
||||
#: display.py:32
|
||||
msgid "February"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:349
|
||||
msgid "Day"
|
||||
#: display.py:32
|
||||
msgid "January"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:349 iwla.py:402
|
||||
msgid "Not viewed Bandwidth"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:349 iwla.py:402
|
||||
msgid "Visits"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:349 iwla.py:402 plugins/display/all_visits.py:51
|
||||
#: plugins/display/referers.py:78 plugins/display/referers.py:118
|
||||
#: plugins/display/top_downloads.py:74 plugins/display/top_visitors.py:53
|
||||
msgid "Hits"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:349 iwla.py:402 plugins/display/all_visits.py:51
|
||||
#: plugins/display/referers.py:78 plugins/display/referers.py:118
|
||||
#: plugins/display/top_visitors.py:53
|
||||
msgid "Pages"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:349 iwla.py:402 plugins/display/all_visits.py:51
|
||||
#: plugins/display/top_visitors.py:53
|
||||
msgid "Bandwidth"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:386
|
||||
msgid "Average"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:391 iwla.py:429
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
msgid "Apr"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
msgid "Aug"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
msgid "Dec"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
msgid "Feb"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
msgid "Jan"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
#: display.py:32
|
||||
msgid "July"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
#: display.py:32
|
||||
msgid "March"
|
||||
msgstr ""
|
||||
|
||||
#: display.py:32 iwla.py:428
|
||||
msgid "June"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
msgid "Mar"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
#: display.py:32 iwla.py:428
|
||||
msgid "May"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
#: display.py:33
|
||||
msgid "August"
|
||||
msgstr ""
|
||||
|
||||
#: display.py:33
|
||||
msgid "December"
|
||||
msgstr ""
|
||||
|
||||
#: display.py:33
|
||||
msgid "November"
|
||||
msgstr ""
|
||||
|
||||
#: display.py:33
|
||||
msgid "October"
|
||||
msgstr ""
|
||||
|
||||
#: display.py:33
|
||||
msgid "September"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:371
|
||||
msgid "Statistics"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:377
|
||||
msgid "By day"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:377
|
||||
msgid "Day"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:377 iwla.py:430
|
||||
msgid "Not viewed Bandwidth"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:377 iwla.py:430
|
||||
msgid "Visits"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:377 iwla.py:430 plugins/display/all_visits.py:70
|
||||
#: plugins/display/referers.py:95 plugins/display/referers.py:153
|
||||
#: plugins/display/top_downloads.py:97 plugins/display/top_visitors.py:72
|
||||
msgid "Hits"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:377 iwla.py:430 plugins/display/all_visits.py:70
|
||||
#: plugins/display/referers.py:95 plugins/display/referers.py:153
|
||||
#: plugins/display/top_visitors.py:72
|
||||
msgid "Pages"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:377 iwla.py:430 plugins/display/all_visits.py:70
|
||||
#: plugins/display/top_visitors.py:72
|
||||
msgid "Bandwidth"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:414
|
||||
msgid "Average"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:419 iwla.py:457
|
||||
msgid "Total"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:428
|
||||
msgid "Apr"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:428
|
||||
msgid "Aug"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:428
|
||||
msgid "Dec"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:428
|
||||
msgid "Feb"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:428
|
||||
msgid "Jan"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:428
|
||||
msgid "Jul"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:428
|
||||
msgid "Mar"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:428
|
||||
msgid "Nov"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
#: iwla.py:428
|
||||
msgid "Oct"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:400
|
||||
#: iwla.py:428
|
||||
msgid "Sep"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:401
|
||||
#: iwla.py:429
|
||||
msgid "Summary"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:402
|
||||
#: iwla.py:430
|
||||
msgid "Month"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:402
|
||||
#: iwla.py:430
|
||||
msgid "Visitors"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:402 iwla.py:412
|
||||
#: iwla.py:430 iwla.py:440
|
||||
msgid "Details"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:436
|
||||
#: iwla.py:465
|
||||
msgid "Statistics for"
|
||||
msgstr ""
|
||||
|
||||
#: iwla.py:443
|
||||
#: iwla.py:472
|
||||
msgid "Last update"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/all_visits.py:45 plugins/display/all_visits.py:73
|
||||
msgid "All visits"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/all_visits.py:51 plugins/display/top_visitors.py:53
|
||||
#: plugins/display/all_visits.py:70 plugins/display/top_visitors.py:72
|
||||
msgid "Host"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/all_visits.py:51 plugins/display/top_visitors.py:53
|
||||
#: plugins/display/all_visits.py:70 plugins/display/top_visitors.py:72
|
||||
msgid "Last seen"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/all_visits.py:74 plugins/display/top_visitors.py:53
|
||||
#: plugins/display/all_visits.py:92
|
||||
msgid "All visits"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/all_visits.py:93 plugins/display/top_visitors.py:72
|
||||
msgid "Top visitors"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:72 plugins/display/referers.py:78
|
||||
#: plugins/display/referers.py:95
|
||||
msgid "Connexion from"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:78 plugins/display/referers.py:118
|
||||
#: plugins/display/referers.py:95 plugins/display/referers.py:153
|
||||
msgid "Origin"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:82 plugins/display/referers.py:121
|
||||
#: plugins/display/referers.py:99 plugins/display/referers.py:156
|
||||
msgid "Search Engine"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:91 plugins/display/referers.py:132
|
||||
msgid "External URL"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:100 plugins/display/referers.py:143
|
||||
msgid "External URL (robot)"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:112
|
||||
msgid "Top Referers"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:114
|
||||
msgid "All Referers"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:128 plugins/display/referers.py:139
|
||||
#: plugins/display/referers.py:150 plugins/display/referers.py:187
|
||||
#: plugins/display/top_downloads.py:80 plugins/display/top_hits.py:79
|
||||
#: plugins/display/top_pages.py:79 plugins/display/top_visitors.py:73
|
||||
#: plugins/display/referers.py:110 plugins/display/referers.py:125
|
||||
#: plugins/display/referers.py:140 plugins/display/referers.py:163
|
||||
#: plugins/display/referers.py:174 plugins/display/referers.py:185
|
||||
#: plugins/display/referers.py:222 plugins/display/top_downloads.py:83
|
||||
#: plugins/display/top_downloads.py:103 plugins/display/top_hits.py:82
|
||||
#: plugins/display/top_hits.py:103 plugins/display/top_pages.py:82
|
||||
#: plugins/display/top_pages.py:102 plugins/display/top_visitors.py:92
|
||||
msgid "Others"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:158
|
||||
msgid "Key Phrases"
|
||||
#: plugins/display/referers.py:114 plugins/display/referers.py:167
|
||||
msgid "External URL"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:165 plugins/display/referers.py:175
|
||||
#: plugins/display/referers.py:129 plugins/display/referers.py:178
|
||||
msgid "External URL (robot)"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:147
|
||||
msgid "Top Referers"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:149
|
||||
msgid "All Referers"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:200 plugins/display/referers.py:210
|
||||
msgid "Top key phrases"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:165 plugins/display/referers.py:181
|
||||
#: plugins/display/referers.py:200 plugins/display/referers.py:216
|
||||
msgid "Key phrase"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:165 plugins/display/referers.py:181
|
||||
#: plugins/display/referers.py:200 plugins/display/referers.py:216
|
||||
msgid "Search"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/referers.py:177
|
||||
#: plugins/display/referers.py:212
|
||||
msgid "All key phrases"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/top_downloads.py:51 plugins/display/top_downloads.py:54
|
||||
#: plugins/display/top_downloads.py:68
|
||||
msgid "All Downloads"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/top_downloads.py:54
|
||||
#: plugins/display/top_downloads.py:71
|
||||
msgid "Hit"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/top_downloads.py:54 plugins/display/top_downloads.py:74
|
||||
#: plugins/display/top_hits.py:54 plugins/display/top_hits.py:73
|
||||
#: plugins/display/top_pages.py:54 plugins/display/top_pages.py:73
|
||||
#: plugins/display/top_downloads.py:71 plugins/display/top_downloads.py:91
|
||||
msgid "All Downloads"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/top_downloads.py:71 plugins/display/top_downloads.py:97
|
||||
#: plugins/display/top_hits.py:71 plugins/display/top_hits.py:97
|
||||
#: plugins/display/top_pages.py:71 plugins/display/top_pages.py:96
|
||||
msgid "URI"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/top_downloads.py:66
|
||||
#: plugins/display/top_downloads.py:89
|
||||
msgid "Top Downloads"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/top_hits.py:49 plugins/display/top_hits.py:54
|
||||
#: plugins/display/top_hits.py:67
|
||||
#: plugins/display/top_hits.py:71 plugins/display/top_hits.py:91
|
||||
msgid "All Hits"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/top_hits.py:54 plugins/display/top_hits.py:73
|
||||
#: plugins/display/top_pages.py:54 plugins/display/top_pages.py:73
|
||||
#: plugins/display/top_hits.py:71 plugins/display/top_hits.py:97
|
||||
#: plugins/display/top_pages.py:71 plugins/display/top_pages.py:96
|
||||
msgid "Entrance"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/top_pages.py:49 plugins/display/top_pages.py:54
|
||||
#: plugins/display/top_pages.py:67
|
||||
#: plugins/display/top_pages.py:71 plugins/display/top_pages.py:90
|
||||
msgid "All Pages"
|
||||
msgstr ""
|
||||
|
||||
#: plugins/display/top_pages.py:65
|
||||
#: plugins/display/top_pages.py:88
|
||||
msgid "Top Pages"
|
||||
msgstr ""
|
||||
|
||||
|
|
4
iwla.py
4
iwla.py
|
@ -368,7 +368,7 @@ class IWLA(object):
|
|||
|
||||
def _generateDisplayDaysStats(self):
|
||||
cur_time = self.meta_infos['last_time']
|
||||
title = '%s %d/%02d' % (self._('Statistics'), cur_time.tm_year, cur_time.tm_mon)
|
||||
title = createCurTitle(self, self._('Statistics'))
|
||||
filename = self.getCurDisplayPath('index.html')
|
||||
self.logger.info('==> Generate display (%s)' % (filename))
|
||||
page = self.display.createPage(title, filename, conf.css_path)
|
||||
|
@ -425,7 +425,7 @@ class IWLA(object):
|
|||
|
||||
def _generateDisplayMonthStats(self, page, year, month_stats):
|
||||
cur_time = time.localtime()
|
||||
months_name = ['', self._('Jan'), self._('Feb'), self._('Mar'), self._('Apr'), self._('May'), self._('June'), self._('July'), self._('Aug'), self._('Sep'), self._('Oct'), self._('Nov'), self._('Dec')]
|
||||
months_name = ['', self._('Jan'), self._('Feb'), self._('Mar'), self._('Apr'), self._('May'), self._('June'), self._('Jul'), self._('Aug'), self._('Sep'), self._('Oct'), self._('Nov'), self._('Dec')]
|
||||
title = '%s %d' % (self._('Summary'), year)
|
||||
cols = [self._('Month'), self._('Visitors'), self._('Visits'), self._('Pages'), self._('Hits'), self._('Bandwidth'), self._('Not viewed Bandwidth'), self._('Details')]
|
||||
graph_cols=range(1,7)
|
||||
|
|
|
@ -61,7 +61,7 @@ class IWLADisplayAllVisits(IPlugin):
|
|||
|
||||
last_access = sorted(hits.values(), key=lambda t: t['last_access'], reverse=True)
|
||||
|
||||
title = time.strftime(self.iwla._(u'All visits') + u' - %B %Y', self.iwla.getCurTime())
|
||||
title = createCurTitle(self.iwla, u'All visits')
|
||||
|
||||
filename = 'all_visits.html'
|
||||
path = self.iwla.getCurDisplayPath(filename)
|
||||
|
|
Loading…
Reference in New Issue
Block a user