Make WordPress Core

Ticket #45424: 45424.14.patch

File 45424.14.patch, 5.7 KB (added by allancole, 6 years ago)

Fix and improve some strings with placeholders. More info here: https://github.com/WordPress/twentynineteen/pull/217

  • src/wp-content/themes/twentynineteen/classes/class-twentynineteen-walker-comment.php

     
    5151                                                         * fill color to the inner check shape when in circle form.
    5252                                                         */
    5353                                                        if ( twentynineteen_is_comment_by_post_author( $comment ) ) {
    54                                                                 /* translators: %s: SVG Icon */
    5554                                                                printf( '<span class="post-author-badge" aria-hidden="true">%s</span>', twentynineteen_get_icon_svg( 'check', 24 ) );
    5655                                                        }
    5756
     
    110109                        ?>
    111110                <?php
    112111        }
    113 
    114112}
  • src/wp-content/themes/twentynineteen/inc/template-tags.php

     
    4040         */
    4141        function twentynineteen_posted_by() {
    4242                printf(
     43                        /* translators: 1: SVG icon. 2: post author, only visible to screen readers. 3: author link. */
    4344                        '<span class="byline">%1$s<span class="screen-reader-text">%2$s</span><span class="author vcard"><a class="url fn n" href="%3$s">%4$s</a></span></span>',
    44                         /* translators: 1: SVG icon. 2: post author, only visible to screen readers. 3: author link. */
    4545                        twentynineteen_get_icon_svg( 'person', 16 ),
    4646                        __( 'Posted by', 'twentynineteen' ),
    4747                        esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
     
    8585                        /* translators: used between list items, there is a space after the comma. */
    8686                        $categories_list = get_the_category_list( __( ', ', 'twentynineteen' ) );
    8787                        if ( $categories_list ) {
    88                                 /* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of categories. */
    8988                                printf(
     89                                        /* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of categories. */
    9090                                        '<span class="cat-links">%1$s<span class="screen-reader-text">%2$s</span>%3$s</span>',
    9191                                        twentynineteen_get_icon_svg( 'archive', 16 ),
    9292                                        __( 'Posted in', 'twentynineteen' ),
     
    9797                        /* translators: used between list items, there is a space after the comma. */
    9898                        $tags_list = get_the_tag_list( '', __( ', ', 'twentynineteen' ) );
    9999                        if ( $tags_list ) {
    100                                 /* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of tags. */
    101100                                printf(
     101                                        /* translators: 1: SVG icon. 2: posted in label, only visible to screen readers. 3: list of tags. */
    102102                                        '<span class="tags-links">%1$s<span class="screen-reader-text">%2$s </span>%3$s</span>',
    103103                                        twentynineteen_get_icon_svg( 'tag', 16 ),
    104104                                        __( 'Tags:', 'twentynineteen' ),
     
    157157
    158158                <figure class="post-thumbnail">
    159159                        <a class="post-thumbnail-inner" href="<?php the_permalink(); ?>" aria-hidden="true" tabindex="-1">
    160                                 <?php
    161                                 the_post_thumbnail( 'post-thumbnail' );
    162                                 ?>
     160                                <?php the_post_thumbnail( 'post-thumbnail' ); ?>
    163161                        </a>
    164162                </figure>
    165163
     
    210208
    211209                        comment_form(
    212210                                array(
    213                                         'logged_in_as'       => null,
    214                                         'title_reply'        => null,
     211                                        'logged_in_as' => null,
     212                                        'title_reply'  => null,
    215213                                )
    216214                        );
    217215                }
     
    223221         * Documentation for function.
    224222         */
    225223        function twentynineteen_the_posts_navigation() {
    226                 $prev_icon = twentynineteen_get_icon_svg( 'chevron_left', 22 );
    227                 $next_icon = twentynineteen_get_icon_svg( 'chevron_right', 22 );
    228224                the_posts_pagination(
    229225                        array(
    230226                                'mid_size'  => 2,
    231                                 'prev_text' => sprintf( '%s <span class="nav-prev-text">%s</span>', $prev_icon, __( 'Newer posts', 'twentynineteen' ) ),
    232                                 'next_text' => sprintf( '<span class="nav-next-text">%s</span> %s', __( 'Older posts', 'twentynineteen' ), $next_icon ),
     227                                'prev_text' => sprintf(
     228                                        '%s <span class="nav-prev-text">%s</span>',
     229                                        twentynineteen_get_icon_svg( 'chevron_left', 22 ),
     230                                        __( 'Newer posts', 'twentynineteen' )
     231                                ),
     232                                'next_text' => sprintf(
     233                                        '<span class="nav-next-text">%s</span> %s',
     234                                        __( 'Older posts', 'twentynineteen' ),
     235                                        twentynineteen_get_icon_svg( 'chevron_right', 22 )
     236                                ),
    233237                        )
    234238                );
    235239        }
  • src/wp-content/themes/twentynineteen/single.php

     
    2727                                        // Parent post navigation.
    2828                                        the_post_navigation(
    2929                                                array(
    30                                                         'prev_text' => _x( '<span class="meta-nav">Published in</span><br/><span class="post-title">%title</span>', 'Parent post link', 'twentynineteen' ),
     30                                                        /* translators: %s: parent post link */
     31                                                        'prev_text' => sprintf( __( '<span class="meta-nav">Published in</span><span class="post-title">%s</span>', 'twentynineteen' ), '%title' ),
    3132                                                )
    3233                                        );
    3334                                } elseif ( is_singular( 'post' ) ) {
  • src/wp-content/themes/twentynineteen/template-parts/post/author-bio.php

     
    1010if ( (bool) get_the_author_meta( 'description' ) ) : ?>
    1111<div class="author-bio">
    1212        <h2 class="author-title">
     13                <?php /* translators: %s: author name */ ?>
    1314                <span class="author-heading"><?php echo esc_html( sprintf( __( 'Published by %s', 'twentynineteen' ), get_the_author() ) ); ?></span>
    1415        </h2>
    1516        <p class="author-description">