rythm_of_samba (rithm_of_samba) wrote in changelog,
rythm_of_samba
rithm_of_samba
changelog

[livejournal] r15580: LJSUP-4604 Add number of comments to pos...

Committer: nefimenko
LJSUP-4604 Add number of comments to post

U   trunk/bin/upgrading/en.dat
U   trunk/htdocs/talkpost.bml
U   trunk/htdocs/talkread.bml
Modified: trunk/bin/upgrading/en.dat
===================================================================
--- trunk/bin/upgrading/en.dat	2009-07-31 16:46:40 UTC (rev 15579)
+++ trunk/bin/upgrading/en.dat	2009-08-03 07:11:21 UTC (rev 15580)
@@ -2874,6 +2874,12 @@
 
 talk.commentsread=Read comments
 
+talk.commentsread.counted=Read [[replycount]] [[?replycount|comment|comments]]
+
+talk.comments.counted=[[replycount]] [[?replycount|comment|comments]]
+
+talk.commentsread.nocomments=No comments
+
 talk.curname_Groups=<b>Custom friends groups:</b>
 
 talk.curname_Location=<b>Current location:</b>

Modified: trunk/htdocs/talkpost.bml
===================================================================
--- trunk/htdocs/talkpost.bml	2009-07-31 16:46:40 UTC (rev 15579)
+++ trunk/htdocs/talkpost.bml	2009-08-03 07:11:21 UTC (rev 15580)
@@ -392,9 +392,17 @@
 
     my $jarg = "journal=$u->{'user'}&";
     my $readurl = LJ::Talk::talkargs($talkurl, $stylemine, $formatlight);
+    my $replycount = $entry->prop("replycount");
 
-    $ret .= "<p align='center' class='lesstop'><b>(<a href=\"$readurl#comments\">$ML{'talk.commentsread'}</a>)</b></p>";
 
+	my $readlink_text = BML::ml("talk.commentsread.counted",
+                    { replycount => $replycount });
+    if ($replycount == 0) {
+		$readlink_text = BML::ml("talk.commentsread.nocomments");
+	}
+
+    $ret .= "<p align='center' class='lesstop'><b>(<a href=\"$readurl#comments\">$readlink_text</a>)</b></p>";
+
     # can a comment even be made?
     if ($props->{'opt_nocomments'}) {
         $ret .= "<?h1 $ML{'Sorry'} h1?><?p $ML{'.error.nocommentspost'} p?>";

Modified: trunk/htdocs/talkread.bml
===================================================================
--- trunk/htdocs/talkread.bml	2009-07-31 16:46:40 UTC (rev 15579)
+++ trunk/htdocs/talkread.bml	2009-08-03 07:11:21 UTC (rev 15580)
@@ -763,11 +763,19 @@
      $ret .= "<a name='comments'></a>";
      $ret .= "<p>$navcrap</p>" if $navcrap;
      my $readlink;
-     if ($dthread && $pages == 1) {
+	 my $replycount = $entry->prop("replycount");
+	 my $readlink_text = BML::ml("talk.commentsread.counted",
+                    { replycount => $replycount });
+	 my $comments_count = BML::ml("talk.comments.counted",
+                    { replycount => $replycount });
+	
+	 if ($dthread && $pages == 1) {
          my $readurl = LJ::Talk::talkargs($talkurl, $stylemine, $formatlight);
-         $readlink = "(<a href='$readurl#comments'>$T{'readcomments'}</a>) - ";
-     }
 
+         $readlink = "(<a href='$readurl#comments'>$readlink_text</a>) - ";
+     } else { if ($replycount > 0) { $readlink = "($comments_count) - "; }
+	}
+
      my $posturl = LJ::Talk::talkargs($talkurl, "mode=reply", $stylemine, $formatlight);
 
      my $stylemine = $GET{'style'} eq 'mine' ? 1 : 0;
@@ -792,7 +800,7 @@
          # See if we want to force them to change their password
          my $bp = LJ::bad_password_redirect({ 'returl' => 1 });
          if ($bp) {
-             $ret .= "(<a href='$bp'>$T{'replythis'}</a>)";
+             $ret .= "(<a href='$bp'>$T{'replythis'} </a>)";
          } else {
              $ret .= "(" . LJ::make_qr_link('top', '', $T{'postcomments'}, $posturl) . "</a>)";
          }

Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments