From e7fe2f33fb92550eee1f172db5e2ea0e862a386b Mon Sep 17 00:00:00 2001 From: ramon Date: Tue, 10 Oct 2023 11:15:41 +1100 Subject: [PATCH] Pulling across changes from https://github.com/WordPress/wordpress-develop/pull/5441 Removed var --- packages/block-library/src/latest-posts/edit.js | 7 ++++--- packages/block-library/src/latest-posts/index.php | 5 ++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/block-library/src/latest-posts/edit.js b/packages/block-library/src/latest-posts/edit.js index 586ecc5943273..0efe538b01f62 100644 --- a/packages/block-library/src/latest-posts/edit.js +++ b/packages/block-library/src/latest-posts/edit.js @@ -484,9 +484,10 @@ export default function LatestPostsEdit( { attributes, setAttributes } ) { .join( ' ' ) } { createInterpolateElement( sprintf( - /* translators: 1: The static string "Read more", 2: The post title only visible to screen readers. */ - __( '… %1$s: %2$s' ), - __( 'Read more' ), + /* translators: 1: Hidden accessibility text: Post title */ + __( + '… Read more: %1$s' + ), titleTrimmed || __( '(no title)' ) ), { diff --git a/packages/block-library/src/latest-posts/index.php b/packages/block-library/src/latest-posts/index.php index d5f759c0c0e25..adc51d0c4fecb 100644 --- a/packages/block-library/src/latest-posts/index.php +++ b/packages/block-library/src/latest-posts/index.php @@ -152,10 +152,9 @@ function render_block_core_latest_posts( $attributes ) { if ( $excerpt_length <= $block_core_latest_posts_excerpt_length ) { $trimmed_excerpt = substr( $trimmed_excerpt, 0, -11 ); $trimmed_excerpt .= sprintf( - /* translators: 1: A URL to a post, 2: The static string "Read more", 3: The post title only visible to screen readers. */ - __( '… %2$s: %3$s' ), + /* translators: 1: A URL to a post, 2: Hidden accessibility text: Post title */ + __( '… Read more: %2$s' ), esc_url( $post_link ), - __( 'Read more' ), esc_html( $title ) ); }