Make WordPress Core

Changeset 49578


Ignore:
Timestamp:
11/12/2020 07:28:35 PM (4 years ago)
Author:
desrosj
Message:

Twenty Twenty-One: Use consistent casing in strings.

This converts strings using Title Case to sentence case, which is currently preferred for consistency (see discussions on #40244).

Also included is the replacement of an escaped apostrophe with ’, which is also preferred per the Internationalization guidelines.

See #51526.

Location:
trunk/src/wp-content/themes/twentytwentyone
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-customize.php

    r49574 r49578  
    141141                    'background_color',
    142142                    array(
    143                         'label'   => esc_html_x( 'Background Color', 'Customizer control', 'twentytwentyone' ),
     143                        'label'   => esc_html_x( 'Background color', 'Customizer control', 'twentytwentyone' ),
    144144                        'section' => 'colors',
    145145                        'palette' => $colors,
  • trunk/src/wp-content/themes/twentytwentyone/classes/class-twenty-twenty-one-dark-mode.php

    r49574 r49578  
    166166                'type'            => 'checkbox',
    167167                'section'         => 'colors',
    168                 'label'           => esc_html__( 'Dark Mode Support', 'twentytwentyone' ),
    169                 'description'     => __( 'Respect visitor\'s device dark mode settings.<br>Dark mode is a device setting. If a visitor to your site requests it, your site will be shown with a dark background and light text.<br><br>Dark Mode can also be turned on and off with a button that you can find in the bottom right corner of the page.', 'twentytwentyone' ),
     168                'label'           => esc_html__( 'Dark Mode support', 'twentytwentyone' ),
     169                'description'     => __( 'Respect visitor&#8217;s device dark mode settings.<br>Dark mode is a device setting. If a visitor to your site requests it, your site will be shown with a dark background and light text.<br><br>Dark Mode can also be turned on and off with a button that you can find in the bottom right corner of the page.', 'twentytwentyone' ),
    170170                'active_callback' => function( $value ) {
    171171                    return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) );
     
    403403        }
    404404        $content = '<p class="privacy-policy-tutorial">' . __( 'Twenty Twenty-One uses LocalStorage when Dark Mode support is enabled.', 'twentytwentyone' ) . '</p>'
    405                 . '<strong class="privacy-policy-tutorial">' . __( 'Suggested Text:', 'twentytwentyone' ) . '</strong> '
     405                . '<strong class="privacy-policy-tutorial">' . __( 'Suggested text:', 'twentytwentyone' ) . '</strong> '
    406406                . __( 'This website uses LocalStorage to save the setting when Dark Mode support is turned on or off.<br> LocalStorage is necessary for the setting to work and is only used when a user clicks on the Dark Mode button.<br> No data is saved in the database or transferred.', 'twentytwentyone' );
    407407        wp_add_privacy_policy_content( 'Twenty Twenty-One', wp_kses_post( wpautop( $content, false ) ) );
  • trunk/src/wp-content/themes/twentytwentyone/comments.php

    r49574 r49578  
    3333        <h2 class="comments-title">
    3434            <?php if ( '1' === $twenty_twenty_one_comment_count ) : ?>
    35                 <?php esc_html_e( '1 Comment', 'twentytwentyone' ); ?>
     35                <?php esc_html_e( '1 comment', 'twentytwentyone' ); ?>
    3636            <?php else : ?>
    3737                <?php
    3838                printf(
    3939                    /* translators: %s: comment count number. */
    40                     esc_html( _nx( '%s Comment', '%s Comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone' ) ),
     40                    esc_html( _nx( '%s comment', '%s comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone' ) ),
    4141                    esc_html( number_format_i18n( $twenty_twenty_one_comment_count ) )
    4242                );
  • trunk/src/wp-content/themes/twentytwentyone/footer.php

    r49574 r49578  
    2222
    2323        <?php if ( has_nav_menu( 'footer' ) ) : ?>
    24             <nav aria-label="<?php esc_attr_e( 'Secondary Menu', 'twentytwentyone' ); ?>" class="footer-navigation">
     24            <nav aria-label="<?php esc_attr_e( 'Secondary menu', 'twentytwentyone' ); ?>" class="footer-navigation">
    2525                <ul class="footer-navigation-wrapper">
    2626                    <?php
  • trunk/src/wp-content/themes/twentytwentyone/functions.php

    r49574 r49578  
    7474        register_nav_menus(
    7575            array(
    76                 'primary' => esc_html__( 'Primary Menu', 'twentytwentyone' ),
    77                 'footer'  => __( 'Secondary Menu', 'twentytwentyone' ),
     76                'primary' => esc_html__( 'Primary menu', 'twentytwentyone' ),
     77                'footer'  => __( 'Secondary menu', 'twentytwentyone' ),
    7878            )
    7979        );
     
    172172                ),
    173173                array(
    174                     'name'      => esc_html__( 'Extra Large', 'twentytwentyone' ),
     174                    'name'      => esc_html__( 'Extra large', 'twentytwentyone' ),
    175175                    'shortName' => esc_html_x( 'XL', 'Font size', 'twentytwentyone' ),
    176176                    'size'      => 40,
     
    221221                ),
    222222                array(
    223                     'name'  => esc_html__( 'Dark Gray', 'twentytwentyone' ),
     223                    'name'  => esc_html__( 'Dark gray', 'twentytwentyone' ),
    224224                    'slug'  => 'dark-gray',
    225225                    'color' => $dark_gray,
     
    272272            array(
    273273                array(
    274                     'name'     => esc_html__( 'Purple to Yellow', 'twentytwentyone' ),
     274                    'name'     => esc_html__( 'Purple to yellow', 'twentytwentyone' ),
    275275                    'gradient' => 'linear-gradient(160deg, ' . $purple . ', ' . $yellow . ')',
    276276                    'slug'     => 'purple-to-yellow',
    277277                ),
    278278                array(
    279                     'name'     => esc_html__( 'Yellow to Purple', 'twentytwentyone' ),
     279                    'name'     => esc_html__( 'Yellow to purple', 'twentytwentyone' ),
    280280                    'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $purple . ')',
    281281                    'slug'     => 'yellow-to-purple',
    282282                ),
    283283                array(
    284                     'name'     => esc_html__( 'Green to Yellow', 'twentytwentyone' ),
     284                    'name'     => esc_html__( 'Green to yellow', 'twentytwentyone' ),
    285285                    'gradient' => 'linear-gradient(160deg, ' . $green . ', ' . $yellow . ')',
    286286                    'slug'     => 'green-to-yellow',
    287287                ),
    288288                array(
    289                     'name'     => esc_html__( 'Yellow to Green', 'twentytwentyone' ),
     289                    'name'     => esc_html__( 'Yellow to green', 'twentytwentyone' ),
    290290                    'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $green . ')',
    291291                    'slug'     => 'yellow-to-green',
    292292                ),
    293293                array(
    294                     'name'     => esc_html__( 'Red to Yellow', 'twentytwentyone' ),
     294                    'name'     => esc_html__( 'Red to yellow', 'twentytwentyone' ),
    295295                    'gradient' => 'linear-gradient(160deg, ' . $red . ', ' . $yellow . ')',
    296296                    'slug'     => 'red-to-yellow',
    297297                ),
    298298                array(
    299                     'name'     => esc_html__( 'Yellow to Red', 'twentytwentyone' ),
     299                    'name'     => esc_html__( 'Yellow to red', 'twentytwentyone' ),
    300300                    'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $red . ')',
    301301                    'slug'     => 'yellow-to-red',
    302302                ),
    303303                array(
    304                     'name'     => esc_html__( 'Purple to Red', 'twentytwentyone' ),
     304                    'name'     => esc_html__( 'Purple to red', 'twentytwentyone' ),
    305305                    'gradient' => 'linear-gradient(160deg, ' . $purple . ', ' . $red . ')',
    306306                    'slug'     => 'purple-to-red',
    307307                ),
    308308                array(
    309                     'name'     => esc_html__( 'Red to Purple', 'twentytwentyone' ),
     309                    'name'     => esc_html__( 'Red to purple', 'twentytwentyone' ),
    310310                    'gradient' => 'linear-gradient(160deg, ' . $red . ', ' . $purple . ')',
    311311                    'slug'     => 'red-to-purple',
  • trunk/src/wp-content/themes/twentytwentyone/inc/block-patterns.php

    r49574 r49578  
    3131        'twentytwentyone/large-text',
    3232        array(
    33             'title'         => esc_html__( 'Large Text', 'twentytwentyone' ),
     33            'title'         => esc_html__( 'Large text', 'twentytwentyone' ),
    3434            'categories'    => array( 'twentytwentyone' ),
    3535            'viewportWidth' => 1440,
     
    4242        'twentytwentyone/links-area',
    4343        array(
    44             'title'         => esc_html__( 'Links Area', 'twentytwentyone' ),
     44            'title'         => esc_html__( 'Links area', 'twentytwentyone' ),
    4545            'categories'    => array( 'twentytwentyone' ),
    4646            'viewportWidth' => 1440,
     
    5454        'twentytwentyone/media-text-article-title',
    5555        array(
    56             'title'         => esc_html__( 'Media and Text Article Title', 'twentytwentyone' ),
     56            'title'         => esc_html__( 'Media and text article title', 'twentytwentyone' ),
    5757            'categories'    => array( 'twentytwentyone' ),
    5858            'viewportWidth' => 1440,
     
    6666        'twentytwentyone/overlapping-images',
    6767        array(
    68             'title'         => esc_html__( 'Overlapping Images', 'twentytwentyone' ),
     68            'title'         => esc_html__( 'Overlapping images', 'twentytwentyone' ),
    6969            'categories'    => array( 'twentytwentyone' ),
    7070            'viewportWidth' => 1024,
     
    7878        'twentytwentyone/two-images-showcase',
    7979        array(
    80             'title'         => esc_html__( 'Two Images Showcase', 'twentytwentyone' ),
     80            'title'         => esc_html__( 'Two mages showcase', 'twentytwentyone' ),
    8181            'categories'    => array( 'twentytwentyone' ),
    8282            'viewportWidth' => 1440,
    83             'description'   => esc_html_x( 'A Media & Text block with a big image on the left and a smaller one with bordered frame on the right.', 'Block pattern description', 'twentytwentyone' ),
     83            'description'   => esc_html_x( 'A media & text block with a big image on the left and a smaller one with bordered frame on the right.', 'Block pattern description', 'twentytwentyone' ),
    8484            'content'       => '<!-- wp:media-text {"mediaId":1747,"mediaLink":"' . esc_url( get_template_directory_uri() ) . '/assets/images/Daffodils.jpg","mediaType":"image"} --><div class="wp-block-media-text alignwide is-stacked-on-mobile"><figure class="wp-block-media-text__media"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/Daffodils.jpg" alt="' . esc_attr__( '&#8220;Daffodils&#8221; by Berthe Morisot', 'twentytwentyone' ) . '" size-full"/></figure><div class="wp-block-media-text__content"><!-- wp:image {"align":"center","width":400,"height":512,"sizeSlug":"large","className":"is-style-twentytwentyone-image-frame"} --><figure class="wp-block-image aligncenter size-large is-resized is-style-twentytwentyone-image-frame"><img src="' . esc_url( get_template_directory_uri() ) . '/assets/images/self-portrait-1885.jpg" alt="' . esc_attr__( '&#8220;Self portrait&#8221; by Berthe Morisot', 'twentytwentyone' ) . '" width="400" height="512"/></figure><!-- /wp:image --></div></div><!-- /wp:media-text -->',
    8585        )
     
    9090        'twentytwentyone/overlapping-images-and-text',
    9191        array(
    92             'title'         => esc_html__( 'Overlapping Images and Text', 'twentytwentyone' ),
     92            'title'         => esc_html__( 'Overlapping images and text', 'twentytwentyone' ),
    9393            'categories'    => array( 'twentytwentyone' ),
    9494            'viewportWidth' => 1440,
     
    102102        'twentytwentyone/portfolio-list',
    103103        array(
    104             'title'       => esc_html__( 'Portfolio List', 'twentytwentyone' ),
     104            'title'       => esc_html__( 'Portfolio list', 'twentytwentyone' ),
    105105            'categories'  => array( 'twentytwentyone' ),
    106106            'description' => esc_html_x( 'A list of projects with thumbnail images.', 'Block pattern description', 'twentytwentyone' ),
     
    112112        'twentytwentyone/contact-information',
    113113        array(
    114             'title'       => esc_html__( 'Contact Information', 'twentytwentyone' ),
     114            'title'       => esc_html__( 'Contact information', 'twentytwentyone' ),
    115115            'categories'  => array( 'twentytwentyone' ),
    116116            'description' => esc_html_x( 'A block with 3 columns that display contact information and social media links.', 'Block pattern description', 'twentytwentyone' ),
  • trunk/src/wp-content/themes/twentytwentyone/inc/block-styles.php

    r49216 r49578  
    105105            array(
    106106                'name'  => 'twentytwentyone-social-icons-color',
    107                 'label' => esc_html__( 'Dark Gray', 'twentytwentyone' ),
     107                'label' => esc_html__( 'Dark gray', 'twentytwentyone' ),
    108108            )
    109109        );
  • trunk/src/wp-content/themes/twentytwentyone/inc/menu-functions.php

    r49574 r49578  
    3333        $output .= '<span class="icon-plus">' . twenty_twenty_one_get_icon_svg( 'ui', 'plus', 18 ) . '</span>';
    3434        $output .= '<span class="icon-minus">' . twenty_twenty_one_get_icon_svg( 'ui', 'minus', 18 ) . '</span>';
    35         $output .= '<span class="screen-reader-text">' . esc_html__( 'Open Menu', 'twentytwentyone' ) . '</span>';
     35        $output .= '<span class="screen-reader-text">' . esc_html__( 'Open menu', 'twentytwentyone' ) . '</span>';
    3636        $output .= '</button>';
    3737    }
  • trunk/src/wp-content/themes/twentytwentyone/inc/starter-content.php

    r49574 r49578  
    152152            // Assign a menu to the "primary" location.
    153153            'primary' => array(
    154                 'name'  => esc_html__( 'Primary Menu', 'twentytwentyone' ),
     154                'name'  => esc_html__( 'Primary menu', 'twentytwentyone' ),
    155155                'items' => array(
    156156                    'link_home', // Note that the core "home" page is actually a link in case a static front page is not used.
     
    163163            // Assign a menu to the "footer" location.
    164164            'footer'  => array(
    165                 'name'  => esc_html__( 'Secondary Menu', 'twentytwentyone' ),
     165                'name'  => esc_html__( 'Secondary menu', 'twentytwentyone' ),
    166166                'items' => array(
    167167                    'link_facebook',
  • trunk/src/wp-content/themes/twentytwentyone/template-parts/header/site-nav.php

    r49574 r49578  
    1111
    1212<?php if ( has_nav_menu( 'primary' ) ) : ?>
    13     <nav id="site-navigation" class="primary-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'twentytwentyone' ); ?>">
     13    <nav id="site-navigation" class="primary-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary menu', 'twentytwentyone' ); ?>">
    1414        <div class="menu-button-container">
    1515            <button id="primary-mobile-menu" class="button" aria-controls="primary-menu-list" aria-expanded="false">
Note: See TracChangeset for help on using the changeset viewer.