Show More
@@ -33,7 +33,7 b" ATTRIBUTE_ROWS = 'rows'" | |||||
33 | LAST_POST_TIME = 'last_post_time' |
|
33 | LAST_POST_TIME = 'last_post_time' | |
34 | LAST_LOGIN_TIME = 'last_login_time' |
|
34 | LAST_LOGIN_TIME = 'last_login_time' | |
35 | TEXT_PLACEHOLDER = _('Type message here. Use formatting panel for more advanced usage.') |
|
35 | TEXT_PLACEHOLDER = _('Type message here. Use formatting panel for more advanced usage.') | |
36 |
TAGS_PLACEHOLDER = _(' |
|
36 | TAGS_PLACEHOLDER = _('music images i_dont_like_tags') | |
37 |
|
37 | |||
38 | LABEL_TITLE = _('Title') |
|
38 | LABEL_TITLE = _('Title') | |
39 | LABEL_TEXT = _('Text') |
|
39 | LABEL_TEXT = _('Text') |
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: 2015-04- |
|
10 | "POT-Creation-Date: 2015-04-14 13:07+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" | |
@@ -44,8 +44,8 b' msgstr ""' | |||||
44 | "ΠΠ²ΠΎΠ΄ΠΈΡΠ΅ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΡΡΠ΄Π°. ΠΡΠΏΠΎΠ»ΡΠ·ΡΠΉΡΠ΅ ΠΏΠ°Π½Π΅Π»Ρ Π΄Π»Ρ Π±ΠΎΠ»Π΅Π΅ ΡΠ»ΠΎΠΆΠ½ΠΎΠ³ΠΎ ΡΠΎΡΠΌΠ°ΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ." |
|
44 | "ΠΠ²ΠΎΠ΄ΠΈΡΠ΅ ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠ΅ ΡΡΠ΄Π°. ΠΡΠΏΠΎΠ»ΡΠ·ΡΠΉΡΠ΅ ΠΏΠ°Π½Π΅Π»Ρ Π΄Π»Ρ Π±ΠΎΠ»Π΅Π΅ ΡΠ»ΠΎΠΆΠ½ΠΎΠ³ΠΎ ΡΠΎΡΠΌΠ°ΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ." | |
45 |
|
45 | |||
46 | #: forms.py:36 |
|
46 | #: forms.py:36 | |
47 | msgid "tag1 several_words_tag" |
|
47 | msgid "music images i_dont_like_tags" | |
48 | msgstr "ΠΌΠ΅ΡΠΊΠ°1 ΠΌΠ΅ΡΠΊΠ°_ΠΈΠ·_Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΈΡ _ΡΠ»ΠΎΠ²" |
|
48 | msgstr "ΠΌΡΠ·ΡΠΊΠ° ΠΊΠ°ΡΡΠΈΠ½ΠΊΠΈ ΡΠ΅Π³ΠΈ_Π½Π΅_Π½ΡΠΆΠ½Ρ" | |
49 |
|
49 | |||
50 | #: forms.py:38 |
|
50 | #: forms.py:38 | |
51 | msgid "Title" |
|
51 | msgid "Title" | |
@@ -59,7 +59,7 b' msgstr "\xd0\xa2\xd0\xb5\xd0\xba\xd1\x81\xd1\x82"' | |||||
59 | msgid "Tag" |
|
59 | msgid "Tag" | |
60 | msgstr "ΠΠ΅ΡΠΊΠ°" |
|
60 | msgstr "ΠΠ΅ΡΠΊΠ°" | |
61 |
|
61 | |||
62 |
#: forms.py:41 templates/boards/base.html: |
|
62 | #: forms.py:41 templates/boards/base.html:40 templates/search/search.html:7 | |
63 | msgid "Search" |
|
63 | msgid "Search" | |
64 | msgstr "ΠΠΎΠΈΡΠΊ" |
|
64 | msgstr "ΠΠΎΠΈΡΠΊ" | |
65 |
|
65 | |||
@@ -76,7 +76,6 b' msgid "e-mail"' | |||||
76 | msgstr "" |
|
76 | msgstr "" | |
77 |
|
77 | |||
78 | #: forms.py:152 |
|
78 | #: forms.py:152 | |
79 | #| msgid "All threads" |
|
|||
80 | msgid "Additional threads" |
|
79 | msgid "Additional threads" | |
81 | msgstr "ΠΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΡΠ΅ ΡΠ΅ΠΌΡ" |
|
80 | msgstr "ΠΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΡΠ΅ ΡΠ΅ΠΌΡ" | |
82 |
|
81 | |||
@@ -94,50 +93,50 b' msgstr "\xd0\xa2\xd0\xb5\xd0\xba\xd1\x81\xd1\x82 \xd0\xb4\xd0\xbe\xd0\xbb\xd0\xb6\xd0\xb5\xd0\xbd \xd0\xb1\xd1\x8b\xd1\x82\xd1\x8c \xd0\xba\xd0\xbe\xd1\x80\xd0\xbe\xd1\x87\xd0\xb5 %s \xd1\x81\xd0\xb8\xd0\xbc\xd0\xb2\xd0\xbe\xd0\xbb\xd0\xbe\xd0\xb2"' | |||||
94 | msgid "Invalid URL" |
|
93 | msgid "Invalid URL" | |
95 | msgstr "ΠΠ΅Π²Π΅ΡΠ½ΡΠΉ URL" |
|
94 | msgstr "ΠΠ΅Π²Π΅ΡΠ½ΡΠΉ URL" | |
96 |
|
95 | |||
97 |
#: forms.py:21 |
|
96 | #: forms.py:215 | |
98 | msgid "Invalid additional thread list" |
|
97 | msgid "Invalid additional thread list" | |
99 | msgstr "ΠΠ΅Π²Π΅ΡΠ½ΡΠΉ ΡΠΏΠΈΡΠΎΠΊ Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΡΡ ΡΠ΅ΠΌ" |
|
98 | msgstr "ΠΠ΅Π²Π΅ΡΠ½ΡΠΉ ΡΠΏΠΈΡΠΎΠΊ Π΄ΠΎΠΏΠΎΠ»Π½ΠΈΡΠ΅Π»ΡΠ½ΡΡ ΡΠ΅ΠΌ" | |
100 |
|
99 | |||
101 |
#: forms.py:2 |
|
100 | #: forms.py:250 | |
102 | msgid "Either text or image must be entered." |
|
101 | msgid "Either text or image must be entered." | |
103 | msgstr "Π’Π΅ΠΊΡΡ ΠΈΠ»ΠΈ ΠΊΠ°ΡΡΠΈΠ½ΠΊΠ° Π΄ΠΎΠ»ΠΆΠ½Ρ Π±ΡΡΡ Π²Π²Π΅Π΄Π΅Π½Ρ." |
|
102 | msgstr "Π’Π΅ΠΊΡΡ ΠΈΠ»ΠΈ ΠΊΠ°ΡΡΠΈΠ½ΠΊΠ° Π΄ΠΎΠ»ΠΆΠ½Ρ Π±ΡΡΡ Π²Π²Π΅Π΄Π΅Π½Ρ." | |
104 |
|
103 | |||
105 |
#: forms.py:26 |
|
104 | #: forms.py:266 | |
106 | #, python-format |
|
105 | #, python-format | |
107 | msgid "Wait %s seconds after last posting" |
|
106 | msgid "Wait %s seconds after last posting" | |
108 | msgstr "ΠΠΎΠ΄ΠΎΠΆΠ΄ΠΈΡΠ΅ %s ΡΠ΅ΠΊΡΠ½Π΄ ΠΏΠΎΡΠ»Π΅ ΠΏΠΎΡΠ»Π΅Π΄Π½Π΅Π³ΠΎ ΠΏΠΎΡΡΠΈΠ½Π³Π°" |
|
107 | msgstr "ΠΠΎΠ΄ΠΎΠΆΠ΄ΠΈΡΠ΅ %s ΡΠ΅ΠΊΡΠ½Π΄ ΠΏΠΎΡΠ»Π΅ ΠΏΠΎΡΠ»Π΅Π΄Π½Π΅Π³ΠΎ ΠΏΠΎΡΡΠΈΠ½Π³Π°" | |
109 |
|
108 | |||
110 |
#: forms.py:27 |
|
109 | #: forms.py:278 | |
111 | #, python-format |
|
110 | #, python-format | |
112 | msgid "Image must be less than %s bytes" |
|
111 | msgid "Image must be less than %s bytes" | |
113 | msgstr "ΠΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±ΡΡΡ ΠΌΠ΅Π½Π΅Π΅ %s Π±Π°ΠΉΡ" |
|
112 | msgstr "ΠΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠ΅ Π΄ΠΎΠ»ΠΆΠ½ΠΎ Π±ΡΡΡ ΠΌΠ΅Π½Π΅Π΅ %s Π±Π°ΠΉΡ" | |
114 |
|
113 | |||
115 |
#: forms.py:32 |
|
114 | #: forms.py:325 templates/boards/posting_general.html:148 | |
116 | #: templates/boards/rss/post.html:10 templates/boards/tags.html:7 |
|
115 | #: templates/boards/rss/post.html:10 templates/boards/tags.html:7 | |
117 | msgid "Tags" |
|
116 | msgid "Tags" | |
118 | msgstr "ΠΠ΅ΡΠΊΠΈ" |
|
117 | msgstr "ΠΠ΅ΡΠΊΠΈ" | |
119 |
|
118 | |||
120 |
#: forms.py:33 |
|
119 | #: forms.py:332 | |
121 | msgid "Inappropriate characters in tags." |
|
120 | msgid "Inappropriate characters in tags." | |
122 | msgstr "ΠΠ΅Π΄ΠΎΠΏΡΡΡΠΈΠΌΡΠ΅ ΡΠΈΠΌΠ²ΠΎΠ»Ρ Π² ΠΌΠ΅ΡΠΊΠ°Ρ ." |
|
121 | msgstr "ΠΠ΅Π΄ΠΎΠΏΡΡΡΠΈΠΌΡΠ΅ ΡΠΈΠΌΠ²ΠΎΠ»Ρ Π² ΠΌΠ΅ΡΠΊΠ°Ρ ." | |
123 |
|
122 | |||
124 |
#: forms.py:34 |
|
123 | #: forms.py:343 | |
125 | msgid "Need at least 1 required tag." |
|
124 | msgid "Need at least 1 required tag." | |
126 | msgstr "ΠΡΠΆΠ½Π° Ρ ΠΎΡΡ Π±Ρ 1 ΠΎΠ±ΡΠ·Π°ΡΠ΅Π»ΡΠ½Π°Ρ ΠΌΠ΅ΡΠΊΠ°." |
|
125 | msgstr "ΠΡΠΆΠ½Π° Ρ ΠΎΡΡ Π±Ρ 1 ΠΎΠ±ΡΠ·Π°ΡΠ΅Π»ΡΠ½Π°Ρ ΠΌΠ΅ΡΠΊΠ°." | |
127 |
|
126 | |||
128 |
#: forms.py:35 |
|
127 | #: forms.py:355 | |
129 | msgid "Theme" |
|
128 | msgid "Theme" | |
130 | msgstr "Π’Π΅ΠΌΠ°" |
|
129 | msgstr "Π’Π΅ΠΌΠ°" | |
131 |
|
130 | |||
132 |
#: forms.py:35 |
|
131 | #: forms.py:356 | |
133 | msgid "User name" |
|
132 | msgid "User name" | |
134 | msgstr "ΠΠΌΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ" |
|
133 | msgstr "ΠΠΌΡ ΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°ΡΠ΅Π»Ρ" | |
135 |
|
134 | |||
136 |
#: forms.py:35 |
|
135 | #: forms.py:357 | |
137 | msgid "Time zone" |
|
136 | msgid "Time zone" | |
138 | msgstr "Π§Π°ΡΠΎΠ²ΠΎΠΉ ΠΏΠΎΡΡ" |
|
137 | msgstr "Π§Π°ΡΠΎΠ²ΠΎΠΉ ΠΏΠΎΡΡ" | |
139 |
|
138 | |||
140 |
#: forms.py:36 |
|
139 | #: forms.py:363 | |
141 | msgid "Inappropriate characters." |
|
140 | msgid "Inappropriate characters." | |
142 | msgstr "ΠΠ΅Π΄ΠΎΠΏΡΡΡΠΈΠΌΡΠ΅ ΡΠΈΠΌΠ²ΠΎΠ»Ρ." |
|
141 | msgstr "ΠΠ΅Π΄ΠΎΠΏΡΡΡΠΈΠΌΡΠ΅ ΡΠΈΠΌΠ²ΠΎΠ»Ρ." | |
143 |
|
142 | |||
@@ -173,29 +172,33 b' msgstr "\xd0\x9b\xd0\xb5\xd0\xbd\xd1\x82\xd0\xb0"' | |||||
173 | msgid "All threads" |
|
172 | msgid "All threads" | |
174 | msgstr "ΠΡΠ΅ ΡΠ΅ΠΌΡ" |
|
173 | msgstr "ΠΡΠ΅ ΡΠ΅ΠΌΡ" | |
175 |
|
174 | |||
176 |
#: templates/boards/base.html:3 |
|
175 | #: templates/boards/base.html:36 | |
|
176 | msgid "Add tags" | |||
|
177 | msgstr "ΠΠΎΠ±Π°Π²ΠΈΡΡ ΠΌΠ΅ΡΠΊΠΈ" | |||
|
178 | ||||
|
179 | #: templates/boards/base.html:38 | |||
177 | msgid "Tag management" |
|
180 | msgid "Tag management" | |
178 | msgstr "Π£ΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΠΌΠ΅ΡΠΊΠ°ΠΌΠΈ" |
|
181 | msgstr "Π£ΠΏΡΠ°Π²Π»Π΅Π½ΠΈΠ΅ ΠΌΠ΅ΡΠΊΠ°ΠΌΠΈ" | |
179 |
|
182 | |||
180 |
#: templates/boards/base.html:3 |
|
183 | #: templates/boards/base.html:43 templates/boards/base.html.py:44 | |
181 | #: templates/boards/notifications.html:8 |
|
184 | #: templates/boards/notifications.html:8 | |
182 | msgid "Notifications" |
|
185 | msgid "Notifications" | |
183 | msgstr "Π£Π²Π΅Π΄ΠΎΠΌΠ»Π΅Π½ΠΈΡ" |
|
186 | msgstr "Π£Π²Π΅Π΄ΠΎΠΌΠ»Π΅Π½ΠΈΡ" | |
184 |
|
187 | |||
185 |
#: templates/boards/base.html: |
|
188 | #: templates/boards/base.html:51 templates/boards/settings.html:9 | |
186 | msgid "Settings" |
|
189 | msgid "Settings" | |
187 | msgstr "ΠΠ°ΡΡΡΠΎΠΉΠΊΠΈ" |
|
190 | msgstr "ΠΠ°ΡΡΡΠΎΠΉΠΊΠΈ" | |
188 |
|
191 | |||
189 |
#: templates/boards/base.html:6 |
|
192 | #: templates/boards/base.html:64 | |
190 | msgid "Admin" |
|
193 | msgid "Admin" | |
191 | msgstr "ΠΠ΄ΠΌΠΈΠ½ΠΈΡΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅" |
|
194 | msgstr "ΠΠ΄ΠΌΠΈΠ½ΠΈΡΡΡΠΈΡΠΎΠ²Π°Π½ΠΈΠ΅" | |
192 |
|
195 | |||
193 |
#: templates/boards/base.html:6 |
|
196 | #: templates/boards/base.html:66 | |
194 | #, python-format |
|
197 | #, python-format | |
195 | msgid "Speed: %(ppd)s posts per day" |
|
198 | msgid "Speed: %(ppd)s posts per day" | |
196 | msgstr "Π‘ΠΊΠΎΡΠΎΡΡΡ: %(ppd)s ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠΉ Π² Π΄Π΅Π½Ρ" |
|
199 | msgstr "Π‘ΠΊΠΎΡΠΎΡΡΡ: %(ppd)s ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠΉ Π² Π΄Π΅Π½Ρ" | |
197 |
|
200 | |||
198 |
#: templates/boards/base.html:6 |
|
201 | #: templates/boards/base.html:68 | |
199 | msgid "Up" |
|
202 | msgid "Up" | |
200 | msgstr "ΠΠ²Π΅ΡΡ " |
|
203 | msgstr "ΠΠ²Π΅ΡΡ " | |
201 |
|
204 | |||
@@ -229,11 +232,11 b' msgstr "\xd0\x98\xd0\xb7\xd0\xbc\xd0\xb5\xd0\xbd\xd0\xb8\xd1\x82\xd1\x8c \xd1\x82\xd0\xb5\xd0\xbc\xd1\x83"' | |||||
229 | msgid "Replies" |
|
232 | msgid "Replies" | |
230 | msgstr "ΠΡΠ²Π΅ΡΡ" |
|
233 | msgstr "ΠΡΠ²Π΅ΡΡ" | |
231 |
|
234 | |||
232 |
#: templates/boards/post.html:86 templates/boards/thread.html:3 |
|
235 | #: templates/boards/post.html:86 templates/boards/thread.html:31 | |
233 | msgid "messages" |
|
236 | msgid "messages" | |
234 | msgstr "ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠΉ" |
|
237 | msgstr "ΡΠΎΠΎΠ±ΡΠ΅Π½ΠΈΠΉ" | |
235 |
|
238 | |||
236 |
#: templates/boards/post.html:87 templates/boards/thread.html:3 |
|
239 | #: templates/boards/post.html:87 templates/boards/thread.html:32 | |
237 | msgid "images" |
|
240 | msgid "images" | |
238 | msgstr "ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠΉ" |
|
241 | msgstr "ΠΈΠ·ΠΎΠ±ΡΠ°ΠΆΠ΅Π½ΠΈΠΉ" | |
239 |
|
242 | |||
@@ -356,7 +359,7 b' msgstr "\xd0\x9c\xd0\xb5\xd1\x82\xd0\xba\xd0\xb8 \xd0\xbd\xd0\xb5 \xd0\xbd\xd0\xb0\xd0\xb9\xd0\xb4\xd0\xb5\xd0\xbd\xd1\x8b."' | |||||
356 | msgid "All tags" |
|
359 | msgid "All tags" | |
357 | msgstr "ΠΡΠ΅ ΠΌΠ΅ΡΠΊΠΈ" |
|
360 | msgstr "ΠΡΠ΅ ΠΌΠ΅ΡΠΊΠΈ" | |
358 |
|
361 | |||
359 |
#: templates/boards/thread.html:3 |
|
362 | #: templates/boards/thread.html:33 | |
360 | msgid "Last update: " |
|
363 | msgid "Last update: " | |
361 | msgstr "ΠΠΎΡΠ»Π΅Π΄Π½Π΅Π΅ ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠ΅: " |
|
364 | msgstr "ΠΠΎΡΠ»Π΅Π΄Π½Π΅Π΅ ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠ΅: " | |
362 |
|
365 | |||
@@ -392,5 +395,7 b' msgstr "\xd0\x9e\xd0\xb1\xd0\xbd\xd0\xbe\xd0\xb2\xd0\xb8\xd1\x82\xd1\x8c"' | |||||
392 |
|
395 | |||
393 | #: templates/search/search.html:17 |
|
396 | #: templates/search/search.html:17 | |
394 | msgid "Ok" |
|
397 | msgid "Ok" | |
395 | msgstr "" |
|
398 | msgstr "ΠΠΊ" | |
396 |
|
399 | |||
|
400 | #~ msgid "tag1 several_words_tag" | |||
|
401 | #~ msgstr "ΠΌΠ΅ΡΠΊΠ°1 ΠΌΠ΅ΡΠΊΠ°_ΠΈΠ·_Π½Π΅ΡΠΊΠΎΠ»ΡΠΊΠΈΡ _ΡΠ»ΠΎΠ²" |
@@ -28,9 +28,13 b'' | |||||
28 |
|
28 | |||
29 | <div class="navigation_panel header"> |
|
29 | <div class="navigation_panel header"> | |
30 | <a class="link" href="{% url 'index' %}">{% trans "All threads" %}</a> |
|
30 | <a class="link" href="{% url 'index' %}">{% trans "All threads" %}</a> | |
|
31 | {% if tags_str %} | |||
31 | {% autoescape off %} |
|
32 | {% autoescape off %} | |
32 | {{ tags_str }}, |
|
33 | {{ tags_str }}, | |
33 | {% endautoescape %} |
|
34 | {% endautoescape %} | |
|
35 | {% else %} | |||
|
36 | {% trans 'Add tags' %} β | |||
|
37 | {% endif %} | |||
34 | <a href="{% url 'tags' 'required'%}" title="{% trans 'Tag management' %}" |
|
38 | <a href="{% url 'tags' 'required'%}" title="{% trans 'Tag management' %}" | |
35 | >[...]</a>, |
|
39 | >[...]</a>, | |
36 | <a href="{% url 'search' %}" title="{% trans 'Search' %}">[S]</a>. |
|
40 | <a href="{% url 'search' %}" title="{% trans 'Search' %}">[S]</a>. |
@@ -4,14 +4,7 b'' | |||||
4 |
|
4 | |||
5 | {% get_current_language as LANGUAGE_CODE %} |
|
5 | {% get_current_language as LANGUAGE_CODE %} | |
6 |
|
6 | |||
7 | {% if thread.archived %} |
|
7 | <div class="{{ css_class }}" id="{{ post.id }}"> | |
8 | <div class="post archive_post" id="{{ post.id }}"> |
|
|||
9 | {% elif bumpable %} |
|
|||
10 | <div class="post" id="{{ post.id }}"> |
|
|||
11 | {% else %} |
|
|||
12 | <div class="post dead_post" id="{{ post.id }}"> |
|
|||
13 | {% endif %} |
|
|||
14 |
|
||||
15 | <div class="post-info"> |
|
8 | <div class="post-info"> | |
16 | <a class="post_id" href="{{ post.get_url }}">({{ post.get_absolute_id }})</a> |
|
9 | <a class="post_id" href="{{ post.get_url }}">({{ post.get_absolute_id }})</a> | |
17 | <span class="title">{{ post.title }}</span> |
|
10 | <span class="title">{{ post.title }}</span> |
@@ -43,7 +43,6 b' def image_actions(*args, **kwargs):' | |||||
43 | action['link'] % image_link, action['name'])for action in actions]) |
|
43 | action['link'] % image_link, action['name'])for action in actions]) | |
44 |
|
44 | |||
45 |
|
45 | |||
46 | # TODO Use get_view of a post instead of this |
|
|||
47 | @register.inclusion_tag('boards/post.html', name='post_view') |
|
46 | @register.inclusion_tag('boards/post.html', name='post_view') | |
48 | def post_view(post, moderator=False, need_open_link=False, truncated=False, |
|
47 | def post_view(post, moderator=False, need_open_link=False, truncated=False, | |
49 | reply_link=False, **kwargs): |
|
48 | reply_link=False, **kwargs): | |
@@ -53,87 +52,27 b' def post_view(post, moderator=False, nee' | |||||
53 |
|
52 | |||
54 | thread = post.get_thread() |
|
53 | thread = post.get_thread() | |
55 | is_opening = post.is_opening() |
|
54 | is_opening = post.is_opening() | |
56 | can_bump = thread.can_bump() |
|
|||
57 |
|
55 | |||
58 | if is_opening: |
|
56 | if is_opening: | |
59 | opening_post_id = post.id |
|
57 | opening_post_id = post.id | |
60 | else: |
|
58 | else: | |
61 | opening_post_id = thread.get_opening_post_id() |
|
59 | opening_post_id = thread.get_opening_post_id() | |
62 |
|
60 | |||
|
61 | css_class = 'post' | |||
|
62 | if thread.archived: | |||
|
63 | css_class += ' archive_post' | |||
|
64 | elif not thread.can_bump(): | |||
|
65 | css_class += ' dead_post' | |||
|
66 | ||||
63 | return { |
|
67 | return { | |
64 | 'post': post, |
|
68 | 'post': post, | |
65 | 'moderator': moderator, |
|
69 | 'moderator': moderator, | |
66 | 'is_opening': is_opening, |
|
70 | 'is_opening': is_opening, | |
67 | 'thread': thread, |
|
71 | 'thread': thread, | |
68 | 'bumpable': can_bump, |
|
72 | 'css_class': css_class, | |
69 | 'need_open_link': need_open_link, |
|
73 | 'need_open_link': need_open_link, | |
70 | 'truncated': truncated, |
|
74 | 'truncated': truncated, | |
71 | 'opening_post_id': opening_post_id, |
|
75 | 'opening_post_id': opening_post_id, | |
72 | 'reply_link': reply_link, |
|
76 | 'reply_link': reply_link, | |
73 | } |
|
77 | } | |
74 |
|
78 | |||
75 |
|
||||
76 | # TODO Fix or remove this method |
|
|||
77 | @register.filter(is_safe=True) |
|
|||
78 | def truncate_lines(text, length): |
|
|||
79 | if length <= 0: |
|
|||
80 | return '' |
|
|||
81 |
|
||||
82 | html4_singlets = ( |
|
|||
83 | 'br', 'col', 'link', 'base', 'img', |
|
|||
84 | 'param', 'area', 'hr', 'input' |
|
|||
85 | ) |
|
|||
86 |
|
||||
87 | # Count non-HTML chars/words and keep note of open tags |
|
|||
88 | pos = 0 |
|
|||
89 | end_text_pos = 0 |
|
|||
90 | current_len = 0 |
|
|||
91 | open_tags = [] |
|
|||
92 |
|
||||
93 | while current_len <= length: |
|
|||
94 | m = REGEX_LINES.search(text, pos) |
|
|||
95 | if not m: |
|
|||
96 | # Checked through whole string |
|
|||
97 | break |
|
|||
98 | pos = m.end(0) |
|
|||
99 | if m.group(1): |
|
|||
100 | # It's an actual non-HTML word or char |
|
|||
101 | current_len += 1 |
|
|||
102 | if current_len == length: |
|
|||
103 | end_text_pos = m.start(0) |
|
|||
104 | continue |
|
|||
105 | # Check for tag |
|
|||
106 | tag = REGEX_TAG.match(m.group(0)) |
|
|||
107 | if not tag or current_len >= length: |
|
|||
108 | # Don't worry about non tags or tags after our truncate point |
|
|||
109 | continue |
|
|||
110 | closing_tag, tagname, self_closing = tag.groups() |
|
|||
111 | # Element names are always case-insensitive |
|
|||
112 | tagname = tagname.lower() |
|
|||
113 | if self_closing or tagname in html4_singlets: |
|
|||
114 | pass |
|
|||
115 | elif closing_tag: |
|
|||
116 | # Check for match in open tags list |
|
|||
117 | try: |
|
|||
118 | i = open_tags.index(tagname) |
|
|||
119 | except ValueError: |
|
|||
120 | pass |
|
|||
121 | else: |
|
|||
122 | # SGML: An end tag closes, back to the matching start tag, |
|
|||
123 | # all unclosed intervening start tags with omitted end tags |
|
|||
124 | open_tags = open_tags[i + 1:] |
|
|||
125 | else: |
|
|||
126 | # Add it to the start of the open tags list |
|
|||
127 | open_tags.insert(0, tagname) |
|
|||
128 |
|
||||
129 | if current_len <= length: |
|
|||
130 | return text |
|
|||
131 | out = text[:end_text_pos] |
|
|||
132 |
|
||||
133 | if not out.endswith(ELLIPSIZER): |
|
|||
134 | out += ELLIPSIZER |
|
|||
135 | # Close any tags still open |
|
|||
136 | for tag in open_tags: |
|
|||
137 | out += '</%s>' % tag |
|
|||
138 | # Return string |
|
|||
139 | return out |
|
General Comments 0
You need to be logged in to leave comments.
Login now