From b343a7c049b766af6226cc35bdd5b0ee0e1c3603 Mon Sep 17 00:00:00 2001 From: Jb Audras Date: Tue, 18 Apr 2023 08:22:08 +0000 Subject: [PATCH] Twenty Nineteen: Fix a translation issue in Comments navigation text. This changeset combines text strings for "Previous Comments" and "Next Comments" links to ensure translators can control word order in each string. The `span` tags are included in the translation to give more control over what is hidden on small screens. Props sabernhardt. Fixes #58149. git-svn-id: https://develop.svn.wordpress.org/trunk@55655 602fd350-edb4-49c9-b593-d223f7449a82 --- .../themes/twentynineteen/comments.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/wp-content/themes/twentynineteen/comments.php b/src/wp-content/themes/twentynineteen/comments.php index 5e734d417e..3cd1768824 100644 --- a/src/wp-content/themes/twentynineteen/comments.php +++ b/src/wp-content/themes/twentynineteen/comments.php @@ -87,13 +87,22 @@ $discussion = twentynineteen_get_discussion_data(); // Show comment navigation. if ( have_comments() ) : - $prev_icon = twentynineteen_get_icon_svg( 'chevron_left', 22 ); - $next_icon = twentynineteen_get_icon_svg( 'chevron_right', 22 ); - $comments_text = __( 'Comments', 'twentynineteen' ); + $prev_icon = twentynineteen_get_icon_svg( 'chevron_left', 22 ); + $next_icon = twentynineteen_get_icon_svg( 'chevron_right', 22 ); the_comments_navigation( array( - 'prev_text' => sprintf( '%s %s %s', $prev_icon, __( 'Previous', 'twentynineteen' ), __( 'Comments', 'twentynineteen' ) ), - 'next_text' => sprintf( '%s %s %s', __( 'Next', 'twentynineteen' ), __( 'Comments', 'twentynineteen' ), $next_icon ), + 'prev_text' => sprintf( + '%1$s %2$s', + $prev_icon, + /* translators: Comments navigation link text. The secondary-text element is hidden on small screens. */ + __( 'Previous Comments', 'twentynineteen' ) + ), + 'next_text' => sprintf( + '%1$s %2$s', + /* translators: Comments navigation link text. The secondary-text element is hidden on small screens. */ + __( 'Next Comments', 'twentynineteen' ), + $next_icon + ), ) ); endif;