From 4236a3522dfc84d4fcc8cb6a7fbae30bd2cfc75d Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 17 May 2019 00:53:54 +0000 Subject: [PATCH] I18N: Avoid using placeholders for link start and end tags in alt text description strings added in [45158]. Use an established pattern of moving additional link attributes out of the translatable string. Props dimadin. Fixes #47159. Built from https://develop.svn.wordpress.org/trunk@45334 git-svn-id: http://core.svn.wordpress.org/trunk@45145 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/media.php | 10 +++++----- wp-includes/media-template.php | 10 +++++----- wp-includes/version.php | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index e30cc08b1b..5c54b21402 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -3020,15 +3020,15 @@ function edit_form_image_editor( $post ) {

', + /* translators: 1: link to tutorial, 2: additional link attributes, 3: accessibility text */ + __( 'Describe the purpose of the image%3$s. Leave empty if the image is purely decorative.' ), + esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ), + 'target="_blank" rel="noopener noreferrer"', sprintf( ' %s', /* translators: accessibility text */ __( '(opens in a new tab)' ) - ), - '' + ) ); ?>

diff --git a/wp-includes/media-template.php b/wp-includes/media-template.php index 1711f50ab4..d730cac7d7 100644 --- a/wp-includes/media-template.php +++ b/wp-includes/media-template.php @@ -163,15 +163,15 @@ function wp_print_media_templates() { } $alt_text_description = sprintf( - /* translators: 1: link start tag, 2: accessibility text, 3: link end tag */ - __( '%1$sDescribe the purpose of the image%2$s%3$s. Leave empty if the image is purely decorative.' ), - '', + /* translators: 1: link to tutorial, 2: additional link attributes, 3: accessibility text */ + __( 'Describe the purpose of the image%3$s. Leave empty if the image is purely decorative.' ), + esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ), + 'target="_blank" rel="noopener noreferrer"', sprintf( ' %s', /* translators: accessibility text */ __( '(opens in a new tab)' ) - ), - '' + ) ); ?>