Make WordPress Core


Ignore:
Timestamp:
05/17/2019 12:52:32 AM (5 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r45158 r45334  
    30213021            <?php
    30223022            printf(
    3023                 /* translators: 1: link start tag, 2: accessibility text, 3: link end tag */
    3024                 __( '%1$sDescribe the purpose of the image%2$s%3$s. Leave empty if the image is purely decorative.' ),
    3025                 '<a href="' . esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ) . '" target="_blank" rel="noopener noreferrer">',
     3023                /* translators: 1: link to tutorial, 2: additional link attributes, 3: accessibility text */
     3024                __( '<a href="%1$s" %2$s>Describe the purpose of the image%3$s</a>. Leave empty if the image is purely decorative.' ),
     3025                esc_url( 'https://www.w3.org/WAI/tutorials/images/decision-tree' ),
     3026                'target="_blank" rel="noopener noreferrer"',
    30263027                sprintf(
    30273028                    '<span class="screen-reader-text"> %s</span>',
    30283029                    /* translators: accessibility text */
    30293030                    __( '(opens in a new tab)' )
    3030                 ),
    3031                 '</a>'
     3031                )
    30323032            );
    30333033            ?>
Note: See TracChangeset for help on using the changeset viewer.