From fb0ec2f704530061a8d6ceb25858c398f8b43b21 Mon Sep 17 00:00:00 2001 From: Anupkankale Date: Tue, 31 Mar 2026 19:14:54 +0000 Subject: [PATCH] I18N: Add translator context for Previous/Next in image lightbox Adds context for translators to disambiguate 'Previous' and 'Next' in the image lightbox navigation. Fixes #65004 --- src/wp-includes/blocks/image.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/wp-includes/blocks/image.php b/src/wp-includes/blocks/image.php index 02b60f91c030a..f4d1508270ddb 100644 --- a/src/wp-includes/blocks/image.php +++ b/src/wp-includes/blocks/image.php @@ -205,8 +205,8 @@ function block_core_image_render_lightbox( $block_content, $block, $block_instan array( 'defaultAriaLabel' => __( 'Enlarged image' ), 'closeButtonText' => esc_html__( 'Close' ), - 'prevButtonText' => esc_html__( 'Previous' ), - 'nextButtonText' => esc_html__( 'Next' ), + 'prevButtonText' => esc_html_x( 'Previous', 'label for the previous post link in image lightbox' ), + 'nextButtonText' => esc_html_x( 'Next', 'label for the next post link in image lightbox' ), ) ); @@ -323,8 +323,8 @@ class="lightbox-trigger" function block_core_image_print_lightbox_overlay() { $dialog_label = esc_attr__( 'Enlarged images' ); $close_button_text = esc_attr__( 'Close' ); - $prev_button_text = esc_attr__( 'Previous' ); - $next_button_text = esc_attr__( 'Next' ); + $prev_button_text = esc_attr_x( 'Previous', 'label for the previous post link in image lightbox' ); + $next_button_text = esc_attr_x( 'Next', 'label for the next post link in image lightbox' ); $close_button_icon = ''; $prev_button_icon = ''; $next_button_icon = '';