wp/wp-content/themes/twentyfourteen/comments.php
changeset 7 cf61fcea0001
parent 5 5e2f62d02dcd
--- a/wp/wp-content/themes/twentyfourteen/comments.php	Tue Jun 09 11:14:17 2015 +0000
+++ b/wp/wp-content/themes/twentyfourteen/comments.php	Mon Oct 14 17:39:30 2019 +0200
@@ -24,8 +24,24 @@
 
 	<h2 class="comments-title">
 		<?php
-			printf( _n( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'twentyfourteen' ),
-				number_format_i18n( get_comments_number() ), get_the_title() );
+			$comments_number = get_comments_number();
+		if ( '1' === $comments_number ) {
+			/* translators: %s: post title */
+			printf( _x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentyfourteen' ), get_the_title() );
+		} else {
+			printf(
+				/* translators: 1: number of comments, 2: post title */
+				_nx(
+					'%1$s thought on &ldquo;%2$s&rdquo;',
+					'%1$s thoughts on &ldquo;%2$s&rdquo;',
+					$comments_number,
+					'comments title',
+					'twentyfourteen'
+				),
+				number_format_i18n( $comments_number ),
+				get_the_title()
+			);
+		}
 		?>
 	</h2>
 
@@ -39,11 +55,13 @@
 
 	<ol class="comment-list">
 		<?php
-			wp_list_comments( array(
-				'style'       => 'ol',
-				'short_ping'  => true,
-				'avatar_size' => 34,
-			) );
+			wp_list_comments(
+				array(
+					'style'       => 'ol',
+					'short_ping'  => true,
+					'avatar_size' => 34,
+				)
+			);
 		?>
 	</ol><!-- .comment-list -->