diff --git a/boards/locale/ru/LC_MESSAGES/django.mo b/boards/locale/ru/LC_MESSAGES/django.mo index 110d0a0a9713fed521cff8ecaf959d864b27ed52..c430bbf78d49e077b880ab8529e2e4f4b09fd798 GIT binary patch literal 7693 zc$|$_Yiu0V6~3h@)UOabI8I0cH?*M%VK;U{XxPMnlQ@Zq9XozNffh6NPV7l`XP22> zCqY!?(GZYBjChFj5kgwpib_hYm zer<{9zoSI_+)^TXYD>h=edhf@iP+O=Dlt}2yvcK|^RRZ}YQ*-~oq0o+dcFz?R*ZwL05il0NJV%H3CImHF| z5b$@UV#k&;nZK`0;#glMdg8$QfnJ%!@9i>?A1xER-YJuPe_1B>FIg;h?prK=wJsL< zM;D7e+sq#V-b8#}EPg&?{H;6d4Fk%QY$IGON0-@ zz}tYoSt9%VYl-BeqFnfTTe-wxBk)$>-g4n(FK`*~WVx*Wdbz}78n}e`QZD=a-N={2 z$i2V~6_V#vh2-Vw3gPX!3eoqbd4C7ElXwrj3wY~NrM42Ef$NATOU2$%U>)$?r4o-a z46dhrfS(6;05<}k1bzTBnZ$c^nZ)&dGyfMezO+il@2Qgb?XD7jKU5|A zr>aD6f0e}VwJOQen`V3h*a!T1mBeZ1aGJua*=y$xvYO@xy0jL^Zr-hv%r6v z_fsn*uIE-r-h&mwyN`gIf&Ty=0fvw)Y^lC`v*^D9+(+^^i$AMCf){}6SBl=rm7?z_ zD z!D?CmvBB$*e3XT{LrJ~TkLs5=vD3U0f5?YUTrFm-T?sE9HSe`bcuz5>x}#okubEq6 z@Nt#@5x2gC>j5S9Q7@o=Lb=$1t40Yg=(ow>W`kcg*ox~xC2^W9uq z>i5*kh<_HYMkQQYRIsi>&Hi;5d{{}nYbA9{wXx64eMQN+zaQ5IGe#VFL`mhbBpNjVAEis@9ZXIoJkiaV~V zi^W(X91hEKb~c^rO?bZAVY#jyRXY+fXtIx{)XrGKxAnn<7gswI@wn|`2uo77cI_i( zx!UFUDbMLjr|hUsyHVT2gstjf1K(&z^C0r|4(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Rs(GZpnvxohN@Hex*s^BGshxX5JJjTX02zjloQTjpFhM1kkgYc@vbj*D-{Y2GcqlXGqRStQXvvQg?y91xJyu z6C9pt;pPc?L@f*Tt_k$Ntdx!?j<3tn~RG>3G6 z(?LpyiBX!vI>x-23KKVYYpMaL8H9MA^zi5zqSFNmC+(J_5xg@&MijzXiG?#4E>JMr z+=;Nx7bG!*oWIJkrlgFl$*tr_{tsy~pQX9}iT$Q^32!)D!Gsh`Fr$L+nA)KpF_q`` zYr!OLT(hR9pe^F@RPeU2ys&gG6^1F(PZ^?iHOjl6f`P=fLDMdHVpu3bwLsmFIs;Y@ zXT2DqN2H8vf_n5MR!z(c8yi|6RnUFr*X2TsFUnqXOD{Kpun`}w#fI;(7lYDiE|IU9 zGaOwxDz4QxE+I<;m?BL??)kP6eaW#QZngadFIgYw3{b5X_U#dl^%&bXQ_%4;~wt-TqWQmq*MgBF zJHt61;|^<%fI&Vur)c+K0G)We-H521;^s>|2QK735}7cwzFji|VKE5yWlmE^oz8yl z@s=WKXf{BfwEg7n3>Wfoo`L3Y!Ne$Mb3}AxS#GqL!e>$q6@C?FS)Z*7`S=*mR?i6g z4uhl#YbhqIIU6DC2Q$yof0|G_%%6WJnC8Kh=GMEwM>e0T)S5>n38YEWvcY*@`o=># zH5FMcuZlk`#^ea#o+CBR_se{?oPhvXG?o8CUHBVs;e|T?-!18&V~7@v5kF|rJZ>vG z5TK`DK9y#FPmfEKaiDjSxt-J$rAaNIiD@n$uG2{36myx6KN6mE^eIlWIau=lSp65L CHgZk? 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-08-09 22:38+0300\n" +"POT-Creation-Date: 2015-08-10 10:22+0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -121,7 +121,6 @@ msgid "Inappropriate characters in tags. msgstr "Недопустимые символы в метках." #: forms.py:359 -#| msgid "Need at least one of the tags: " msgid "Need at least one section." msgstr "Нужен хотя бы один раздел." @@ -163,8 +162,11 @@ msgstr "Изменить метку" #: templates/boards/all_threads.html:76 #, python-format -msgid "This tag has %(thread_count)s threads and %(post_count)s posts." -msgstr "С этой меткой есть %(thread_count)s тем и %(post_count)s сообщений." +#| msgid "This tag has %(thread_count)s threads and %(post_count)s posts." +msgid "" +"This tag has %(active_thread_count)s/%(thread_count)s threads and " +"%(post_count)s posts." +msgstr "С этой меткой есть %(active_thread_count)s/%(thread_count)s тем и %(post_count)s сообщений." #: templates/boards/all_threads.html:83 templates/boards/feed.html:30 #: templates/boards/notifications.html:17 templates/search/search.html:26 diff --git a/boards/models/tag.py b/boards/models/tag.py --- a/boards/models/tag.py +++ b/boards/models/tag.py @@ -54,8 +54,14 @@ class Tag(models.Model, Viewable): return self.get_thread_count() == 0 - def get_thread_count(self) -> int: - return self.get_threads().count() + def get_thread_count(self, archived=None) -> int: + threads = self.get_threads() + if archived is not None: + threads = threads.filter(archived=archived) + return threads.count() + + def get_active_thread_count(self) -> int: + return self.get_thread_count(archived=False) def get_absolute_url(self): return reverse('tag', kwargs={'tag_name': self.name}) diff --git a/boards/templates/boards/all_threads.html b/boards/templates/boards/all_threads.html --- a/boards/templates/boards/all_threads.html +++ b/boards/templates/boards/all_threads.html @@ -73,7 +73,7 @@

{{ tag.get_description }}

{% endautoescape %} {% endif %} -

{% blocktrans with thread_count=tag.get_thread_count post_count=tag.get_post_count %}This tag has {{ thread_count }} threads and {{ post_count }} posts.{% endblocktrans %}

+

{% blocktrans with active_thread_count=tag.get_active_thread_count thread_count=tag.get_thread_count post_count=tag.get_post_count %}This tag has {{ active_thread_count}}/{{ thread_count }} threads and {{ post_count }} posts.{% endblocktrans %}

{% endif %}