##// END OF EJS Templates
Show posts per
neko259 -
r407:33667f74 default
parent child Browse files
Show More
1 NO CONTENT: modified file, binary diff hidden
@@ -7,7 +7,7 b' msgid ""'
7 7 msgstr ""
8 8 "Project-Id-Version: PACKAGE VERSION\n"
9 9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2013-11-09 21:41+0200\n"
10 "POT-Creation-Date: 2013-11-24 16:57+0200\n"
11 11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 13 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -34,77 +34,77 b' msgstr "\xd1\x80\xd0\xb0\xd0\xb7\xd1\x80\xd0\xb0\xd0\xb1\xd0\xbe\xd1\x82\xd1\x87\xd0\xb8\xd0\xba javascript"'
34 34 msgid "designer"
35 35 msgstr "дизайнер"
36 36
37 #: forms.py:47 templates/boards/posting_general.html:184
38 #: templates/boards/thread.html:103
37 #: forms.py:48 templates/boards/posting_general.html:206
38 #: templates/boards/thread.html:101
39 39 msgid "Title"
40 40 msgstr "Заголовок"
41 41
42 #: forms.py:49 templates/boards/posting_general.html:199
43 #: templates/boards/thread.html:118
42 #: forms.py:50 templates/boards/posting_general.html:221
43 #: templates/boards/thread.html:116
44 44 msgid "Text"
45 45 msgstr "Текст"
46 46
47 #: forms.py:50 templates/boards/posting_general.html:204
48 #: templates/boards/thread.html:123
47 #: forms.py:51 templates/boards/posting_general.html:226
48 #: templates/boards/thread.html:121
49 49 msgid "Image"
50 50 msgstr "Изображение"
51 51
52 #: forms.py:53 templates/boards/posting_general.html:214
53 #: templates/boards/thread.html:128
52 #: forms.py:54 templates/boards/posting_general.html:236
53 #: templates/boards/thread.html:126
54 54 msgid "e-mail"
55 55 msgstr ""
56 56
57 #: forms.py:64
57 #: forms.py:65
58 58 #, python-format
59 59 msgid "Title must have less than %s characters"
60 60 msgstr "Заголовок должен иметь меньше %s символов"
61 61
62 #: forms.py:73
62 #: forms.py:74
63 63 #, python-format
64 64 msgid "Text must have less than %s characters"
65 65 msgstr "Текст должен быть короче %s символов"
66 66
67 #: forms.py:84
67 #: forms.py:85
68 68 #, python-format
69 69 msgid "Image must be less than %s bytes"
70 70 msgstr "Изображение должно быть менее %s байт"
71 71
72 #: forms.py:111
72 #: forms.py:112
73 73 msgid "Either text or image must be entered."
74 74 msgstr "Текст или картинка должны быть введены."
75 75
76 #: forms.py:124
76 #: forms.py:125
77 77 #, python-format
78 78 msgid "Wait %s seconds after last posting"
79 79 msgstr "Подождите %s секунд после последнего постинга"
80 80
81 #: forms.py:138 templates/boards/post.html:39
82 #: templates/boards/posting_general.html:209 templates/boards/tags.html:7
81 #: forms.py:139 templates/boards/post.html:60
82 #: templates/boards/posting_general.html:231 templates/boards/tags.html:6
83 83 #: templates/boards/rss/post.html:10
84 84 msgid "Tags"
85 85 msgstr "Теги"
86 86
87 #: forms.py:146
87 #: forms.py:147
88 88 msgid "Inappropriate characters in tags."
89 89 msgstr "Недопустимые символы в тегах."
90 90
91 #: forms.py:174 forms.py:195
91 #: forms.py:175 forms.py:196
92 92 msgid "Captcha validation failed"
93 93 msgstr "Проверка капчи провалена"
94 94
95 #: forms.py:201
95 #: forms.py:202
96 96 msgid "Theme"
97 97 msgstr "Тема"
98 98
99 #: forms.py:206
99 #: forms.py:207
100 100 msgid "Enable moderation panel"
101 101 msgstr "Включить панель модерации"
102 102
103 #: forms.py:221
103 #: forms.py:222
104 104 msgid "No such user found"
105 105 msgstr "Данный пользователь не найден"
106 106
107 #: forms.py:235
107 #: forms.py:236
108 108 #, python-format
109 109 msgid "Wait %s minutes after last login"
110 110 msgstr "Подождите %s минут после последнего входа"
@@ -137,24 +137,29 b' msgstr "\xd0\xa0\xd0\xb5\xd0\xbf\xd0\xbe\xd0\xb7\xd0\xb8\xd1\x82\xd0\xbe\xd1\x80\xd0\xb8\xd0\xb9"'
137 137 msgid "Feed"
138 138 msgstr "Лента"
139 139
140 #: templates/boards/base.html:34
140 #: templates/boards/base.html:35
141 141 msgid "All threads"
142 142 msgstr "Все темы"
143 143
144 #: templates/boards/base.html:39
144 #: templates/boards/base.html:40
145 145 msgid "Tag management"
146 146 msgstr "Управление тегами"
147 147
148 #: templates/boards/base.html:41
148 #: templates/boards/base.html:42
149 149 msgid "Settings"
150 150 msgstr "Настройки"
151 151
152 #: templates/boards/base.html:48 templates/boards/login.html:6
152 #: templates/boards/base.html:49 templates/boards/login.html:6
153 153 #: templates/boards/login.html.py:21
154 154 msgid "Login"
155 155 msgstr "Вход"
156 156
157 #: templates/boards/base.html:49
157 #: templates/boards/base.html:50
158 #, python-format
159 msgid "Speed: %(posts_per_day)s posts per day"
160 msgstr "Скорость: %(posts_per_day)s сообщений в день"
161
162 #: templates/boards/base.html:51
158 163 msgid "Up"
159 164 msgstr "Вверх"
160 165
@@ -166,91 +171,87 b' msgstr "ID \xd0\xbf\xd0\xbe\xd0\xbb\xd1\x8c\xd0\xb7\xd0\xbe\xd0\xb2\xd0\xb0\xd1\x82\xd0\xb5\xd0\xbb\xd1\x8f"'
166 171 msgid "Insert your user id above"
167 172 msgstr "Вставьте свой ID пользователя выше"
168 173
169 #: templates/boards/post.html:10 templates/boards/rss/post.html:5
170 msgid "Post image"
171 msgstr "Изображение сообщения"
172
173 #: templates/boards/post.html:26 templates/boards/posting_general.html:79
174 #: templates/boards/thread.html:60
174 #: templates/boards/post.html:34 templates/boards/posting_general.html:100
175 #: templates/boards/thread.html:59
175 176 msgid "Delete"
176 177 msgstr "Удалить"
177 178
178 #: templates/boards/post.html:29 templates/boards/posting_general.html:82
179 #: templates/boards/thread.html:63
179 #: templates/boards/post.html:37 templates/boards/posting_general.html:104
180 #: templates/boards/thread.html:62
180 181 msgid "Ban IP"
181 182 msgstr "Заблокировать IP"
182 183
183 #: templates/boards/posting_general.html:44
184 #: templates/boards/post.html:50 templates/boards/posting_general.html:113
185 #: templates/boards/posting_general.html:169 templates/boards/thread.html:71
186 msgid "Replies"
187 msgstr "Ответы"
188
189 #: templates/boards/posting_general.html:63
184 190 msgid "Previous page"
185 191 msgstr "Предыдущая страница"
186 192
187 #: templates/boards/posting_general.html:74
193 #: templates/boards/posting_general.html:94
188 194 msgid "Reply"
189 195 msgstr "Ответ"
190 196
191 #: templates/boards/posting_general.html:91
192 #: templates/boards/posting_general.html:147 templates/boards/thread.html:72
193 msgid "Replies"
194 msgstr "Ответы"
195
196 #: templates/boards/posting_general.html:100 templates/boards/thread.html:156
197 #: templates/boards/posting_general.html:122 templates/boards/thread.html:154
197 198 msgid "replies"
198 199 msgstr "ответов"
199 200
200 #: templates/boards/posting_general.html:101 templates/boards/thread.html:157
201 #: templates/boards/posting_general.html:123 templates/boards/thread.html:155
201 202 msgid "images"
202 203 msgstr "изображений"
203 204
204 #: templates/boards/posting_general.html:170
205 #: templates/boards/posting_general.html:192
205 206 msgid "Next page"
206 207 msgstr "Следующая страница"
207 208
208 #: templates/boards/posting_general.html:175
209 #: templates/boards/posting_general.html:197
209 210 msgid "No threads exist. Create the first one!"
210 211 msgstr "Нет тем. Создайте первую!"
211 212
212 #: templates/boards/posting_general.html:181
213 #: templates/boards/posting_general.html:203
213 214 msgid "Create new thread"
214 215 msgstr "Создать новую тему"
215 216
216 #: templates/boards/posting_general.html:189 templates/boards/thread.html:108
217 #: templates/boards/posting_general.html:211 templates/boards/thread.html:106
217 218 msgid "Formatting"
218 219 msgstr "Форматирование"
219 220
220 #: templates/boards/posting_general.html:191 templates/boards/thread.html:110
221 #: templates/boards/posting_general.html:213 templates/boards/thread.html:108
221 222 msgid "quote"
222 223 msgstr "цитата"
223 224
224 #: templates/boards/posting_general.html:192 templates/boards/thread.html:111
225 #: templates/boards/posting_general.html:214 templates/boards/thread.html:109
225 226 msgid "italic"
226 227 msgstr "курсив"
227 228
228 #: templates/boards/posting_general.html:193 templates/boards/thread.html:112
229 #: templates/boards/posting_general.html:215 templates/boards/thread.html:110
229 230 msgid "bold"
230 231 msgstr "полужирный"
231 232
232 #: templates/boards/posting_general.html:194 templates/boards/thread.html:113
233 #: templates/boards/posting_general.html:216 templates/boards/thread.html:111
233 234 msgid "spoiler"
234 235 msgstr "спойлер"
235 236
236 #: templates/boards/posting_general.html:195 templates/boards/thread.html:114
237 #: templates/boards/posting_general.html:217 templates/boards/thread.html:112
237 238 msgid "comment"
238 239 msgstr "комментарий"
239 240
240 #: templates/boards/posting_general.html:227 templates/boards/thread.html:142
241 #: templates/boards/posting_general.html:249 templates/boards/thread.html:140
241 242 msgid "Post"
242 243 msgstr "Отправить"
243 244
244 #: templates/boards/posting_general.html:229
245 #: templates/boards/posting_general.html:251
245 246 msgid "Tags must be delimited by spaces. Text or image is required."
246 247 msgstr ""
247 248 "Теги должны быть разделены пробелами. Текст или изображение обязательны."
248 249
249 #: templates/boards/posting_general.html:232 templates/boards/thread.html:144
250 #: templates/boards/posting_general.html:254 templates/boards/thread.html:142
250 251 msgid "Text syntax"
251 252 msgstr "Синтаксис текста"
252 253
253 #: templates/boards/posting_general.html:242
254 #: templates/boards/posting_general.html:264
254 255 msgid "Pages:"
255 256 msgstr "Страницы: "
256 257
@@ -286,18 +287,22 b' msgstr "\xd1\x82\xd0\xb5\xd0\xbc"'
286 287 msgid "No tags found."
287 288 msgstr "Теги не найдены."
288 289
289 #: templates/boards/thread.html:25
290 #: templates/boards/thread.html:24
290 291 msgid "posts to bumplimit"
291 292 msgstr "сообщений до бамплимита"
292 293
293 #: templates/boards/thread.html:100
294 #: templates/boards/thread.html:98
294 295 msgid "Reply to thread"
295 296 msgstr "Ответить в тему"
296 297
297 #: templates/boards/thread.html:158
298 #: templates/boards/thread.html:156
298 299 msgid "Last update: "
299 300 msgstr "Последнее обновление: "
300 301
302 #: templates/boards/rss/post.html:5
303 msgid "Post image"
304 msgstr "Изображение сообщения"
305
301 306 #: templates/boards/staticpages/banned.html:6
302 307 msgid "Banned"
303 308 msgstr "Заблокирован"
@@ -1,3 +1,5 b''
1 from datetime import datetime, timedelta
2 from datetime import time as dtime
1 3 import os
2 4 from random import random
3 5 import time
@@ -151,6 +153,17 b' class PostManager(models.Manager):'
151 153 def _get_page_count(self, thread_count):
152 154 return int(math.ceil(thread_count / float(settings.THREADS_PER_PAGE)))
153 155
156 def get_posts_per_day(self):
157 """Get count of posts for the current day"""
158
159 today = datetime.now().date()
160 tomorrow = today + timedelta(1)
161 today_start = datetime.combine(today, dtime())
162 today_end = datetime.combine(tomorrow, dtime())
163
164 return self.filter(pub_time__lte=today_end, pub_time__gte=today_start)\
165 .count()
166
154 167
155 168 class Post(models.Model):
156 169 """A post is a message."""
@@ -47,6 +47,7 b''
47 47 <div class="navigation_panel">
48 48 {% block metapanel %}{% endblock %}
49 49 [<a href="{% url "login" %}">{% trans 'Login' %}</a>]
50 {% blocktrans %}Speed: {{ posts_per_day }} posts per day{% endblocktrans %}
50 51 <a class="link" href="#top">{% trans 'Up' %}</a>
51 52 </div>
52 53
@@ -478,6 +478,7 b' def _init_default_context(request):'
478 478 user = _get_user(request)
479 479 context['user'] = user
480 480 context['tags'] = user.get_sorted_fav_tags()
481 context['posts_per_day'] = Post.objects.get_posts_per_day()
481 482
482 483 theme = _get_theme(request, user)
483 484 context['theme'] = theme
@@ -9,8 +9,9 b' denied". Use second only for autoban for'
9 9 [DONE] Clean up tests and make them run ALWAYS
10 10 [DONE] Use transactions in tests
11 11 [DONE] Thread autoupdate (JS + API)
12 [IN PROGRESS] Split up post model into post and thread,
12 [DONE] Split up post model into post and thread,
13 13 and move everything that is used only in 1st post to thread model.
14 [DONE] Show board speed in the lower panel (posts per day)
14 15
15 16 [NOT STARTED] Tree view (JS)
16 17 [NOT STARTED] Adding tags to images filename
@@ -20,7 +21,6 b' and move everything that is used only in'
20 21 [NOT STARTED] Notification engine
21 22 [NOT STARTED] Javascript disabling engine
22 23 [NOT STARTED] Group tags by first letter in all tags list
23 [NOT STARTED] Show board speed in the lower panel (posts per day)
24 24 [NOT STARTED] Character counter in the post field
25 25 [NOT STARTED] Save image thumbnails size to the separate field
26 26 [NOT STARTED] Whitelist functionality. Permin autoban of an address
General Comments 0
You need to be logged in to leave comments. Login now