# HG changeset patch # User neko259 # Date 2015-03-03 21:52:58 # Node ID 23c5d871a1da774aa32d453f8aa86aa239df1805 # Parent 9c6dd86654a36101864ce99c02cbeaef6d534b13 Added button to update thread manually if websocket connection failed diff --git a/boards/locale/ru/LC_MESSAGES/django.mo b/boards/locale/ru/LC_MESSAGES/django.mo index 02e30cd8fb3eac12827b24ed29e949cb4a592265..2dc8581836ef4c9805664be5d306a9304d019c94 GIT binary patch literal 6909 zc$|$_Yit}>6~3iu8?W6uiJde_AKU;54ef62q|Z&9#;Kje)UW!{sz_jscPI9w>zQR{ z)```iCNUu?HgQ`-sairvc?m($W^2cG>^MRd5+EKk2niveNQm9rrIkBE+-6V>bwO9lc2idL02)0-puqC&uu& z5%^VL1@IN!{~bKm0)GTt4_pAQ0{#xT8u$k-=dZx6z<2d{Ee5NAn>21)&GUDz=KXiC z=6&`7C9oB^1vmuU1f0Wc@F?T z32d%lIYSjZZ={0djaIPUFH|rOFX{F9F4w#Mcx>4Zuz%R$xp0hEnA83Vg7d*F9Oy^X+Q3>jmH%;4JVq;4i8L_U ztA=@7Rjc`{WxMaJ<+$5k%X0VEvYgNA@vLq?Q_Fgs1rC#cYuWy->sgP_t=IXxp65@j z*Lky^?R#CfL*NR+iJZ zk^OvlBg=UP*iAfaWFFqbV+6PwPCiWQH}Sf6Hu1XmH?jQ{n;GS1w&%gkyzf&QGkW}4 z;61>XfDZ%T1YRfj+8|07oTBw)6Y)))kUwL3-t`(O=5EyQcWP|WcsK6*^gG4k zgMw=^T~cs7ZPo1?%5~}Ski7>(%vPwR?^iaxGvE}b)Z*p{6rV!_`$OFrv%3t)tbkZ@br*n zi^fbw`h%`%q&?A?^9LQ*6Z;I?Hq&CClSxb8JnD-_ouMJq24bFXO4~f5*N7&|^IfYy z=bLGnv(u)F0aG-mEnhvPZw%-cp5JU?+*MMg<4SAD7%=5f&hurzDY1p=n(2htZ({oc zMkZsrBXY<|o8q9APMbD~^ODpsmE;y$&QICf)vDhjaT(L|u&-gut)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W#P!Qqod@xHsJg4kifG=9##fpPK( zO`yS9+0w**o(sp7A&L}8oudFKK<_gYy0lM0k;?%{UqHbt*z~yCsjxy^o~NiHk3c~- znP}obRNaawd@ltTuwV>bDg>_JfprUt)8~pFfB~mC8qcX*P}9%@S|=30NJX_|0#-y8 zjMFq4FOrrZ?<<`s7a*U8OTiD1eu={B9L*;+iZK+PiliVxA>|uUJdwszO6_2_EJn2i z75oWV%0}`x&A+P1R2jL2W}^x~ex8+PE{{jCt)wm5B3KZ?w{=!f_Rp2V@tZ1=S?h7) zw#>9}jOeBrS5;@BJfWAz@KQIB`14Aw$*5{zZ*sx$;s8`9YOh7?_h?7upFAs4P}OFv ztWowFm6yVzqBW)Bby`VUC@Xj2sp4MBC@P#YWfWKB@zO`` zvYePz<$xoO9IaTHqL&qkRgEcj z{qnDUP6AM}^jm*dYr}tMCVGGK6{PXvh-h=pgMumg%(Ux_KL7v# diff --git a/boards/locale/ru/LC_MESSAGES/django.po b/boards/locale/ru/LC_MESSAGES/django.po --- a/boards/locale/ru/LC_MESSAGES/django.po +++ b/boards/locale/ru/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2015-02-24 08:32+0200\n" +"POT-Creation-Date: 2015-03-03 23:49+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -38,93 +38,93 @@ msgstr "разработчик javascript" msgid "designer" msgstr "дизайнер" -#: forms.py:32 +#: forms.py:33 msgid "Type message here. Use formatting panel for more advanced usage." msgstr "" "Вводите сообщение сюда. Используйте панель для более сложного форматирования." -#: forms.py:33 +#: forms.py:34 msgid "tag1 several_words_tag" msgstr "метка1 метка_из_нескольких_слов" -#: forms.py:35 +#: forms.py:36 msgid "Title" msgstr "Заголовок" -#: forms.py:36 +#: forms.py:37 msgid "Text" msgstr "Текст" -#: forms.py:37 +#: forms.py:38 msgid "Tag" msgstr "Метка" -#: forms.py:38 templates/boards/base.html:38 templates/search/search.html:9 +#: forms.py:39 templates/boards/base.html:38 templates/search/search.html:9 #: templates/search/search.html.py:13 msgid "Search" msgstr "Поиск" -#: forms.py:125 +#: forms.py:131 msgid "Image" msgstr "Изображение" -#: forms.py:128 +#: forms.py:134 msgid "Image URL" msgstr "URL изображения" -#: forms.py:134 +#: forms.py:140 msgid "e-mail" msgstr "" -#: forms.py:145 +#: forms.py:151 #, python-format msgid "Title must have less than %s characters" msgstr "Заголовок должен иметь меньше %s символов" -#: forms.py:154 +#: forms.py:160 #, python-format msgid "Text must have less than %s characters" msgstr "Текст должен быть короче %s символов" -#: forms.py:175 +#: forms.py:181 msgid "Invalid URL" msgstr "Неверный URL" -#: forms.py:212 +#: forms.py:218 msgid "Either text or image must be entered." msgstr "Текст или картинка должны быть введены." -#: forms.py:219 forms.py:261 forms.py:275 +#: forms.py:225 forms.py:267 forms.py:281 #, python-format msgid "Image must be less than %s bytes" msgstr "Изображение должно быть менее %s байт" -#: forms.py:235 +#: forms.py:241 #, python-format msgid "Wait %s seconds after last posting" msgstr "Подождите %s секунд после последнего постинга" -#: forms.py:296 templates/boards/rss/post.html:10 templates/boards/tags.html:7 +#: forms.py:302 templates/boards/rss/post.html:10 templates/boards/tags.html:7 msgid "Tags" msgstr "Метки" -#: forms.py:303 +#: forms.py:309 msgid "Inappropriate characters in tags." msgstr "Недопустимые символы в метках." -#: forms.py:314 +#: forms.py:320 msgid "Need at least 1 required tag." msgstr "Нужна хотя бы 1 обязательная метка." -#: forms.py:327 +#: forms.py:333 msgid "Theme" msgstr "Тема" -#: forms.py:328 +#: forms.py:334 msgid "User name" msgstr "Имя пользователя" -#: forms.py:334 +#: forms.py:340 msgid "Inappropriate characters." msgstr "Недопустимые символы." @@ -198,12 +198,12 @@ msgid "Insert your user id above" msgstr "Вставьте свой ID пользователя выше" #: templates/boards/notifications.html:16 -#: templates/boards/posting_general.html:85 templates/search/search.html:22 +#: templates/boards/posting_general.html:79 templates/search/search.html:22 msgid "Previous page" msgstr "Предыдущая страница" #: templates/boards/notifications.html:26 -#: templates/boards/posting_general.html:125 templates/search/search.html:33 +#: templates/boards/posting_general.html:117 templates/search/search.html:33 msgid "Next page" msgstr "Следующая страница" @@ -241,51 +241,51 @@ msgstr "сообщений" msgid "images" msgstr "изображений" -#: templates/boards/posting_general.html:56 +#: templates/boards/posting_general.html:52 msgid "Show tag" msgstr "Показывать метку" -#: templates/boards/posting_general.html:60 +#: templates/boards/posting_general.html:56 msgid "Hide tag" msgstr "Скрывать метку" -#: templates/boards/posting_general.html:67 +#: templates/boards/posting_general.html:63 msgid "Edit tag" msgstr "Изменить метку" -#: templates/boards/posting_general.html:70 +#: templates/boards/posting_general.html:66 #, python-format msgid "This tag has %(thread_count)s threads and %(post_count)s posts." msgstr "С этой меткой есть %(thread_count)s тем и %(post_count)s сообщений." -#: templates/boards/posting_general.html:99 +#: templates/boards/posting_general.html:93 #, python-format msgid "Skipped %(count)s replies. Open thread to see all replies." msgstr "Пропущено %(count)s ответов. Откройте тред, чтобы увидеть все ответы." -#: templates/boards/posting_general.html:130 +#: templates/boards/posting_general.html:122 msgid "No threads exist. Create the first one!" msgstr "Нет тем. Создайте первую!" -#: templates/boards/posting_general.html:136 +#: templates/boards/posting_general.html:128 msgid "Create new thread" msgstr "Создать новую тему" -#: templates/boards/posting_general.html:141 templates/boards/preview.html:16 -#: templates/boards/thread.html:54 +#: templates/boards/posting_general.html:133 templates/boards/preview.html:16 +#: templates/boards/thread.html:53 msgid "Post" msgstr "Отправить" -#: templates/boards/posting_general.html:146 +#: templates/boards/posting_general.html:139 msgid "Tags must be delimited by spaces. Text or image is required." msgstr "" "Метки должны быть разделены пробелами. Текст или изображение обязательны." -#: templates/boards/posting_general.html:149 templates/boards/thread.html:59 +#: templates/boards/posting_general.html:142 templates/boards/thread.html:59 msgid "Text syntax" msgstr "Синтаксис текста" -#: templates/boards/posting_general.html:161 +#: templates/boards/posting_general.html:154 msgid "Pages:" msgstr "Страницы: " @@ -305,11 +305,11 @@ msgstr "Вы модератор." msgid "Hidden tags:" msgstr "Скрытые метки:" -#: templates/boards/settings.html:26 +#: templates/boards/settings.html:27 msgid "No hidden tags." msgstr "Нет скрытых меток." -#: templates/boards/settings.html:35 +#: templates/boards/settings.html:36 msgid "Save" msgstr "Сохранить" @@ -374,6 +374,10 @@ msgstr "сообщений до бамплимита" msgid "Reply to thread" msgstr "Ответить в тему" +#: templates/boards/thread.html:85 +msgid "Update" +msgstr "Обновить" + #: templates/boards/thread.html:88 templates/boards/thread_gallery.html:61 msgid "Last update: " msgstr "Последнее обновление: " diff --git a/boards/static/js/thread_update.js b/boards/static/js/thread_update.js --- a/boards/static/js/thread_update.js +++ b/boards/static/js/thread_update.js @@ -66,7 +66,7 @@ function connectWebsocket() { // For the case we closed the browser and missed some updates getThreadDiff(); - $('#autoupdate').text('[+]'); + $('#autoupdate').hide(); }); centrifuge.connect(); @@ -327,4 +327,6 @@ function processNewPost(post) { resetForm(form); } + + $('#autoupdate').click(getThreadDiff); }); diff --git a/boards/templates/boards/thread.html b/boards/templates/boards/thread.html --- a/boards/templates/boards/thread.html +++ b/boards/templates/boards/thread.html @@ -82,7 +82,7 @@ data-ws-host="{{ ws_host }}" data-ws-port="{{ ws_port }}"> {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %} - [-] + {{ thread.get_reply_count }}/{{ max_replies }} {% trans 'messages' %}, {{ thread.get_images_count }} {% trans 'images' %}. {% trans 'Last update: ' %}{{ thread.last_edit_time|date:'r' }} diff --git a/boards/templates/boards/thread_gallery.html b/boards/templates/boards/thread_gallery.html --- a/boards/templates/boards/thread_gallery.html +++ b/boards/templates/boards/thread_gallery.html @@ -54,7 +54,7 @@ {% get_current_language as LANGUAGE_CODE %} - {% cache 600 thread_meta thread.last_edit_time moderator LANGUAGE_CODE %} + {% cache 600 thread_gallery_meta thread.last_edit_time moderator LANGUAGE_CODE %} {{ thread.get_reply_count }}/{{ max_replies }} {% trans 'messages' %}, {{ thread.get_images_count }} {% trans 'images' %}.