# HG changeset patch # User Steve Kemp # Date 1198155309 0 # Node ID 7a05117f1bc35fbf7ac56dca9f9bd8d293857852 # Parent b8ee2fcc22b617106b62721ab3339446496dc41a Show plural comments correctly. diff -r b8ee2fcc22b6 -r 7a05117f1bc3 bin/chronicle --- a/bin/chronicle Thu Dec 20 12:15:42 2007 +0000 +++ b/bin/chronicle Thu Dec 20 12:55:09 2007 +0000 @@ -1289,10 +1289,13 @@ if ( defined($comments) ) { - my $count = scalar( @$comments ); - - $template->param( comments => $comments, - comment_count => $count ); + my $count = scalar( @$comments ); + my $plural = 1; + $plural = 0 if ( $count == 1 ); + + $template->param( comments => $comments, + comment_count => $count, + comment_plural => $plural ); $CONFIG{'verbose'} && print "$file [$filename] has $count comments\n"; } @@ -1552,7 +1555,11 @@ # Count comments. # $entry{'comment_count' } = countComments( $CONFIG{'comments'}, $entry{'link'} ); - + if ( defined $entry{'comment_count'} && + $entry{'comment_count'} != 1 ) + { + $entry{'comment_plural'} = 1; + } # # Store the read file in the cache if we're using it. diff -r b8ee2fcc22b6 -r 7a05117f1bc3 themes/blog.steve.org.uk/bubbles.css --- a/themes/blog.steve.org.uk/bubbles.css Thu Dec 20 12:15:42 2007 +0000 +++ b/themes/blog.steve.org.uk/bubbles.css Thu Dec 20 12:55:09 2007 +0000 @@ -10,7 +10,7 @@ margin: 0px; padding: 0px; border: 1px solid #c9c2c1; - background-color: #fff; + background-color: #eee; } div.bubble blockquote p { diff -r b8ee2fcc22b6 -r 7a05117f1bc3 themes/blog.steve.org.uk/index.template --- a/themes/blog.steve.org.uk/index.template Thu Dec 20 12:15:42 2007 +0000 +++ b/themes/blog.steve.org.uk/index.template Thu Dec 20 12:55:09 2007 +0000 @@ -59,7 +59,7 @@
- comment(s) + comments diff -r b8ee2fcc22b6 -r 7a05117f1bc3 themes/blog.steve.org.uk/month.template --- a/themes/blog.steve.org.uk/month.template Thu Dec 20 12:15:42 2007 +0000 +++ b/themes/blog.steve.org.uk/month.template Thu Dec 20 12:55:09 2007 +0000 @@ -67,7 +67,7 @@
- comment(s) + comments diff -r b8ee2fcc22b6 -r 7a05117f1bc3 themes/blog.steve.org.uk/tags.template --- a/themes/blog.steve.org.uk/tags.template Thu Dec 20 12:15:42 2007 +0000 +++ b/themes/blog.steve.org.uk/tags.template Thu Dec 20 12:55:09 2007 +0000 @@ -72,7 +72,7 @@