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. Built from https://develop.svn.wordpress.org/trunk@55655 git-svn-id: http://core.svn.wordpress.org/trunk@55167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
0e7e4ef0d5
commit
c34fad6c8b
|
@ -89,11 +89,20 @@ $discussion = twentynineteen_get_discussion_data();
|
||||||
if ( have_comments() ) :
|
if ( have_comments() ) :
|
||||||
$prev_icon = twentynineteen_get_icon_svg( 'chevron_left', 22 );
|
$prev_icon = twentynineteen_get_icon_svg( 'chevron_left', 22 );
|
||||||
$next_icon = twentynineteen_get_icon_svg( 'chevron_right', 22 );
|
$next_icon = twentynineteen_get_icon_svg( 'chevron_right', 22 );
|
||||||
$comments_text = __( 'Comments', 'twentynineteen' );
|
|
||||||
the_comments_navigation(
|
the_comments_navigation(
|
||||||
array(
|
array(
|
||||||
'prev_text' => sprintf( '%s <span class="nav-prev-text"><span class="primary-text">%s</span> <span class="secondary-text">%s</span></span>', $prev_icon, __( 'Previous', 'twentynineteen' ), __( 'Comments', 'twentynineteen' ) ),
|
'prev_text' => sprintf(
|
||||||
'next_text' => sprintf( '<span class="nav-next-text"><span class="primary-text">%s</span> <span class="secondary-text">%s</span></span> %s', __( 'Next', 'twentynineteen' ), __( 'Comments', 'twentynineteen' ), $next_icon ),
|
'%1$s <span class="nav-prev-text">%2$s</span>',
|
||||||
|
$prev_icon,
|
||||||
|
/* translators: Comments navigation link text. The secondary-text element is hidden on small screens. */
|
||||||
|
__( '<span class="primary-text">Previous</span> <span class="secondary-text">Comments</span>', 'twentynineteen' )
|
||||||
|
),
|
||||||
|
'next_text' => sprintf(
|
||||||
|
'<span class="nav-next-text">%1$s</span> %2$s',
|
||||||
|
/* translators: Comments navigation link text. The secondary-text element is hidden on small screens. */
|
||||||
|
__( '<span class="primary-text">Next</span> <span class="secondary-text">Comments</span>', 'twentynineteen' ),
|
||||||
|
$next_icon
|
||||||
|
),
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
endif;
|
endif;
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '6.3-alpha-55654';
|
$wp_version = '6.3-alpha-55655';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue