##// END OF EJS Templates
Added strikethrough text to the text parser
neko259 -
r330:dd8357bc 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-10-24 16:06+0300\n"
10 "POT-Creation-Date: 2013-10-30 17:38+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,23 +34,23 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:51 templates/boards/posting_general.html:135
37 #: forms.py:51 templates/boards/posting_general.html:157
38 #: templates/boards/thread.html:100
38 #: templates/boards/thread.html:101
39 msgid "Title"
39 msgid "Title"
40 msgstr "Заголовок"
40 msgstr "Заголовок"
41
41
42 #: forms.py:53 templates/boards/posting_general.html:150
42 #: forms.py:53 templates/boards/posting_general.html:172
43 #: templates/boards/thread.html:115
43 #: templates/boards/thread.html:116
44 msgid "Text"
44 msgid "Text"
45 msgstr "Текст"
45 msgstr "Текст"
46
46
47 #: forms.py:54 templates/boards/posting_general.html:155
47 #: forms.py:54 templates/boards/posting_general.html:177
48 #: templates/boards/thread.html:120
48 #: templates/boards/thread.html:121
49 msgid "Image"
49 msgid "Image"
50 msgstr "Изображение"
50 msgstr "Изображение"
51
51
52 #: forms.py:57 templates/boards/posting_general.html:165
52 #: forms.py:57 templates/boards/posting_general.html:187
53 #: templates/boards/thread.html:125
53 #: templates/boards/thread.html:126
54 msgid "e-mail"
54 msgid "e-mail"
55 msgstr ""
55 msgstr ""
56
56
@@ -79,9 +79,8 b' msgid "Wait %s seconds after last postin'
79 msgstr "Подождите %s секунд после последнего постинга"
79 msgstr "Подождите %s секунд после последнего постинга"
80
80
81 #: forms.py:140 templates/boards/post.html:39
81 #: forms.py:140 templates/boards/post.html:39
82 #: templates/boards/posting_general.html:77
82 #: templates/boards/posting_general.html:182 templates/boards/tags.html:7
83 #: templates/boards/posting_general.html:160 templates/boards/tags.html:7
83 #: templates/boards/rss/post.html:10
84 #: templates/boards/thread.html:80 templates/boards/rss/post.html:10
85 msgid "Tags"
84 msgid "Tags"
86 msgstr "Теги"
85 msgstr "Теги"
87
86
@@ -138,24 +137,24 b' msgstr "\xd0\xa0\xd0\xb5\xd0\xbf\xd0\xbe\xd0\xb7\xd0\xb8\xd1\x82\xd0\xbe\xd1\x80\xd0\xb8\xd0\xb9"'
138 msgid "Feed"
137 msgid "Feed"
139 msgstr "Лента"
138 msgstr "Лента"
140
139
141 #: templates/boards/base.html:35
140 #: templates/boards/base.html:34
142 msgid "All threads"
141 msgid "All threads"
143 msgstr "Все темы"
142 msgstr "Все темы"
144
143
145 #: templates/boards/base.html:40
144 #: templates/boards/base.html:39
146 msgid "Tag management"
145 msgid "Tag management"
147 msgstr "Управление тегами"
146 msgstr "Управление тегами"
148
147
149 #: templates/boards/base.html:42
148 #: templates/boards/base.html:41
150 msgid "Settings"
149 msgid "Settings"
151 msgstr "Настройки"
150 msgstr "Настройки"
152
151
153 #: templates/boards/base.html:49 templates/boards/login.html:6
152 #: templates/boards/base.html:48 templates/boards/login.html:6
154 #: templates/boards/login.html.py:21
153 #: templates/boards/login.html.py:21
155 msgid "Login"
154 msgid "Login"
156 msgstr "Вход"
155 msgstr "Вход"
157
156
158 #: templates/boards/base.html:50
157 #: templates/boards/base.html:49
159 msgid "Up"
158 msgid "Up"
160 msgstr "Вверх"
159 msgstr "Вверх"
161
160
@@ -171,102 +170,103 b' msgstr "\xd0\x92\xd1\x81\xd1\x82\xd0\xb0\xd0\xb2\xd1\x8c\xd1\x82\xd0\xb5 \xd1\x81\xd0\xb2\xd0\xbe\xd0\xb9 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 \xd0\xb2\xd1\x8b\xd1\x88\xd0\xb5"'
171 msgid "Post image"
170 msgid "Post image"
172 msgstr "Изображение сообщения"
171 msgstr "Изображение сообщения"
173
172
174 #: templates/boards/post.html:26 templates/boards/posting_general.html:62
173 #: templates/boards/post.html:26 templates/boards/posting_general.html:67
175 #: templates/boards/thread.html:59
174 #: templates/boards/thread.html:60
176 msgid "Delete"
175 msgid "Delete"
177 msgstr "Удалить"
176 msgstr "Удалить"
178
177
179 #: templates/boards/post.html:29 templates/boards/posting_general.html:65
178 #: templates/boards/post.html:29 templates/boards/posting_general.html:70
180 #: templates/boards/thread.html:62
179 #: templates/boards/thread.html:63
181 msgid "Ban IP"
180 msgid "Ban IP"
182 msgstr "Заблокировать IP"
181 msgstr "Заблокировать IP"
183
182
184 #: templates/boards/posting_general.html:19
183 #: templates/boards/posting_general.html:62
185 msgid "Tag: "
186 msgstr "Тег: "
187
188 #: templates/boards/posting_general.html:57
189 msgid "Reply"
184 msgid "Reply"
190 msgstr "Ответ"
185 msgstr "Ответ"
191
186
192 #: templates/boards/posting_general.html:74 templates/boards/thread.html:153
187 #: templates/boards/posting_general.html:79
188 #: templates/boards/posting_general.html:133 templates/boards/thread.html:72
189 msgid "Replies"
190 msgstr "Ответы"
191
192 #: templates/boards/posting_general.html:87 templates/boards/thread.html:154
193 msgid "replies"
193 msgid "replies"
194 msgstr "ответов"
194 msgstr "ответов"
195
195
196 #: templates/boards/posting_general.html:75 templates/boards/thread.html:154
196 #: templates/boards/posting_general.html:88 templates/boards/thread.html:155
197 msgid "images"
197 msgid "images"
198 msgstr "изображений"
198 msgstr "изображений"
199
199
200 #: templates/boards/posting_general.html:126
200 #: templates/boards/posting_general.html:148
201 msgid "No threads exist. Create the first one!"
201 msgid "No threads exist. Create the first one!"
202 msgstr "Нет тем. Создайте первую!"
202 msgstr "Нет тем. Создайте первую!"
203
203
204 #: templates/boards/posting_general.html:132
204 #: templates/boards/posting_general.html:154
205 msgid "Create new thread"
205 msgid "Create new thread"
206 msgstr "Создать новую тему"
206 msgstr "Создать новую тему"
207
207
208 #: templates/boards/posting_general.html:140 templates/boards/thread.html:105
208 #: templates/boards/posting_general.html:162 templates/boards/thread.html:106
209 msgid "Formatting"
209 msgid "Formatting"
210 msgstr "Форматирование"
210 msgstr "Форматирование"
211
211
212 #: templates/boards/posting_general.html:142 templates/boards/thread.html:107
212 #: templates/boards/posting_general.html:164 templates/boards/thread.html:108
213 msgid "quote"
213 msgid "quote"
214 msgstr "цитата"
214 msgstr "цитата"
215
215
216 #: templates/boards/posting_general.html:143 templates/boards/thread.html:108
216 #: templates/boards/posting_general.html:165 templates/boards/thread.html:109
217 msgid "italic"
217 msgid "italic"
218 msgstr "курсив"
218 msgstr "курсив"
219
219
220 #: templates/boards/posting_general.html:144 templates/boards/thread.html:109
220 #: templates/boards/posting_general.html:166 templates/boards/thread.html:110
221 msgid "bold"
221 msgid "bold"
222 msgstr "полужирный"
222 msgstr "полужирный"
223
223
224 #: templates/boards/posting_general.html:145 templates/boards/thread.html:110
224 #: templates/boards/posting_general.html:167 templates/boards/thread.html:111
225 msgid "spoiler"
225 msgid "spoiler"
226 msgstr "спойлер"
226 msgstr "спойлер"
227
227
228 #: templates/boards/posting_general.html:146 templates/boards/thread.html:111
228 #: templates/boards/posting_general.html:168 templates/boards/thread.html:112
229 msgid "comment"
229 msgid "comment"
230 msgstr "комментарий"
230 msgstr "комментарий"
231
231
232 #: templates/boards/posting_general.html:178 templates/boards/thread.html:139
232 #: templates/boards/posting_general.html:200 templates/boards/thread.html:140
233 msgid "Post"
233 msgid "Post"
234 msgstr "Отправить"
234 msgstr "Отправить"
235
235
236 #: templates/boards/posting_general.html:180
236 #: templates/boards/posting_general.html:202
237 msgid "Tags must be delimited by spaces. Text or image is required."
237 msgid "Tags must be delimited by spaces. Text or image is required."
238 msgstr ""
238 msgstr ""
239 "Теги должны быть разделены пробелами. Текст или изображение обязательны."
239 "Теги должны быть разделены пробелами. Текст или изображение обязательны."
240
240
241 #: templates/boards/posting_general.html:183 templates/boards/thread.html:141
241 #: templates/boards/posting_general.html:205 templates/boards/thread.html:142
242 msgid "Text syntax"
242 msgid "Text syntax"
243 msgstr "Синтаксис текста"
243 msgstr "Синтаксис текста"
244
244
245 #: templates/boards/posting_general.html:193
245 #: templates/boards/posting_general.html:215
246 msgid "Pages:"
246 msgid "Pages:"
247 msgstr "Страницы: "
247 msgstr "Страницы: "
248
248
249 #: templates/boards/settings.html:13
249 #: templates/boards/settings.html:14
250 msgid "User:"
250 msgid "User:"
251 msgstr "Пользователь:"
251 msgstr "Пользователь:"
252
252
253 #: templates/boards/settings.html:15
253 #: templates/boards/settings.html:16
254 msgid "You are moderator."
254 msgid "You are moderator."
255 msgstr "Вы модератор."
255 msgstr "Вы модератор."
256
256
257 #: templates/boards/settings.html:18
257 #: templates/boards/settings.html:19
258 msgid "Posts:"
258 msgid "Posts:"
259 msgstr "Сообщений:"
259 msgstr "Сообщений:"
260
260
261 #: templates/boards/settings.html:19
261 #: templates/boards/settings.html:20
262 msgid "First access:"
262 msgid "First access:"
263 msgstr "Первый доступ:"
263 msgstr "Первый доступ:"
264
264
265 #: templates/boards/settings.html:21
265 #: templates/boards/settings.html:22
266 msgid "Last access:"
266 msgid "Last access:"
267 msgstr "Последний доступ: "
267 msgstr "Последний доступ: "
268
268
269 #: templates/boards/settings.html:30
269 #: templates/boards/settings.html:31
270 msgid "Save"
270 msgid "Save"
271 msgstr "Сохранить"
271 msgstr "Сохранить"
272
272
@@ -278,19 +278,15 b' msgstr "\xd1\x82\xd0\xb5\xd0\xbc"'
278 msgid "No tags found."
278 msgid "No tags found."
279 msgstr "Теги не найдены."
279 msgstr "Теги не найдены."
280
280
281 #: templates/boards/thread.html:24
281 #: templates/boards/thread.html:25
282 msgid "posts to bumplimit"
282 msgid "posts to bumplimit"
283 msgstr "сообщений до бамплимита"
283 msgstr "сообщений до бамплимита"
284
284
285 #: templates/boards/thread.html:71
285 #: templates/boards/thread.html:98
286 msgid "Replies"
287 msgstr "Ответы"
288
289 #: templates/boards/thread.html:97
290 msgid "Reply to thread"
286 msgid "Reply to thread"
291 msgstr "Ответить в тему"
287 msgstr "Ответить в тему"
292
288
293 #: templates/boards/thread.html:155
289 #: templates/boards/thread.html:156
294 msgid "Last update: "
290 msgid "Last update: "
295 msgstr "Последнее обновление: "
291 msgstr "Последнее обновление: "
296
292
@@ -335,6 +331,13 b' msgstr "\xd0\xa6\xd0\xb8\xd1\x82\xd0\xb0\xd1\x82\xd0\xb0"'
335 msgid "Link to a post"
331 msgid "Link to a post"
336 msgstr "Ссылка на сообщение"
332 msgstr "Ссылка на сообщение"
337
333
334 #: templates/boards/staticpages/help.html:18
335 msgid "Strikethrough text"
336 msgstr "Зачеркнутый текст"
337
338 #~ msgid "Tag: "
339 #~ msgstr "Тег: "
340
338 #~ msgid "Remove"
341 #~ msgid "Remove"
339 #~ msgstr "Удалить"
342 #~ msgstr "Удалить"
340
343
@@ -12,6 +12,7 b" QUOTE_PATTERN = r'^(?<!>)(>[^>].+)$'"
12 REFLINK_PATTERN = r'((>>)(\d+))'
12 REFLINK_PATTERN = r'((>>)(\d+))'
13 SPOILER_PATTERN = r'%%(.+)%%'
13 SPOILER_PATTERN = r'%%(.+)%%'
14 COMMENT_PATTERN = r'^(//(.+))'
14 COMMENT_PATTERN = r'^(//(.+))'
15 STRIKETHROUGH_PATTERN = r'~(.+)~'
15
16
16 class AutolinkPattern(Pattern):
17 class AutolinkPattern(Pattern):
17 def handleMatch(self, m):
18 def handleMatch(self, m):
@@ -71,6 +72,15 b' class CommentPattern(Pattern):'
71 return quote_element
72 return quote_element
72
73
73
74
75 class StrikeThroughPattern(Pattern):
76 def handleMatch(self, m):
77 quote_element = etree.Element('span')
78 quote_element.set('class', 'strikethrough')
79 quote_element.text = m.group(2)
80
81 return quote_element
82
83
74 class NeboardMarkdown(markdown.Extension):
84 class NeboardMarkdown(markdown.Extension):
75 def extendMarkdown(self, md, md_globals):
85 def extendMarkdown(self, md, md_globals):
76 self._add_neboard_patterns(md)
86 self._add_neboard_patterns(md)
@@ -88,9 +98,11 b' class NeboardMarkdown(markdown.Extension'
88 reflink = ReflinkPattern(REFLINK_PATTERN, md)
98 reflink = ReflinkPattern(REFLINK_PATTERN, md)
89 spoiler = SpoilerPattern(SPOILER_PATTERN, md)
99 spoiler = SpoilerPattern(SPOILER_PATTERN, md)
90 comment = CommentPattern(COMMENT_PATTERN, md)
100 comment = CommentPattern(COMMENT_PATTERN, md)
101 strikethrough = StrikeThroughPattern(STRIKETHROUGH_PATTERN, md)
91
102
92 md.inlinePatterns[u'autolink_ext'] = autolink
103 md.inlinePatterns[u'autolink_ext'] = autolink
93 md.inlinePatterns[u'spoiler'] = spoiler
104 md.inlinePatterns[u'spoiler'] = spoiler
105 md.inlinePatterns[u'strikethrough'] = strikethrough
94 md.inlinePatterns[u'comment'] = comment
106 md.inlinePatterns[u'comment'] = comment
95 md.inlinePatterns[u'reflink'] = reflink
107 md.inlinePatterns[u'reflink'] = reflink
96 md.inlinePatterns[u'quote'] = quote
108 md.inlinePatterns[u'quote'] = quote
@@ -17,4 +17,8 b''
17 background-color: #CCC;
17 background-color: #CCC;
18 border: 1px solid #000;
18 border: 1px solid #000;
19 cursor: pointer;
19 cursor: pointer;
20 } No newline at end of file
20 }
21
22 .strikethrough {
23 text-decoration: line-through;
24 }
@@ -15,4 +15,5 b''
15 <p><span class="comment">//{% trans 'Comment' %}</span></p>
15 <p><span class="comment">//{% trans 'Comment' %}</span></p>
16 <p><span class="quote">> {% trans 'Quote' %}</span></p>
16 <p><span class="quote">> {% trans 'Quote' %}</span></p>
17 <p><a>>>123</a> -- {% trans 'Link to a post' %}</p>
17 <p><a>>>123</a> -- {% trans 'Link to a post' %}</p>
18 {% endblock %} No newline at end of file
18 <p>~<span class="strikethrough">{% trans 'Strikethrough text' %}</span>~</p>
19 {% endblock %}
General Comments 0
You need to be logged in to leave comments. Login now