iwla

iwla Commit Details

Date:2014-12-19 17:50:45 (6 years 7 months ago)
Author:Grégory Soutadé
Branch:dev, master
Commit:ea32f7f0ae59876fd601b373dda5450b9cb11f05
Parents: d47a4609d87cd2b71e3b1b34ac80dbd04e35b6d5
Message:Append domain_name in pages title

Changes:
Mdisplay.py (2 diffs)
Miwla.pot (1 diff)
Miwla.py (2 diffs)
Mplugins/display/all_visits.py (1 diff)

File differences

display.py
2727
2828
2929
30
31
32
33
34
35
3036
3137
3238
......
370376
371377
372378
373
379
380
381
382
383
384
385
374386
375387
# 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''):
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
iwla.pot
44
55
66
7
8
9
10
11
7
8
9
10
11
1212
13
14
13
14
1515
16
17
18
19
2016
21
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
2267
2368
2469
25
70
2671
2772
2873
29
74
3075
3176
3277
33
78
3479
3580
3681
37
82
3883
3984
4085
41
42
43
86
87
88
4489
4590
4691
47
48
49
92
93
94
5095
5196
5297
53
54
98
99
55100
56101
57102
58
103
59104
60105
61106
62
107
63108
64109
65110
66
111
67112
68113
69114
70
115
71116
72117
73118
74
119
75120
76121
77122
78
123
79124
80125
81126
82
127
83128
84129
85130
86
87
131
132
88133
89134
90
91
92
93
94
135
95136
96137
97138
98
99
100
101
102
139
103140
104141
105142
106
143
107144
108145
109146
110
147
111148
112149
113150
114
151
115152
116153
117154
118
155
119156
120157
121158
122
159
123160
124161
125162
126
163
127164
128165
129166
130
167
131168
132169
133170
134
171
135172
136173
137174
138
139
140
141
142
175
143176
144177
145178
146
179
147180
148181
149182
150
183
184
185
186
187
151188
152189
153190
154
191
155192
156193
157194
158
195
159196
160197
161198
162
199
163200
164201
165202
166
203
204
205
206
207
208
209
210
211
212
213
167214
168215
169216
170
217
171218
172219
173220
174
221
175222
176223
177224
178
225
179226
180227
181228
182
183
184
185
186
187
188
189
190
191
192
193
229
194230
195231
196232
197
233
198234
199235
200236
201
237
202238
203239
204240
205
241
206242
207243
208244
209
210
211
245
246
212247
213248
214
215
249
250
216251
217252
218
219
220
253
254
255
221256
222257
223258
224
259
225260
226261
227262
228
229
263
230264
231265
232266
233
234
267
268
235269
236270
237271
238
239
272
240273
241274
242275
243
276
244277
245278
279
#
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
#: display.py:32
msgid "April"
msgstr ""
#: display.py:32
msgid "February"
msgstr ""
#: display.py:32
msgid "January"
msgstr ""
#: display.py:32
msgid "July"
msgstr ""
#: display.py:32
msgid "March"
msgstr ""
#: display.py:32 iwla.py:428
msgid "June"
msgstr ""
#: display.py:32 iwla.py:428
msgid "May"
msgstr ""
#: 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:349
#: iwla.py:377
msgid "By day"
msgstr ""
#: iwla.py:349
#: iwla.py:377
msgid "Day"
msgstr ""
#: iwla.py:349 iwla.py:402
#: iwla.py:377 iwla.py:430
msgid "Not viewed Bandwidth"
msgstr ""
#: iwla.py:349 iwla.py:402
#: iwla.py:377 iwla.py:430
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
#: 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: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
#: 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:349 iwla.py:402 plugins/display/all_visits.py:51
#: plugins/display/top_visitors.py:53
#: iwla.py:377 iwla.py:430 plugins/display/all_visits.py:70
#: plugins/display/top_visitors.py:72
msgid "Bandwidth"
msgstr ""
#: iwla.py:386
#: iwla.py:414
msgid "Average"
msgstr ""
#: iwla.py:391 iwla.py:429
#: iwla.py:419 iwla.py:457
msgid "Total"
msgstr ""
#: iwla.py:400
#: iwla.py:428
msgid "Apr"
msgstr ""
#: iwla.py:400
#: iwla.py:428
msgid "Aug"
msgstr ""
#: iwla.py:400
#: iwla.py:428
msgid "Dec"
msgstr ""
#: iwla.py:400
#: iwla.py:428
msgid "Feb"
msgstr ""
#: iwla.py:400
#: iwla.py:428
msgid "Jan"
msgstr ""
#: iwla.py:400
msgid "July"
#: iwla.py:428
msgid "Jul"
msgstr ""
#: iwla.py:400
msgid "June"
msgstr ""
#: iwla.py:400
#: iwla.py:428
msgid "Mar"
msgstr ""
#: iwla.py:400
msgid "May"
msgstr ""
#: iwla.py:400
#: 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
#: 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:114 plugins/display/referers.py:167
msgid "External URL"
msgstr ""
#: plugins/display/referers.py:100 plugins/display/referers.py:143
#: plugins/display/referers.py:129 plugins/display/referers.py:178
msgid "External URL (robot)"
msgstr ""
#: plugins/display/referers.py:112
#: plugins/display/referers.py:147
msgid "Top Referers"
msgstr ""
#: plugins/display/referers.py:114
#: plugins/display/referers.py:149
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
msgid "Others"
msgstr ""
#: plugins/display/referers.py:158
msgid "Key Phrases"
msgstr ""
#: plugins/display/referers.py:165 plugins/display/referers.py:175
#: 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"
#: plugins/display/top_downloads.py:71
msgid "Hit"
msgstr ""
#: plugins/display/top_downloads.py:54
msgid "Hit"
#: plugins/display/top_downloads.py:71 plugins/display/top_downloads.py:91
msgid "All Downloads"
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: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 ""
iwla.py
368368
369369
370370
371
371
372372
373373
374374
......
425425
426426
427427
428
428
429429
430430
431431
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)
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)
plugins/display/all_visits.py
6161
6262
6363
64
64
6565
6666
6767
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)

Archive Download the corresponding diff file

Branches

Tags