Show More
1 | NO CONTENT: modified file, binary diff hidden |
|
NO CONTENT: modified file, binary diff hidden |
@@ -1,550 +1,553 b'' | |||||
1 | # SOME DESCRIPTIVE TITLE. |
|
1 | # SOME DESCRIPTIVE TITLE. | |
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER |
|
2 | # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER | |
3 | # This file is distributed under the same license as the PACKAGE package. |
|
3 | # This file is distributed under the same license as the PACKAGE package. | |
4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
|
4 | # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. | |
5 | # |
|
5 | # | |
6 | msgid "" |
|
6 | 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: 2015-10-09 23:21+0300\n" |
|
10 | "POT-Creation-Date: 2015-10-09 23:21+0300\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" | |
14 | "Language: ru\n" |
|
14 | "Language: ru\n" | |
15 | "MIME-Version: 1.0\n" |
|
15 | "MIME-Version: 1.0\n" | |
16 | "Content-Type: text/plain; charset=UTF-8\n" |
|
16 | "Content-Type: text/plain; charset=UTF-8\n" | |
17 | "Content-Transfer-Encoding: 8bit\n" |
|
17 | "Content-Transfer-Encoding: 8bit\n" | |
18 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" |
|
18 | "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" | |
19 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" |
|
19 | "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" | |
20 |
|
20 | |||
21 | #: admin.py:22 |
|
21 | #: admin.py:22 | |
22 | msgid "{} posters were banned" |
|
22 | msgid "{} posters were banned" | |
23 | msgstr "" |
|
23 | msgstr "" | |
24 |
|
24 | |||
25 | #: authors.py:9 |
|
25 | #: authors.py:9 | |
26 | msgid "author" |
|
26 | msgid "author" | |
27 | msgstr "автор" |
|
27 | msgstr "автор" | |
28 |
|
28 | |||
29 | #: authors.py:10 |
|
29 | #: authors.py:10 | |
30 | msgid "developer" |
|
30 | msgid "developer" | |
31 | msgstr "разработчик" |
|
31 | msgstr "разработчик" | |
32 |
|
32 | |||
33 | #: authors.py:11 |
|
33 | #: authors.py:11 | |
34 | msgid "javascript developer" |
|
34 | msgid "javascript developer" | |
35 | msgstr "разработчик javascript" |
|
35 | msgstr "разработчик javascript" | |
36 |
|
36 | |||
37 | #: authors.py:12 |
|
37 | #: authors.py:12 | |
38 | msgid "designer" |
|
38 | msgid "designer" | |
39 | msgstr "дизайнер" |
|
39 | msgstr "дизайнер" | |
40 |
|
40 | |||
41 | #: forms.py:30 |
|
41 | #: forms.py:30 | |
42 | msgid "Type message here. Use formatting panel for more advanced usage." |
|
42 | msgid "Type message here. Use formatting panel for more advanced usage." | |
43 | msgstr "" |
|
43 | msgstr "" | |
44 | "Вводите сообщение сюда. Используйте панель для более сложного форматирования." |
|
44 | "Вводите сообщение сюда. Используйте панель для более сложного форматирования." | |
45 |
|
45 | |||
46 | #: forms.py:31 |
|
46 | #: forms.py:31 | |
47 | msgid "music images i_dont_like_tags" |
|
47 | msgid "music images i_dont_like_tags" | |
48 | msgstr "музыка картинки теги_не_нужны" |
|
48 | msgstr "музыка картинки теги_не_нужны" | |
49 |
|
49 | |||
50 | #: forms.py:33 |
|
50 | #: forms.py:33 | |
51 | msgid "Title" |
|
51 | msgid "Title" | |
52 | msgstr "Заголовок" |
|
52 | msgstr "Заголовок" | |
53 |
|
53 | |||
54 | #: forms.py:34 |
|
54 | #: forms.py:34 | |
55 | msgid "Text" |
|
55 | msgid "Text" | |
56 | msgstr "Текст" |
|
56 | msgstr "Текст" | |
57 |
|
57 | |||
58 | #: forms.py:35 |
|
58 | #: forms.py:35 | |
59 | msgid "Tag" |
|
59 | msgid "Tag" | |
60 | msgstr "Метка" |
|
60 | msgstr "Метка" | |
61 |
|
61 | |||
62 | #: forms.py:36 templates/boards/base.html:40 templates/search/search.html:7 |
|
62 | #: forms.py:36 templates/boards/base.html:40 templates/search/search.html:7 | |
63 | msgid "Search" |
|
63 | msgid "Search" | |
64 | msgstr "Поиск" |
|
64 | msgstr "Поиск" | |
65 |
|
65 | |||
66 | #: forms.py:139 |
|
66 | #: forms.py:139 | |
67 | msgid "File" |
|
67 | msgid "File" | |
68 | msgstr "Файл" |
|
68 | msgstr "Файл" | |
69 |
|
69 | |||
70 | #: forms.py:142 |
|
70 | #: forms.py:142 | |
71 | msgid "File URL" |
|
71 | msgid "File URL" | |
72 | msgstr "URL файла" |
|
72 | msgstr "URL файла" | |
73 |
|
73 | |||
74 | #: forms.py:148 |
|
74 | #: forms.py:148 | |
75 | msgid "e-mail" |
|
75 | msgid "e-mail" | |
76 | msgstr "" |
|
76 | msgstr "" | |
77 |
|
77 | |||
78 | #: forms.py:151 |
|
78 | #: forms.py:151 | |
79 | msgid "Additional threads" |
|
79 | msgid "Additional threads" | |
80 | msgstr "Дополнительные темы" |
|
80 | msgstr "Дополнительные темы" | |
81 |
|
81 | |||
82 | #: forms.py:162 |
|
82 | #: forms.py:162 | |
83 | #, python-format |
|
83 | #, python-format | |
84 | msgid "Title must have less than %s characters" |
|
84 | msgid "Title must have less than %s characters" | |
85 | msgstr "Заголовок должен иметь меньше %s символов" |
|
85 | msgstr "Заголовок должен иметь меньше %s символов" | |
86 |
|
86 | |||
87 | #: forms.py:172 |
|
87 | #: forms.py:172 | |
88 | #, python-format |
|
88 | #, python-format | |
89 | msgid "Text must have less than %s characters" |
|
89 | msgid "Text must have less than %s characters" | |
90 | msgstr "Текст должен быть короче %s символов" |
|
90 | msgstr "Текст должен быть короче %s символов" | |
91 |
|
91 | |||
92 | #: forms.py:192 |
|
92 | #: forms.py:192 | |
93 | msgid "Invalid URL" |
|
93 | msgid "Invalid URL" | |
94 | msgstr "Неверный URL" |
|
94 | msgstr "Неверный URL" | |
95 |
|
95 | |||
96 | #: forms.py:213 |
|
96 | #: forms.py:213 | |
97 | msgid "Invalid additional thread list" |
|
97 | msgid "Invalid additional thread list" | |
98 | msgstr "Неверный список дополнительных тем" |
|
98 | msgstr "Неверный список дополнительных тем" | |
99 |
|
99 | |||
100 | #: forms.py:258 |
|
100 | #: forms.py:258 | |
101 | msgid "Either text or file must be entered." |
|
101 | msgid "Either text or file must be entered." | |
102 | msgstr "Текст или файл должны быть введены." |
|
102 | msgstr "Текст или файл должны быть введены." | |
103 |
|
103 | |||
104 | #: forms.py:317 templates/boards/all_threads.html:153 |
|
104 | #: forms.py:317 templates/boards/all_threads.html:153 | |
105 | #: templates/boards/rss/post.html:10 templates/boards/tags.html:6 |
|
105 | #: templates/boards/rss/post.html:10 templates/boards/tags.html:6 | |
106 | msgid "Tags" |
|
106 | msgid "Tags" | |
107 | msgstr "Метки" |
|
107 | msgstr "Метки" | |
108 |
|
108 | |||
109 | #: forms.py:324 |
|
109 | #: forms.py:324 | |
110 | msgid "Inappropriate characters in tags." |
|
110 | msgid "Inappropriate characters in tags." | |
111 | msgstr "Недопустимые символы в метках." |
|
111 | msgstr "Недопустимые символы в метках." | |
112 |
|
112 | |||
113 | #: forms.py:344 |
|
113 | #: forms.py:344 | |
114 | msgid "Need at least one section." |
|
114 | msgid "Need at least one section." | |
115 | msgstr "Нужен хотя бы один раздел." |
|
115 | msgstr "Нужен хотя бы один раздел." | |
116 |
|
116 | |||
117 | #: forms.py:356 |
|
117 | #: forms.py:356 | |
118 | msgid "Theme" |
|
118 | msgid "Theme" | |
119 | msgstr "Тема" |
|
119 | msgstr "Тема" | |
120 |
|
120 | |||
121 | #: forms.py:357 |
|
121 | #: forms.py:357 | |
122 | msgid "Image view mode" |
|
122 | msgid "Image view mode" | |
123 | msgstr "Режим просмотра изображений" |
|
123 | msgstr "Режим просмотра изображений" | |
124 |
|
124 | |||
125 | #: forms.py:358 |
|
125 | #: forms.py:358 | |
126 | msgid "User name" |
|
126 | msgid "User name" | |
127 | msgstr "Имя пользователя" |
|
127 | msgstr "Имя пользователя" | |
128 |
|
128 | |||
129 | #: forms.py:359 |
|
129 | #: forms.py:359 | |
130 | msgid "Time zone" |
|
130 | msgid "Time zone" | |
131 | msgstr "Часовой пояс" |
|
131 | msgstr "Часовой пояс" | |
132 |
|
132 | |||
133 | #: forms.py:365 |
|
133 | #: forms.py:365 | |
134 | msgid "Inappropriate characters." |
|
134 | msgid "Inappropriate characters." | |
135 | msgstr "Недопустимые символы." |
|
135 | msgstr "Недопустимые символы." | |
136 |
|
136 | |||
137 | #: templates/boards/404.html:6 |
|
137 | #: templates/boards/404.html:6 | |
138 | msgid "Not found" |
|
138 | msgid "Not found" | |
139 | msgstr "Не найдено" |
|
139 | msgstr "Не найдено" | |
140 |
|
140 | |||
141 | #: templates/boards/404.html:12 |
|
141 | #: templates/boards/404.html:12 | |
142 | msgid "This page does not exist" |
|
142 | msgid "This page does not exist" | |
143 | msgstr "Этой страницы не существует" |
|
143 | msgstr "Этой страницы не существует" | |
144 |
|
144 | |||
145 | #: templates/boards/all_threads.html:35 |
|
145 | #: templates/boards/all_threads.html:35 | |
146 | msgid "Details" |
|
146 | msgid "Details" | |
147 | msgstr "Подробности" |
|
147 | msgstr "Подробности" | |
148 |
|
148 | |||
149 | #: templates/boards/all_threads.html:69 |
|
149 | #: templates/boards/all_threads.html:69 | |
150 | msgid "Edit tag" |
|
150 | msgid "Edit tag" | |
151 | msgstr "Изменить метку" |
|
151 | msgstr "Изменить метку" | |
152 |
|
152 | |||
153 | #: templates/boards/all_threads.html:76 |
|
153 | #: templates/boards/all_threads.html:76 | |
154 | #, python-format |
|
154 | #, python-format | |
155 | msgid "%(count)s active thread" |
|
155 | msgid "%(count)s active thread" | |
156 | msgid_plural "%(count)s active threads" |
|
156 | msgid_plural "%(count)s active threads" | |
157 | msgstr[0] "%(count)s активная тема" |
|
157 | msgstr[0] "%(count)s активная тема" | |
158 | msgstr[1] "%(count)s активные темы" |
|
158 | msgstr[1] "%(count)s активные темы" | |
159 | msgstr[2] "%(count)s активных тем" |
|
159 | msgstr[2] "%(count)s активных тем" | |
160 |
|
160 | |||
161 | #: templates/boards/all_threads.html:76 |
|
161 | #: templates/boards/all_threads.html:76 | |
162 | #, python-format |
|
162 | #, python-format | |
163 | msgid "%(count)s thread in bumplimit" |
|
163 | msgid "%(count)s thread in bumplimit" | |
164 | msgid_plural "%(count)s threads in bumplimit" |
|
164 | msgid_plural "%(count)s threads in bumplimit" | |
165 | msgstr[0] "%(count)s тема в бамплимите" |
|
165 | msgstr[0] "%(count)s тема в бамплимите" | |
166 | msgstr[1] "%(count)s темы в бамплимите" |
|
166 | msgstr[1] "%(count)s темы в бамплимите" | |
167 | msgstr[2] "%(count)s тем в бамплимите" |
|
167 | msgstr[2] "%(count)s тем в бамплимите" | |
168 |
|
168 | |||
169 | #: templates/boards/all_threads.html:77 |
|
169 | #: templates/boards/all_threads.html:77 | |
170 | #, python-format |
|
170 | #, python-format | |
171 | msgid "%(count)s archived thread" |
|
171 | msgid "%(count)s archived thread" | |
172 | msgid_plural "%(count)s archived thread" |
|
172 | msgid_plural "%(count)s archived thread" | |
173 | msgstr[0] "%(count)s архивная тема" |
|
173 | msgstr[0] "%(count)s архивная тема" | |
174 | msgstr[1] "%(count)s архивные темы" |
|
174 | msgstr[1] "%(count)s архивные темы" | |
175 | msgstr[2] "%(count)s архивных тем" |
|
175 | msgstr[2] "%(count)s архивных тем" | |
176 |
|
176 | |||
177 | #: templates/boards/all_threads.html:78 templates/boards/post.html:102 |
|
177 | #: templates/boards/all_threads.html:78 templates/boards/post.html:102 | |
178 | #, python-format |
|
178 | #, python-format | |
179 | #| msgid "%(count)s message" |
|
179 | #| msgid "%(count)s message" | |
180 | #| msgid_plural "%(count)s messages" |
|
180 | #| msgid_plural "%(count)s messages" | |
181 | msgid "%(count)s message" |
|
181 | msgid "%(count)s message" | |
182 | msgid_plural "%(count)s messages" |
|
182 | msgid_plural "%(count)s messages" | |
183 | msgstr[0] "%(count)s сообщение" |
|
183 | msgstr[0] "%(count)s сообщение" | |
184 | msgstr[1] "%(count)s сообщения" |
|
184 | msgstr[1] "%(count)s сообщения" | |
185 | msgstr[2] "%(count)s сообщений" |
|
185 | msgstr[2] "%(count)s сообщений" | |
186 |
|
186 | |||
187 | #: templates/boards/all_threads.html:95 templates/boards/feed.html:30 |
|
187 | #: templates/boards/all_threads.html:95 templates/boards/feed.html:30 | |
188 | #: templates/boards/notifications.html:17 templates/search/search.html:26 |
|
188 | #: templates/boards/notifications.html:17 templates/search/search.html:26 | |
189 | msgid "Previous page" |
|
189 | msgid "Previous page" | |
190 | msgstr "Предыдущая страница" |
|
190 | msgstr "Предыдущая страница" | |
191 |
|
191 | |||
192 | #: templates/boards/all_threads.html:109 |
|
192 | #: templates/boards/all_threads.html:109 | |
193 | #, python-format |
|
193 | #, python-format | |
194 | msgid "Skipped %(count)s reply. Open thread to see all replies." |
|
194 | msgid "Skipped %(count)s reply. Open thread to see all replies." | |
195 | msgid_plural "Skipped %(count)s replies. Open thread to see all replies." |
|
195 | msgid_plural "Skipped %(count)s replies. Open thread to see all replies." | |
196 | msgstr[0] "Пропущен %(count)s ответ. Откройте тред, чтобы увидеть все ответы." |
|
196 | msgstr[0] "Пропущен %(count)s ответ. Откройте тред, чтобы увидеть все ответы." | |
197 | msgstr[1] "" |
|
197 | msgstr[1] "" | |
198 | "Пропущено %(count)s ответа. Откройте тред, чтобы увидеть все ответы." |
|
198 | "Пропущено %(count)s ответа. Откройте тред, чтобы увидеть все ответы." | |
199 | msgstr[2] "" |
|
199 | msgstr[2] "" | |
200 | "Пропущено %(count)s ответов. Откройте тред, чтобы увидеть все ответы." |
|
200 | "Пропущено %(count)s ответов. Откройте тред, чтобы увидеть все ответы." | |
201 |
|
201 | |||
202 | #: templates/boards/all_threads.html:127 templates/boards/feed.html:40 |
|
202 | #: templates/boards/all_threads.html:127 templates/boards/feed.html:40 | |
203 | #: templates/boards/notifications.html:27 templates/search/search.html:37 |
|
203 | #: templates/boards/notifications.html:27 templates/search/search.html:37 | |
204 | msgid "Next page" |
|
204 | msgid "Next page" | |
205 | msgstr "Следующая страница" |
|
205 | msgstr "Следующая страница" | |
206 |
|
206 | |||
207 | #: templates/boards/all_threads.html:132 |
|
207 | #: templates/boards/all_threads.html:132 | |
208 | msgid "No threads exist. Create the first one!" |
|
208 | msgid "No threads exist. Create the first one!" | |
209 | msgstr "Нет тем. Создайте первую!" |
|
209 | msgstr "Нет тем. Создайте первую!" | |
210 |
|
210 | |||
211 | #: templates/boards/all_threads.html:138 |
|
211 | #: templates/boards/all_threads.html:138 | |
212 | msgid "Create new thread" |
|
212 | msgid "Create new thread" | |
213 | msgstr "Создать новую тему" |
|
213 | msgstr "Создать новую тему" | |
214 |
|
214 | |||
215 | #: templates/boards/all_threads.html:143 templates/boards/preview.html:16 |
|
215 | #: templates/boards/all_threads.html:143 templates/boards/preview.html:16 | |
216 | #: templates/boards/thread_normal.html:51 |
|
216 | #: templates/boards/thread_normal.html:51 | |
217 | msgid "Post" |
|
217 | msgid "Post" | |
218 | msgstr "Отправить" |
|
218 | msgstr "Отправить" | |
219 |
|
219 | |||
220 | #: templates/boards/all_threads.html:144 templates/boards/preview.html:6 |
|
220 | #: templates/boards/all_threads.html:144 templates/boards/preview.html:6 | |
221 | #: templates/boards/staticpages/help.html:21 |
|
221 | #: templates/boards/staticpages/help.html:21 | |
222 | #: templates/boards/thread_normal.html:52 |
|
222 | #: templates/boards/thread_normal.html:52 | |
223 | msgid "Preview" |
|
223 | msgid "Preview" | |
224 | msgstr "Предпросмотр" |
|
224 | msgstr "Предпросмотр" | |
225 |
|
225 | |||
226 | #: templates/boards/all_threads.html:149 |
|
226 | #: templates/boards/all_threads.html:149 | |
227 | msgid "Tags must be delimited by spaces. Text or image is required." |
|
227 | msgid "Tags must be delimited by spaces. Text or image is required." | |
228 | msgstr "" |
|
228 | msgstr "" | |
229 | "Метки должны быть разделены пробелами. Текст или изображение обязательны." |
|
229 | "Метки должны быть разделены пробелами. Текст или изображение обязательны." | |
230 |
|
230 | |||
231 | #: templates/boards/all_threads.html:152 templates/boards/thread_normal.html:58 |
|
231 | #: templates/boards/all_threads.html:152 templates/boards/thread_normal.html:58 | |
232 | msgid "Text syntax" |
|
232 | msgid "Text syntax" | |
233 | msgstr "Синтаксис текста" |
|
233 | msgstr "Синтаксис текста" | |
234 |
|
234 | |||
235 | #: templates/boards/all_threads.html:166 templates/boards/feed.html:53 |
|
235 | #: templates/boards/all_threads.html:166 templates/boards/feed.html:53 | |
236 | msgid "Pages:" |
|
236 | msgid "Pages:" | |
237 | msgstr "Страницы: " |
|
237 | msgstr "Страницы: " | |
238 |
|
238 | |||
239 | #: templates/boards/authors.html:6 templates/boards/authors.html.py:12 |
|
239 | #: templates/boards/authors.html:6 templates/boards/authors.html.py:12 | |
240 | msgid "Authors" |
|
240 | msgid "Authors" | |
241 | msgstr "Авторы" |
|
241 | msgstr "Авторы" | |
242 |
|
242 | |||
243 | #: templates/boards/authors.html:26 |
|
243 | #: templates/boards/authors.html:26 | |
244 | msgid "Distributed under the" |
|
244 | msgid "Distributed under the" | |
245 | msgstr "Распространяется под" |
|
245 | msgstr "Распространяется под" | |
246 |
|
246 | |||
247 | #: templates/boards/authors.html:28 |
|
247 | #: templates/boards/authors.html:28 | |
248 | msgid "license" |
|
248 | msgid "license" | |
249 | msgstr "лицензией" |
|
249 | msgstr "лицензией" | |
250 |
|
250 | |||
251 | #: templates/boards/authors.html:30 |
|
251 | #: templates/boards/authors.html:30 | |
252 | msgid "Repository" |
|
252 | msgid "Repository" | |
253 | msgstr "Репозиторий" |
|
253 | msgstr "Репозиторий" | |
254 |
|
254 | |||
255 | #: templates/boards/base.html:14 templates/boards/base.html.py:41 |
|
255 | #: templates/boards/base.html:14 templates/boards/base.html.py:41 | |
256 | msgid "Feed" |
|
256 | msgid "Feed" | |
257 | msgstr "Лента" |
|
257 | msgstr "Лента" | |
258 |
|
258 | |||
259 | #: templates/boards/base.html:31 |
|
259 | #: templates/boards/base.html:31 | |
260 | msgid "All threads" |
|
260 | msgid "All threads" | |
261 | msgstr "Все темы" |
|
261 | msgstr "Все темы" | |
262 |
|
262 | |||
263 | #: templates/boards/base.html:37 |
|
263 | #: templates/boards/base.html:37 | |
264 | msgid "Add tags" |
|
264 | msgid "Add tags" | |
265 | msgstr "Добавить метки" |
|
265 | msgstr "Добавить метки" | |
266 |
|
266 | |||
267 | #: templates/boards/base.html:39 |
|
267 | #: templates/boards/base.html:39 | |
268 | msgid "Tag management" |
|
268 | msgid "Tag management" | |
269 | msgstr "Управление метками" |
|
269 | msgstr "Управление метками" | |
270 |
|
270 | |||
271 | #: templates/boards/base.html:39 |
|
271 | #: templates/boards/base.html:39 | |
272 | msgid "tags" |
|
272 | msgid "tags" | |
273 | msgstr "метки" |
|
273 | msgstr "метки" | |
274 |
|
274 | |||
275 | #: templates/boards/base.html:40 |
|
275 | #: templates/boards/base.html:40 | |
276 | msgid "search" |
|
276 | msgid "search" | |
277 | msgstr "поиск" |
|
277 | msgstr "поиск" | |
278 |
|
278 | |||
279 | #: templates/boards/base.html:41 templates/boards/feed.html:11 |
|
279 | #: templates/boards/base.html:41 templates/boards/feed.html:11 | |
280 | msgid "feed" |
|
280 | msgid "feed" | |
281 | msgstr "лента" |
|
281 | msgstr "лента" | |
282 |
|
282 | |||
283 | #: templates/boards/base.html:42 templates/boards/random.html:6 |
|
283 | #: templates/boards/base.html:42 templates/boards/random.html:6 | |
284 | msgid "Random images" |
|
284 | msgid "Random images" | |
285 | msgstr "Случайные изображения" |
|
285 | msgstr "Случайные изображения" | |
286 |
|
286 | |||
287 | #: templates/boards/base.html:42 |
|
287 | #: templates/boards/base.html:42 | |
288 | msgid "random" |
|
288 | msgid "random" | |
289 | msgstr "случайные" |
|
289 | msgstr "случайные" | |
290 |
|
290 | |||
291 | #: templates/boards/base.html:44 |
|
291 | #: templates/boards/base.html:44 | |
292 | msgid "favorites" |
|
292 | msgid "favorites" | |
293 | msgstr "избранное" |
|
293 | msgstr "избранное" | |
294 |
|
294 | |||
295 | #: templates/boards/base.html:48 templates/boards/base.html.py:49 |
|
295 | #: templates/boards/base.html:48 templates/boards/base.html.py:49 | |
296 | #: templates/boards/notifications.html:8 |
|
296 | #: templates/boards/notifications.html:8 | |
297 | msgid "Notifications" |
|
297 | msgid "Notifications" | |
298 | msgstr "Уведомления" |
|
298 | msgstr "Уведомления" | |
299 |
|
299 | |||
300 | #: templates/boards/base.html:56 templates/boards/settings.html:8 |
|
300 | #: templates/boards/base.html:56 templates/boards/settings.html:8 | |
301 | msgid "Settings" |
|
301 | msgid "Settings" | |
302 | msgstr "Настройки" |
|
302 | msgstr "Настройки" | |
303 |
|
303 | |||
304 | #: templates/boards/base.html:59 |
|
304 | #: templates/boards/base.html:59 | |
305 | msgid "Loading..." |
|
305 | msgid "Loading..." | |
306 | msgstr "Загрузка..." |
|
306 | msgstr "Загрузка..." | |
307 |
|
307 | |||
308 | #: templates/boards/base.html:71 |
|
308 | #: templates/boards/base.html:71 | |
309 | msgid "Admin" |
|
309 | msgid "Admin" | |
310 | msgstr "Администрирование" |
|
310 | msgstr "Администрирование" | |
311 |
|
311 | |||
312 | #: templates/boards/base.html:73 |
|
312 | #: templates/boards/base.html:73 | |
313 | #, python-format |
|
313 | #, python-format | |
314 | msgid "Speed: %(ppd)s posts per day" |
|
314 | msgid "Speed: %(ppd)s posts per day" | |
315 | msgstr "Скорость: %(ppd)s сообщений в день" |
|
315 | msgstr "Скорость: %(ppd)s сообщений в день" | |
316 |
|
316 | |||
317 | #: templates/boards/base.html:75 |
|
317 | #: templates/boards/base.html:75 | |
318 | msgid "Up" |
|
318 | msgid "Up" | |
319 | msgstr "Вверх" |
|
319 | msgstr "Вверх" | |
320 |
|
320 | |||
321 | #: templates/boards/feed.html:45 |
|
321 | #: templates/boards/feed.html:45 | |
322 | msgid "No posts exist. Create the first one!" |
|
322 | msgid "No posts exist. Create the first one!" | |
323 | msgstr "Нет сообщений. Создайте первое!" |
|
323 | msgstr "Нет сообщений. Создайте первое!" | |
324 |
|
324 | |||
325 | #: templates/boards/post.html:33 |
|
325 | #: templates/boards/post.html:33 | |
326 | msgid "Open" |
|
326 | msgid "Open" | |
327 | msgstr "Открыть" |
|
327 | msgstr "Открыть" | |
328 |
|
328 | |||
329 | #: templates/boards/post.html:35 templates/boards/post.html.py:46 |
|
329 | #: templates/boards/post.html:35 templates/boards/post.html.py:46 | |
330 | msgid "Reply" |
|
330 | msgid "Reply" | |
331 | msgstr "Ответить" |
|
331 | msgstr "Ответить" | |
332 |
|
332 | |||
333 | #: templates/boards/post.html:41 |
|
333 | #: templates/boards/post.html:41 | |
334 | msgid " in " |
|
334 | msgid " in " | |
335 | msgstr " в " |
|
335 | msgstr " в " | |
336 |
|
336 | |||
337 | #: templates/boards/post.html:51 |
|
337 | #: templates/boards/post.html:51 | |
338 | msgid "Edit" |
|
338 | msgid "Edit" | |
339 | msgstr "Изменить" |
|
339 | msgstr "Изменить" | |
340 |
|
340 | |||
341 | #: templates/boards/post.html:53 |
|
341 | #: templates/boards/post.html:53 | |
342 | msgid "Edit thread" |
|
342 | msgid "Edit thread" | |
343 | msgstr "Изменить тему" |
|
343 | msgstr "Изменить тему" | |
344 |
|
344 | |||
345 | #: templates/boards/post.html:91 |
|
345 | #: templates/boards/post.html:91 | |
346 | msgid "Replies" |
|
346 | msgid "Replies" | |
347 | msgstr "Ответы" |
|
347 | msgstr "Ответы" | |
348 |
|
348 | |||
349 | #: templates/boards/post.html:103 |
|
349 | #: templates/boards/post.html:103 | |
350 | #, python-format |
|
350 | #, python-format | |
351 | msgid "%(count)s image" |
|
351 | msgid "%(count)s image" | |
352 | msgid_plural "%(count)s images" |
|
352 | msgid_plural "%(count)s images" | |
353 | msgstr[0] "%(count)s изображение" |
|
353 | msgstr[0] "%(count)s изображение" | |
354 | msgstr[1] "%(count)s изображения" |
|
354 | msgstr[1] "%(count)s изображения" | |
355 | msgstr[2] "%(count)s изображений" |
|
355 | msgstr[2] "%(count)s изображений" | |
356 |
|
356 | |||
357 | #: templates/boards/rss/post.html:5 |
|
357 | #: templates/boards/rss/post.html:5 | |
358 | msgid "Post image" |
|
358 | msgid "Post image" | |
359 | msgstr "Изображение сообщения" |
|
359 | msgstr "Изображение сообщения" | |
360 |
|
360 | |||
361 | #: templates/boards/settings.html:15 |
|
361 | #: templates/boards/settings.html:15 | |
362 | msgid "You are moderator." |
|
362 | msgid "You are moderator." | |
363 | msgstr "Вы модератор." |
|
363 | msgstr "Вы модератор." | |
364 |
|
364 | |||
365 | #: templates/boards/settings.html:19 |
|
365 | #: templates/boards/settings.html:19 | |
366 | msgid "Hidden tags:" |
|
366 | msgid "Hidden tags:" | |
367 | msgstr "Скрытые метки:" |
|
367 | msgstr "Скрытые метки:" | |
368 |
|
368 | |||
369 | #: templates/boards/settings.html:25 |
|
369 | #: templates/boards/settings.html:25 | |
370 | msgid "No hidden tags." |
|
370 | msgid "No hidden tags." | |
371 | msgstr "Нет скрытых меток." |
|
371 | msgstr "Нет скрытых меток." | |
372 |
|
372 | |||
373 | #: templates/boards/settings.html:34 |
|
373 | #: templates/boards/settings.html:34 | |
374 | msgid "Save" |
|
374 | msgid "Save" | |
375 | msgstr "Сохранить" |
|
375 | msgstr "Сохранить" | |
376 |
|
376 | |||
377 | #: templates/boards/staticpages/banned.html:6 |
|
377 | #: templates/boards/staticpages/banned.html:6 | |
378 | msgid "Banned" |
|
378 | msgid "Banned" | |
379 | msgstr "Заблокирован" |
|
379 | msgstr "Заблокирован" | |
380 |
|
380 | |||
381 | #: templates/boards/staticpages/banned.html:11 |
|
381 | #: templates/boards/staticpages/banned.html:11 | |
382 | msgid "Your IP address has been banned. Contact the administrator" |
|
382 | msgid "Your IP address has been banned. Contact the administrator" | |
383 | msgstr "Ваш IP адрес был заблокирован. Свяжитесь с администратором" |
|
383 | msgstr "Ваш IP адрес был заблокирован. Свяжитесь с администратором" | |
384 |
|
384 | |||
385 | #: templates/boards/staticpages/help.html:6 |
|
385 | #: templates/boards/staticpages/help.html:6 | |
386 | #: templates/boards/staticpages/help.html:10 |
|
386 | #: templates/boards/staticpages/help.html:10 | |
387 | msgid "Syntax" |
|
387 | msgid "Syntax" | |
388 | msgstr "Синтаксис" |
|
388 | msgstr "Синтаксис" | |
389 |
|
389 | |||
390 | #: templates/boards/staticpages/help.html:11 |
|
390 | #: templates/boards/staticpages/help.html:11 | |
391 | msgid "Italic text" |
|
391 | msgid "Italic text" | |
392 | msgstr "Курсивный текст" |
|
392 | msgstr "Курсивный текст" | |
393 |
|
393 | |||
394 | #: templates/boards/staticpages/help.html:12 |
|
394 | #: templates/boards/staticpages/help.html:12 | |
395 | msgid "Bold text" |
|
395 | msgid "Bold text" | |
396 | msgstr "Полужирный текст" |
|
396 | msgstr "Полужирный текст" | |
397 |
|
397 | |||
398 | #: templates/boards/staticpages/help.html:13 |
|
398 | #: templates/boards/staticpages/help.html:13 | |
399 | msgid "Spoiler" |
|
399 | msgid "Spoiler" | |
400 | msgstr "Спойлер" |
|
400 | msgstr "Спойлер" | |
401 |
|
401 | |||
402 | #: templates/boards/staticpages/help.html:14 |
|
402 | #: templates/boards/staticpages/help.html:14 | |
403 | msgid "Link to a post" |
|
403 | msgid "Link to a post" | |
404 | msgstr "Ссылка на сообщение" |
|
404 | msgstr "Ссылка на сообщение" | |
405 |
|
405 | |||
406 | #: templates/boards/staticpages/help.html:15 |
|
406 | #: templates/boards/staticpages/help.html:15 | |
407 | msgid "Strikethrough text" |
|
407 | msgid "Strikethrough text" | |
408 | msgstr "Зачеркнутый текст" |
|
408 | msgstr "Зачеркнутый текст" | |
409 |
|
409 | |||
410 | #: templates/boards/staticpages/help.html:16 |
|
410 | #: templates/boards/staticpages/help.html:16 | |
411 | msgid "Comment" |
|
411 | msgid "Comment" | |
412 | msgstr "Комментарий" |
|
412 | msgstr "Комментарий" | |
413 |
|
413 | |||
414 | #: templates/boards/staticpages/help.html:17 |
|
414 | #: templates/boards/staticpages/help.html:17 | |
415 | #: templates/boards/staticpages/help.html:18 |
|
415 | #: templates/boards/staticpages/help.html:18 | |
416 | msgid "Quote" |
|
416 | msgid "Quote" | |
417 | msgstr "Цитата" |
|
417 | msgstr "Цитата" | |
418 |
|
418 | |||
419 | #: templates/boards/staticpages/help.html:21 |
|
419 | #: templates/boards/staticpages/help.html:21 | |
420 | msgid "You can try pasting the text and previewing the result here:" |
|
420 | msgid "You can try pasting the text and previewing the result here:" | |
421 | msgstr "Вы можете попробовать вставить текст и проверить результат здесь:" |
|
421 | msgstr "Вы можете попробовать вставить текст и проверить результат здесь:" | |
422 |
|
422 | |||
423 | #: templates/boards/tags.html:17 |
|
423 | #: templates/boards/tags.html:17 | |
424 | msgid "Sections:" |
|
424 | msgid "Sections:" | |
425 | msgstr "Разделы:" |
|
425 | msgstr "Разделы:" | |
426 |
|
426 | |||
427 | #: templates/boards/tags.html:30 |
|
427 | #: templates/boards/tags.html:30 | |
428 | msgid "Other tags:" |
|
428 | msgid "Other tags:" | |
429 | msgstr "Другие метки:" |
|
429 | msgstr "Другие метки:" | |
430 |
|
430 | |||
431 | #: templates/boards/tags.html:43 |
|
431 | #: templates/boards/tags.html:43 | |
432 | msgid "All tags..." |
|
432 | msgid "All tags..." | |
433 | msgstr "Все метки..." |
|
433 | msgstr "Все метки..." | |
434 |
|
434 | |||
435 | #: templates/boards/thread.html:14 |
|
435 | #: templates/boards/thread.html:14 | |
436 | msgid "Normal" |
|
436 | msgid "Normal" | |
437 | msgstr "Нормальный" |
|
437 | msgstr "Нормальный" | |
438 |
|
438 | |||
439 | #: templates/boards/thread.html:15 |
|
439 | #: templates/boards/thread.html:15 | |
440 | msgid "Gallery" |
|
440 | msgid "Gallery" | |
441 | msgstr "Галерея" |
|
441 | msgstr "Галерея" | |
442 |
|
442 | |||
443 | #: templates/boards/thread.html:16 |
|
443 | #: templates/boards/thread.html:16 | |
444 | msgid "Tree" |
|
444 | msgid "Tree" | |
445 | msgstr "Дерево" |
|
445 | msgstr "Дерево" | |
446 |
|
446 | |||
447 | #: templates/boards/thread.html:35 |
|
447 | #: templates/boards/thread.html:35 | |
448 | msgid "message" |
|
448 | msgid "message" | |
449 | msgid_plural "messages" |
|
449 | msgid_plural "messages" | |
450 | msgstr[0] "сообщение" |
|
450 | msgstr[0] "сообщение" | |
451 | msgstr[1] "сообщения" |
|
451 | msgstr[1] "сообщения" | |
452 | msgstr[2] "сообщений" |
|
452 | msgstr[2] "сообщений" | |
453 |
|
453 | |||
454 | #: templates/boards/thread.html:38 |
|
454 | #: templates/boards/thread.html:38 | |
455 | msgid "image" |
|
455 | msgid "image" | |
456 | msgid_plural "images" |
|
456 | msgid_plural "images" | |
457 | msgstr[0] "изображение" |
|
457 | msgstr[0] "изображение" | |
458 | msgstr[1] "изображения" |
|
458 | msgstr[1] "изображения" | |
459 | msgstr[2] "изображений" |
|
459 | msgstr[2] "изображений" | |
460 |
|
460 | |||
461 | #: templates/boards/thread.html:40 |
|
461 | #: templates/boards/thread.html:40 | |
462 | msgid "Last update: " |
|
462 | msgid "Last update: " | |
463 | msgstr "Последнее обновление: " |
|
463 | msgstr "Последнее обновление: " | |
464 |
|
464 | |||
465 | #: templates/boards/thread_gallery.html:36 |
|
465 | #: templates/boards/thread_gallery.html:36 | |
466 | msgid "No images." |
|
466 | msgid "No images." | |
467 | msgstr "Нет изображений." |
|
467 | msgstr "Нет изображений." | |
468 |
|
468 | |||
469 | #: templates/boards/thread_normal.html:30 |
|
469 | #: templates/boards/thread_normal.html:30 | |
470 | msgid "posts to bumplimit" |
|
470 | msgid "posts to bumplimit" | |
471 | msgstr "сообщений до бамплимита" |
|
471 | msgstr "сообщений до бамплимита" | |
472 |
|
472 | |||
473 | #: templates/boards/thread_normal.html:44 |
|
473 | #: templates/boards/thread_normal.html:44 | |
474 | msgid "Reply to thread" |
|
474 | msgid "Reply to thread" | |
475 | msgstr "Ответить в тему" |
|
475 | msgstr "Ответить в тему" | |
476 |
|
476 | |||
477 | #: templates/boards/thread_normal.html:44 |
|
477 | #: templates/boards/thread_normal.html:44 | |
478 | msgid "to message " |
|
478 | msgid "to message " | |
479 | msgstr "на сообщение" |
|
479 | msgstr "на сообщение" | |
480 |
|
480 | |||
481 | #: templates/boards/thread_normal.html:59 |
|
481 | #: templates/boards/thread_normal.html:59 | |
482 | msgid "Close form" |
|
482 | msgid "Close form" | |
483 | msgstr "Закрыть форму" |
|
483 | msgstr "Закрыть форму" | |
484 |
|
484 | |||
485 | #: templates/search/search.html:17 |
|
485 | #: templates/search/search.html:17 | |
486 | msgid "Ok" |
|
486 | msgid "Ok" | |
487 | msgstr "Ок" |
|
487 | msgstr "Ок" | |
488 |
|
488 | |||
489 | #: utils.py:120 |
|
489 | #: utils.py:120 | |
490 | #, python-format |
|
490 | #, python-format | |
491 | msgid "File must be less than %s but is %s." |
|
491 | msgid "File must be less than %s but is %s." | |
492 | msgstr "Файл должен быть менее %s, но его размер %s." |
|
492 | msgstr "Файл должен быть менее %s, но его размер %s." | |
493 |
|
493 | |||
494 | msgid "Please wait %(delay)d second before sending message" |
|
494 | msgid "Please wait %(delay)d second before sending message" | |
495 | msgid_plural "Please wait %(delay)d seconds before sending message" |
|
495 | msgid_plural "Please wait %(delay)d seconds before sending message" | |
496 | msgstr[0] "Пожалуйста подождите %(delay)d секунду перед отправкой сообщения" |
|
496 | msgstr[0] "Пожалуйста подождите %(delay)d секунду перед отправкой сообщения" | |
497 | msgstr[1] "Пожалуйста подождите %(delay)d секунды перед отправкой сообщения" |
|
497 | msgstr[1] "Пожалуйста подождите %(delay)d секунды перед отправкой сообщения" | |
498 | msgstr[2] "Пожалуйста подождите %(delay)d секунд перед отправкой сообщения" |
|
498 | msgstr[2] "Пожалуйста подождите %(delay)d секунд перед отправкой сообщения" | |
499 |
|
499 | |||
500 | msgid "New threads" |
|
500 | msgid "New threads" | |
501 | msgstr "Новые темы" |
|
501 | msgstr "Новые темы" | |
502 |
|
502 | |||
503 | #, python-format |
|
503 | #, python-format | |
504 | msgid "Max file size is %(size)s." |
|
504 | msgid "Max file size is %(size)s." | |
505 | msgstr "Максимальный размер файла %(size)s." |
|
505 | msgstr "Максимальный размер файла %(size)s." | |
506 |
|
506 | |||
507 | msgid "Size of media:" |
|
507 | msgid "Size of media:" | |
508 | msgstr "Размер медиа:" |
|
508 | msgstr "Размер медиа:" | |
509 |
|
509 | |||
510 | msgid "Statistics" |
|
510 | msgid "Statistics" | |
511 | msgstr "Статистика" |
|
511 | msgstr "Статистика" | |
512 |
|
512 | |||
513 | msgid "Invalid PoW." |
|
513 | msgid "Invalid PoW." | |
514 | msgstr "Неверный PoW." |
|
514 | msgstr "Неверный PoW." | |
515 |
|
515 | |||
516 | msgid "Stale PoW." |
|
516 | msgid "Stale PoW." | |
517 | msgstr "PoW устарел." |
|
517 | msgstr "PoW устарел." | |
518 |
|
518 | |||
519 | msgid "Show" |
|
519 | msgid "Show" | |
520 | msgstr "Показывать" |
|
520 | msgstr "Показывать" | |
521 |
|
521 | |||
522 | msgid "Hide" |
|
522 | msgid "Hide" | |
523 | msgstr "Скрывать" |
|
523 | msgstr "Скрывать" | |
524 |
|
524 | |||
525 | msgid "Add to favorites" |
|
525 | msgid "Add to favorites" | |
526 | msgstr "Добавить в избранное" |
|
526 | msgstr "Добавить в избранное" | |
527 |
|
527 | |||
528 | msgid "Remove from favorites" |
|
528 | msgid "Remove from favorites" | |
529 | msgstr "Убрать из избранного" |
|
529 | msgstr "Убрать из избранного" | |
530 |
|
530 | |||
531 | msgid "Monochrome" |
|
531 | msgid "Monochrome" | |
532 | msgstr "Монохромный" |
|
532 | msgstr "Монохромный" | |
533 |
|
533 | |||
534 | msgid "Subsections: " |
|
534 | msgid "Subsections: " | |
535 | msgstr "Подразделы: " |
|
535 | msgstr "Подразделы: " | |
536 |
|
536 | |||
537 | msgid "Change file source" |
|
537 | msgid "Change file source" | |
538 | msgstr "Изменить источник файла" |
|
538 | msgstr "Изменить источник файла" | |
539 |
|
539 | |||
540 | msgid "interesting" |
|
540 | msgid "interesting" | |
541 | msgstr "интересное" |
|
541 | msgstr "интересное" | |
542 |
|
542 | |||
543 | msgid "images" |
|
543 | msgid "images" | |
544 | msgstr "изображения" |
|
544 | msgstr "изображения" | |
545 |
|
545 | |||
546 | msgid "Delete post" |
|
546 | msgid "Delete post" | |
547 | msgstr "Удалить пост" |
|
547 | msgstr "Удалить пост" | |
548 |
|
548 | |||
549 | msgid "Delete thread" |
|
549 | msgid "Delete thread" | |
550 | msgstr "Удалить тему" |
|
550 | msgstr "Удалить тему" | |
|
551 | ||||
|
552 | msgid "Messages per day/week/month:" | |||
|
553 | msgstr "Сообщений за день/неделю/месяц:" |
@@ -1,179 +1,193 b'' | |||||
1 | import logging |
|
1 | import logging | |
2 |
|
2 | |||
3 | from datetime import datetime, timedelta, date |
|
3 | from datetime import datetime, timedelta, date | |
4 | from datetime import time as dtime |
|
4 | from datetime import time as dtime | |
5 |
|
5 | |||
6 | from boards.abstracts.exceptions import BannedException, ArchiveException |
|
6 | from boards.abstracts.exceptions import BannedException, ArchiveException | |
7 | from django.db import models, transaction |
|
7 | from django.db import models, transaction | |
8 | from django.utils import timezone |
|
8 | from django.utils import timezone | |
9 | from django.dispatch import Signal |
|
9 | from django.dispatch import Signal | |
10 |
|
10 | |||
11 | import boards |
|
11 | import boards | |
12 |
|
12 | |||
13 | from boards.models.user import Ban |
|
13 | from boards.models.user import Ban | |
14 | from boards.mdx_neboard import Parser |
|
14 | from boards.mdx_neboard import Parser | |
15 | from boards.models import Attachment |
|
15 | from boards.models import Attachment | |
16 | from boards import utils |
|
16 | from boards import utils | |
17 |
|
17 | |||
18 | __author__ = 'neko259' |
|
18 | __author__ = 'neko259' | |
19 |
|
19 | |||
20 | POSTS_PER_DAY_RANGE = 7 |
|
20 | POSTS_PER_DAY_RANGE = 7 | |
21 | NO_IP = '0.0.0.0' |
|
21 | NO_IP = '0.0.0.0' | |
22 |
|
22 | |||
23 |
|
23 | |||
24 | post_import_deps = Signal() |
|
24 | post_import_deps = Signal() | |
25 |
|
25 | |||
26 |
|
26 | |||
27 | class PostManager(models.Manager): |
|
27 | class PostManager(models.Manager): | |
28 | @transaction.atomic |
|
28 | @transaction.atomic | |
29 | def create_post(self, title: str, text: str, file=None, thread=None, |
|
29 | def create_post(self, title: str, text: str, file=None, thread=None, | |
30 | ip=NO_IP, tags: list=None, opening_posts: list=None, |
|
30 | ip=NO_IP, tags: list=None, opening_posts: list=None, | |
31 | tripcode='', monochrome=False, images=[]): |
|
31 | tripcode='', monochrome=False, images=[]): | |
32 | """ |
|
32 | """ | |
33 | Creates new post |
|
33 | Creates new post | |
34 | """ |
|
34 | """ | |
35 |
|
35 | |||
36 | if thread is not None and thread.is_archived(): |
|
36 | if thread is not None and thread.is_archived(): | |
37 | raise ArchiveException('Cannot post into an archived thread') |
|
37 | raise ArchiveException('Cannot post into an archived thread') | |
38 |
|
38 | |||
39 | if not utils.is_anonymous_mode(): |
|
39 | if not utils.is_anonymous_mode(): | |
40 | is_banned = Ban.objects.filter(ip=ip).exists() |
|
40 | is_banned = Ban.objects.filter(ip=ip).exists() | |
41 | else: |
|
41 | else: | |
42 | is_banned = False |
|
42 | is_banned = False | |
43 |
|
43 | |||
44 | if is_banned: |
|
44 | if is_banned: | |
45 | raise BannedException("This user is banned") |
|
45 | raise BannedException("This user is banned") | |
46 |
|
46 | |||
47 | if not tags: |
|
47 | if not tags: | |
48 | tags = [] |
|
48 | tags = [] | |
49 | if not opening_posts: |
|
49 | if not opening_posts: | |
50 | opening_posts = [] |
|
50 | opening_posts = [] | |
51 |
|
51 | |||
52 | posting_time = timezone.now() |
|
52 | posting_time = timezone.now() | |
53 | new_thread = False |
|
53 | new_thread = False | |
54 | if not thread: |
|
54 | if not thread: | |
55 | thread = boards.models.thread.Thread.objects.create( |
|
55 | thread = boards.models.thread.Thread.objects.create( | |
56 | bump_time=posting_time, last_edit_time=posting_time, |
|
56 | bump_time=posting_time, last_edit_time=posting_time, | |
57 | monochrome=monochrome) |
|
57 | monochrome=monochrome) | |
58 | list(map(thread.tags.add, tags)) |
|
58 | list(map(thread.tags.add, tags)) | |
59 | new_thread = True |
|
59 | new_thread = True | |
60 |
|
60 | |||
61 | pre_text = Parser().preparse(text) |
|
61 | pre_text = Parser().preparse(text) | |
62 |
|
62 | |||
63 | post = self.create(title=title, |
|
63 | post = self.create(title=title, | |
64 | text=pre_text, |
|
64 | text=pre_text, | |
65 | pub_time=posting_time, |
|
65 | pub_time=posting_time, | |
66 | poster_ip=ip, |
|
66 | poster_ip=ip, | |
67 | thread=thread, |
|
67 | thread=thread, | |
68 | last_edit_time=posting_time, |
|
68 | last_edit_time=posting_time, | |
69 | tripcode=tripcode, |
|
69 | tripcode=tripcode, | |
70 | opening=new_thread) |
|
70 | opening=new_thread) | |
71 | post.threads.add(thread) |
|
71 | post.threads.add(thread) | |
72 |
|
72 | |||
73 | logger = logging.getLogger('boards.post.create') |
|
73 | logger = logging.getLogger('boards.post.create') | |
74 |
|
74 | |||
75 | logger.info('Created post [{}] with text [{}] by {}'.format(post, |
|
75 | logger.info('Created post [{}] with text [{}] by {}'.format(post, | |
76 | post.get_text(),post.poster_ip)) |
|
76 | post.get_text(),post.poster_ip)) | |
77 |
|
77 | |||
78 | if file: |
|
78 | if file: | |
79 | self._add_file_to_post(file, post) |
|
79 | self._add_file_to_post(file, post) | |
80 | for image in images: |
|
80 | for image in images: | |
81 | post.attachments.add(image) |
|
81 | post.attachments.add(image) | |
82 |
|
82 | |||
83 | post.connect_threads(opening_posts) |
|
83 | post.connect_threads(opening_posts) | |
84 | post.set_global_id() |
|
84 | post.set_global_id() | |
85 |
|
85 | |||
86 | # Thread needs to be bumped only when the post is already created |
|
86 | # Thread needs to be bumped only when the post is already created | |
87 | if not new_thread: |
|
87 | if not new_thread: | |
88 | thread.last_edit_time = posting_time |
|
88 | thread.last_edit_time = posting_time | |
89 | thread.bump() |
|
89 | thread.bump() | |
90 | thread.save() |
|
90 | thread.save() | |
91 |
|
91 | |||
92 | return post |
|
92 | return post | |
93 |
|
93 | |||
94 | def delete_posts_by_ip(self, ip): |
|
94 | def delete_posts_by_ip(self, ip): | |
95 | """ |
|
95 | """ | |
96 | Deletes all posts of the author with same IP |
|
96 | Deletes all posts of the author with same IP | |
97 | """ |
|
97 | """ | |
98 |
|
98 | |||
99 | posts = self.filter(poster_ip=ip) |
|
99 | posts = self.filter(poster_ip=ip) | |
100 | for post in posts: |
|
100 | for post in posts: | |
101 | post.delete() |
|
101 | post.delete() | |
102 |
|
102 | |||
103 | @utils.cached_result() |
|
103 | @utils.cached_result() | |
104 | def get_posts_per_day(self) -> float: |
|
104 | def get_posts_per_day(self) -> float: | |
105 | """ |
|
105 | """ | |
106 | Gets average count of posts per day for the last 7 days |
|
106 | Gets average count of posts per day for the last 7 days | |
107 | """ |
|
107 | """ | |
108 |
|
108 | |||
109 | day_end = date.today() |
|
109 | day_end = date.today() | |
110 | day_start = day_end - timedelta(POSTS_PER_DAY_RANGE) |
|
110 | day_start = day_end - timedelta(POSTS_PER_DAY_RANGE) | |
111 |
|
111 | |||
112 | day_time_start = timezone.make_aware(datetime.combine( |
|
112 | day_time_start = timezone.make_aware(datetime.combine( | |
113 | day_start, dtime()), timezone.get_current_timezone()) |
|
113 | day_start, dtime()), timezone.get_current_timezone()) | |
114 | day_time_end = timezone.make_aware(datetime.combine( |
|
114 | day_time_end = timezone.make_aware(datetime.combine( | |
115 | day_end, dtime()), timezone.get_current_timezone()) |
|
115 | day_end, dtime()), timezone.get_current_timezone()) | |
116 |
|
116 | |||
117 | posts_per_period = float(self.filter( |
|
117 | posts_per_period = float(self.filter( | |
118 | pub_time__lte=day_time_end, |
|
118 | pub_time__lte=day_time_end, | |
119 | pub_time__gte=day_time_start).count()) |
|
119 | pub_time__gte=day_time_start).count()) | |
120 |
|
120 | |||
121 | ppd = posts_per_period / POSTS_PER_DAY_RANGE |
|
121 | ppd = posts_per_period / POSTS_PER_DAY_RANGE | |
122 |
|
122 | |||
123 | return ppd |
|
123 | return ppd | |
124 |
|
124 | |||
|
125 | def get_post_per_days(self, days) -> int: | |||
|
126 | day_end = date.today() + timedelta(1) | |||
|
127 | day_start = day_end - timedelta(days) | |||
|
128 | ||||
|
129 | day_time_start = timezone.make_aware(datetime.combine( | |||
|
130 | day_start, dtime()), timezone.get_current_timezone()) | |||
|
131 | day_time_end = timezone.make_aware(datetime.combine( | |||
|
132 | day_end, dtime()), timezone.get_current_timezone()) | |||
|
133 | ||||
|
134 | return self.filter( | |||
|
135 | pub_time__lte=day_time_end, | |||
|
136 | pub_time__gte=day_time_start).count() | |||
|
137 | ||||
|
138 | ||||
125 | @transaction.atomic |
|
139 | @transaction.atomic | |
126 | def import_post(self, title: str, text: str, pub_time: str, global_id, |
|
140 | def import_post(self, title: str, text: str, pub_time: str, global_id, | |
127 | opening_post=None, tags=list(), files=list(), |
|
141 | opening_post=None, tags=list(), files=list(), | |
128 | tripcode=None, version=1): |
|
142 | tripcode=None, version=1): | |
129 | is_opening = opening_post is None |
|
143 | is_opening = opening_post is None | |
130 | if is_opening: |
|
144 | if is_opening: | |
131 | thread = boards.models.thread.Thread.objects.create( |
|
145 | thread = boards.models.thread.Thread.objects.create( | |
132 | bump_time=pub_time, last_edit_time=pub_time) |
|
146 | bump_time=pub_time, last_edit_time=pub_time) | |
133 | list(map(thread.tags.add, tags)) |
|
147 | list(map(thread.tags.add, tags)) | |
134 | else: |
|
148 | else: | |
135 | thread = opening_post.get_thread() |
|
149 | thread = opening_post.get_thread() | |
136 |
|
150 | |||
137 | post = self.create(title=title, |
|
151 | post = self.create(title=title, | |
138 | text=text, |
|
152 | text=text, | |
139 | pub_time=pub_time, |
|
153 | pub_time=pub_time, | |
140 | poster_ip=NO_IP, |
|
154 | poster_ip=NO_IP, | |
141 | last_edit_time=pub_time, |
|
155 | last_edit_time=pub_time, | |
142 | global_id=global_id, |
|
156 | global_id=global_id, | |
143 | opening=is_opening, |
|
157 | opening=is_opening, | |
144 | thread=thread, |
|
158 | thread=thread, | |
145 | tripcode=tripcode, |
|
159 | tripcode=tripcode, | |
146 | version=version) |
|
160 | version=version) | |
147 |
|
161 | |||
148 | for file in files: |
|
162 | for file in files: | |
149 | self._add_file_to_post(file, post) |
|
163 | self._add_file_to_post(file, post) | |
150 |
|
164 | |||
151 | post.threads.add(thread) |
|
165 | post.threads.add(thread) | |
152 |
|
166 | |||
153 | url_to_post = '[post]{}[/post]'.format(str(global_id)) |
|
167 | url_to_post = '[post]{}[/post]'.format(str(global_id)) | |
154 | replies = self.filter(text__contains=url_to_post) |
|
168 | replies = self.filter(text__contains=url_to_post) | |
155 | for reply in replies: |
|
169 | for reply in replies: | |
156 | post_import_deps.send(reply) |
|
170 | post_import_deps.send(reply) | |
157 |
|
171 | |||
158 | @transaction.atomic |
|
172 | @transaction.atomic | |
159 | def update_post(self, post, title: str, text: str, pub_time: str, |
|
173 | def update_post(self, post, title: str, text: str, pub_time: str, | |
160 | tags=list(), files=list(), tripcode=None, version=1): |
|
174 | tags=list(), files=list(), tripcode=None, version=1): | |
161 | post.title = title |
|
175 | post.title = title | |
162 | post.text = text |
|
176 | post.text = text | |
163 | post.pub_time = pub_time |
|
177 | post.pub_time = pub_time | |
164 | post.tripcode = tripcode |
|
178 | post.tripcode = tripcode | |
165 | post.version = version |
|
179 | post.version = version | |
166 | post.save() |
|
180 | post.save() | |
167 |
|
181 | |||
168 | post.clear_cache() |
|
182 | post.clear_cache() | |
169 |
|
183 | |||
170 | post.attachments.clear() |
|
184 | post.attachments.clear() | |
171 | for file in files: |
|
185 | for file in files: | |
172 | self._add_file_to_post(file, post) |
|
186 | self._add_file_to_post(file, post) | |
173 |
|
187 | |||
174 | thread = post.get_thread() |
|
188 | thread = post.get_thread() | |
175 | thread.tags.clear() |
|
189 | thread.tags.clear() | |
176 | list(map(thread.tags.add, tags)) |
|
190 | list(map(thread.tags.add, tags)) | |
177 |
|
191 | |||
178 | def _add_file_to_post(self, file, post): |
|
192 | def _add_file_to_post(self, file, post): | |
179 | post.attachments.add(Attachment.objects.create_with_hash(file)) |
|
193 | post.attachments.add(Attachment.objects.create_with_hash(file)) |
@@ -1,34 +1,35 b'' | |||||
1 | {% extends "boards/base.html" %} |
|
1 | {% extends "boards/base.html" %} | |
2 |
|
2 | |||
3 | {% load i18n %} |
|
3 | {% load i18n %} | |
4 |
|
4 | |||
5 | {% block head %} |
|
5 | {% block head %} | |
6 | <title>{% trans "Authors" %}</title> |
|
6 | <title>{% trans "Authors" %}</title> | |
7 | {% endblock %} |
|
7 | {% endblock %} | |
8 |
|
8 | |||
9 | {% block content %} |
|
9 | {% block content %} | |
10 | <div class="post"> |
|
10 | <div class="post"> | |
11 | <p><img src="{{ STATIC_URL }}favicon.png" width="200" /></p> |
|
11 | <p><img src="{{ STATIC_URL }}favicon.png" width="200" /></p> | |
12 | <h2>{% trans 'Statistics' %}</h2> |
|
12 | <h2>{% trans 'Statistics' %}</h2> | |
13 | <p>{% trans 'Size of media:' %} {{ media_size|filesizeformat }}. |
|
13 | <p>{% trans 'Size of media:' %} {{ media_size|filesizeformat }}. | |
14 | <p>{% blocktrans count count=post_count %}{{ count }} message{% plural %}messages{% endblocktrans %}.</p> |
|
14 | <p>{% blocktrans count count=post_count %}{{ count }} message{% plural %}messages{% endblocktrans %}.</p> | |
|
15 | <p>{% trans 'Messages per day/week/month:' %} {{ post_per_day }}/{{ post_per_week }}/{{ post_per_month }}</p> | |||
15 | <h2>{% trans 'Authors' %}</h2> |
|
16 | <h2>{% trans 'Authors' %}</h2> | |
16 | {% for nick, values in authors.items %} |
|
17 | {% for nick, values in authors.items %} | |
17 | <p> |
|
18 | <p> | |
18 | <b>{{ nick }}</b> ({{ values.name }}): |
|
19 | <b>{{ nick }}</b> ({{ values.name }}): | |
19 | {% for value in values.contacts %} |
|
20 | {% for value in values.contacts %} | |
20 | <a href="mailto:{{ value }}">{{ value }}</a> |
|
21 | <a href="mailto:{{ value }}">{{ value }}</a> | |
21 | {% endfor %} - |
|
22 | {% endfor %} - | |
22 | {{ values.roles|join:', ' }} |
|
23 | {{ values.roles|join:', ' }} | |
23 | </p> |
|
24 | </p> | |
24 | {% endfor %} |
|
25 | {% endfor %} | |
25 | <br /> |
|
26 | <br /> | |
26 | <p>{% trans "Distributed under the" %} |
|
27 | <p>{% trans "Distributed under the" %} | |
27 | <a href="http://www.gnu.org/licenses/gpl.html" >GNU GPLv3</a> |
|
28 | <a href="http://www.gnu.org/licenses/gpl.html" >GNU GPLv3</a> | |
28 | {% trans "license" %}</p> |
|
29 | {% trans "license" %}</p> | |
29 | <p><a href="https://bitbucket.org/neko259/neboard"> |
|
30 | <p><a href="https://bitbucket.org/neko259/neboard"> | |
30 | {% trans "Repository" %}</a></p> |
|
31 | {% trans "Repository" %}</a></p> | |
31 |
|
32 | |||
32 | <p>Bitcoin: <b>1A4dePg6CGfYcJ7SH1tbaVdjjj1VLv8X1H</b></p> |
|
33 | <p>Bitcoin: <b>1A4dePg6CGfYcJ7SH1tbaVdjjj1VLv8X1H</b></p> | |
33 | </div> |
|
34 | </div> | |
34 | {% endblock %} |
|
35 | {% endblock %} |
@@ -1,34 +1,41 b'' | |||||
1 | import os |
|
1 | import os | |
2 |
|
2 | |||
3 | from django.shortcuts import render |
|
3 | from django.shortcuts import render | |
4 |
|
4 | |||
5 | import neboard |
|
5 | import neboard | |
6 | from boards.authors import authors |
|
6 | from boards.authors import authors | |
7 | from boards.utils import cached_result |
|
7 | from boards.utils import cached_result | |
8 | from boards.views.base import BaseBoardView |
|
8 | from boards.views.base import BaseBoardView | |
9 | from boards.models import Post |
|
9 | from boards.models import Post | |
10 |
|
10 | |||
11 |
|
11 | |||
12 | PARAM_AUTHORS = 'authors' |
|
12 | PARAM_AUTHORS = 'authors' | |
13 | PARAM_MEDIA_SIZE = 'media_size' |
|
13 | PARAM_MEDIA_SIZE = 'media_size' | |
14 | PARAM_POST_COUNT = 'post_count' |
|
14 | PARAM_POST_COUNT = 'post_count' | |
|
15 | PARAM_POST_PER_DAY = 'post_per_day' | |||
|
16 | PARAM_POST_PER_WEEK = 'post_per_week' | |||
|
17 | PARAM_POST_PER_MONTH = 'post_per_month' | |||
15 |
|
18 | |||
16 |
|
19 | |||
17 | class AuthorsView(BaseBoardView): |
|
20 | class AuthorsView(BaseBoardView): | |
18 |
|
21 | |||
19 | def get(self, request): |
|
22 | def get(self, request): | |
20 | params = dict() |
|
23 | params = dict() | |
21 | params[PARAM_AUTHORS] = authors |
|
24 | params[PARAM_AUTHORS] = authors | |
22 | params[PARAM_MEDIA_SIZE] = self._get_directory_size(neboard.settings.MEDIA_ROOT) |
|
25 | params[PARAM_MEDIA_SIZE] = self._get_directory_size(neboard.settings.MEDIA_ROOT) | |
23 | params[PARAM_POST_COUNT] = Post.objects.count() |
|
26 | params[PARAM_POST_COUNT] = Post.objects.count() | |
24 |
|
27 | |||
|
28 | params[PARAM_POST_PER_DAY] = Post.objects.get_post_per_days(1) | |||
|
29 | params[PARAM_POST_PER_WEEK] = Post.objects.get_post_per_days(7) | |||
|
30 | params[PARAM_POST_PER_MONTH] = Post.objects.get_post_per_days(30) | |||
|
31 | ||||
25 | return render(request, 'boards/authors.html', params) |
|
32 | return render(request, 'boards/authors.html', params) | |
26 |
|
33 | |||
27 | @cached_result() |
|
34 | @cached_result() | |
28 | def _get_directory_size(self, directory): |
|
35 | def _get_directory_size(self, directory): | |
29 | total_size = 0 |
|
36 | total_size = 0 | |
30 | for dirpath, dirnames, filenames in os.walk(directory): |
|
37 | for dirpath, dirnames, filenames in os.walk(directory): | |
31 | for f in filenames: |
|
38 | for f in filenames: | |
32 | fp = os.path.join(dirpath, f) |
|
39 | fp = os.path.join(dirpath, f) | |
33 | total_size += os.path.getsize(fp) |
|
40 | total_size += os.path.getsize(fp) | |
34 | return total_size |
|
41 | return total_size |
General Comments 0
You need to be logged in to leave comments.
Login now