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
This commit is contained in:
Sergey Biryukov 2019-05-17 00:53:54 +00:00
parent a9fc042377
commit 4236a3522d
3 changed files with 11 additions and 11 deletions

View File

@ -3020,15 +3020,15 @@ function edit_form_image_editor( $post ) {
<p class="attachment-alt-text-description" id="alt-text-description">
<?php
printf(
/* 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.' ),
'<a href="' . esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ) . '" target="_blank" rel="noopener noreferrer">',
/* translators: 1: link to tutorial, 2: additional link attributes, 3: accessibility text */
__( '<a href="%1$s" %2$s>Describe the purpose of the image%3$s</a>. 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(
'<span class="screen-reader-text"> %s</span>',
/* translators: accessibility text */
__( '(opens in a new tab)' )
),
'</a>'
)
);
?>
</p>

View File

@ -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.' ),
'<a href="' . esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ) . '" target="_blank" rel="noopener noreferrer">',
/* translators: 1: link to tutorial, 2: additional link attributes, 3: accessibility text */
__( '<a href="%1$s" %2$s>Describe the purpose of the image%3$s</a>. 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(
'<span class="screen-reader-text"> %s</span>',
/* translators: accessibility text */
__( '(opens in a new tab)' )
),
'</a>'
)
);
?>
<!--[if lte IE 8]>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.3-alpha-45331';
$wp_version = '5.3-alpha-45334';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.