wp/wp-content/themes/twentythirteen/comments.php
changeset 10 372f2766ea20
parent 7 cf61fcea0001
--- a/wp/wp-content/themes/twentythirteen/comments.php	Mon Oct 14 18:28:13 2019 +0200
+++ b/wp/wp-content/themes/twentythirteen/comments.php	Mon Oct 14 18:30:03 2019 +0200
@@ -23,10 +23,20 @@
 	<?php if ( have_comments() ) : ?>
 		<h2 class="comments-title">
 			<?php
+			if ( 1 === get_comments_number() ) {
 				printf(
-					_nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'twentythirteen' ),
-					number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>'
+					/* translators: %s: The post title. */
+					_x( 'One thought on &ldquo;%s&rdquo;', 'comments title', 'twentythirteen' ),
+					'<span>' . get_the_title() . '</span>'
 				);
+			} else {
+				printf(
+					/* translators: %1$s: The number of comments. %2$s: The post title. */
+					_nx( '%1$s thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'twentythirteen' ),
+					number_format_i18n( get_comments_number() ),
+					'<span>' . get_the_title() . '</span>'
+				);
+			}
 			?>
 		</h2>
 
@@ -45,7 +55,7 @@
 		<?php
 			// Are there comments to navigate through?
 		if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) :
-		?>
+			?>
 		<nav class="navigation comment-navigation" role="navigation">
 		<h1 class="screen-reader-text section-heading"><?php _e( 'Comment navigation', 'twentythirteen' ); ?></h1>
 		<div class="nav-previous"><?php previous_comments_link( __( '&larr; Older Comments', 'twentythirteen' ) ); ?></div>