Make WordPress Core


Ignore:
Timestamp:
05/17/2019 12:55:22 AM (6 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.
Merges [45334] to the 5.2 branch.
Fixes #47159.

Location:
branches/5.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.2

  • branches/5.2/src/wp-admin/includes/media.php

    r45158 r45335  
    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.