Committer: mchervonniy
LJSUP-8126: number of spam commentsU trunk/bin/upgrading/s2layers/tranquilityii/layout.s2 U trunk/bin/upgrading/s2layers/unearthed/layout.s2 U trunk/bin/upgrading/s2layers/voxhtml/layout.s2
Modified: trunk/bin/upgrading/s2layers/tranquilityii/layout.s2 =================================================================== --- trunk/bin/upgrading/s2layers/tranquilityii/layout.s2 2011-03-16 05:49:37 UTC (rev 10246) +++ trunk/bin/upgrading/s2layers/tranquilityii/layout.s2 2011-03-16 06:59:15 UTC (rev 10247) @@ -1181,11 +1181,11 @@ print "<h4>"; print safe get_permalink($e.permalink_url); - if ( $p.view == "entry" and $e.comments.count > 0) { + if ( $p.view == "entry" and $e.comments.count > 0 and $e.comments.read_spam_url != "") { if ($p.showspam) { - """ | <a href=\"$e.comments.read_spam_url\">$*text_hidespam ($e.comments.spam_counter)</a></span>"""; + """ | """ + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span>"""; } else { - """ | <a href=\"$e.comments.read_spam_url\">$*text_showspam ($e.comments.spam_counter)</a></span>"""; + """ | <a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span>"""; } } if ( $p.view != "entry" and $p.view != "reply" ) { Modified: trunk/bin/upgrading/s2layers/unearthed/layout.s2 =================================================================== --- trunk/bin/upgrading/s2layers/unearthed/layout.s2 2011-03-16 05:49:37 UTC (rev 10246) +++ trunk/bin/upgrading/s2layers/unearthed/layout.s2 2011-03-16 06:59:15 UTC (rev 10247) @@ -986,11 +986,11 @@ $sidebar = $sidebar + """<a href="$e.comments.post_url">""" + ($.view == "friends" ? $*text_post_comment_friends : $*text_post_comment) + "</a><br />"; } - if (($e.comments.count > 0 or $e.comments.screened) and $.view == "entry") { + if (($e.comments.count > 0 or $e.comments.screened) and $.view == "entry" and $e.comments.read_spam_url != "") { if ($p.showspam) { - $sidebar = $sidebar + """<a href=\"$e.comments.read_spam_url\">$*text_hidespam ($e.comments.spam_counter)</a><br />"""; + $sidebar = $sidebar + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """<br />"""; } else { - $sidebar = $sidebar + """<a href=\"$e.comments.read_spam_url\">$*text_showspam ($e.comments.spam_counter)</a><br />"""; + $sidebar = $sidebar + """<a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a><br />"""; } } } Modified: trunk/bin/upgrading/s2layers/voxhtml/layout.s2 =================================================================== --- trunk/bin/upgrading/s2layers/voxhtml/layout.s2 2011-03-16 05:49:37 UTC (rev 10246) +++ trunk/bin/upgrading/s2layers/voxhtml/layout.s2 2011-03-16 06:59:15 UTC (rev 10247) @@ -1962,18 +1962,12 @@ } var string comments_showspam = ""; - if ($.entry.comments.count > 0 and not $.entry.comments.locked) { + if ($.entry.comments.count > 0 and $.entry.comments.read_spam_url != "") { if ($p.showspam) { - $comments_showspam = """<span class="comments-hidespam"><a href=\"$.entry.comments.read_spam_url\">$*text_hidespam ($.entry.comments.spam_counter)</a></span> <span class="emdash">—</span> """; + $comments_showspam = """<span class="comments-hidespam">""" + get_plural_phrase($.entry.comments.spam_counter, "text_read_spam_comments") + """</span> <span class="emdash">—</span> """; } else { - $comments_showspam = """<span class="comments-showspam"><a href=\"$.entry.comments.read_spam_url\">$*text_showspam ($.entry.comments.spam_counter)</a></span> <span class="emdash">—</span> """; + $comments_showspam = """<span class="comments-showspam"><a href=\"$.entry.comments.read_spam_url\">""" + get_plural_phrase($.entry.comments.spam_counter, "text_read_all_spam_comments") + """</a></span> <span class="emdash">—</span> """; } - } elseif ($.entry.comments.count > 0) { - if ($p.showspam) { - $comments_showspam = """<span class="comments-hidespam"><a href=\"$.entry.comments.read_spam_url\">$*text_hidespam ($.entry.comments.spam_counter)</a></span> """; - } else { - $comments_showspam = """<span class="comments-showspam"><a href=\"$.entry.comments.read_spam_url\">$*text_showspam ($.entry.comments.spam_counter)</a></span> """; - } } else { $comments_showspam = ""; }