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