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.
Built from https://develop.svn.wordpress.org/trunk@49578


git-svn-id: http://core.svn.wordpress.org/trunk@49316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2020-11-12 19:30:11 +00:00
parent 5de5b186f3
commit 6703f8efee
11 changed files with 34 additions and 34 deletions

View File

@ -140,7 +140,7 @@ if ( ! class_exists( 'Twenty_Twenty_One_Customize' ) ) {
$wp_customize,
'background_color',
array(
'label' => esc_html_x( 'Background Color', 'Customizer control', 'twentytwentyone' ),
'label' => esc_html_x( 'Background color', 'Customizer control', 'twentytwentyone' ),
'section' => 'colors',
'palette' => $colors,
)

View File

@ -165,8 +165,8 @@ class Twenty_Twenty_One_Dark_Mode {
array(
'type' => 'checkbox',
'section' => 'colors',
'label' => esc_html__( 'Dark Mode Support', 'twentytwentyone' ),
'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' ),
'label' => esc_html__( 'Dark Mode support', 'twentytwentyone' ),
'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' ),
'active_callback' => function( $value ) {
return 127 < Twenty_Twenty_One_Custom_Colors::get_relative_luminance_from_hex( get_theme_mod( 'background_color', 'D1E4DD' ) );
},
@ -402,7 +402,7 @@ class Twenty_Twenty_One_Dark_Mode {
return;
}
$content = '<p class="privacy-policy-tutorial">' . __( 'Twenty Twenty-One uses LocalStorage when Dark Mode support is enabled.', 'twentytwentyone' ) . '</p>'
. '<strong class="privacy-policy-tutorial">' . __( 'Suggested Text:', 'twentytwentyone' ) . '</strong> '
. '<strong class="privacy-policy-tutorial">' . __( 'Suggested text:', 'twentytwentyone' ) . '</strong> '
. __( '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' );
wp_add_privacy_policy_content( 'Twenty Twenty-One', wp_kses_post( wpautop( $content, false ) ) );
}

View File

@ -32,12 +32,12 @@ $twenty_twenty_one_comment_count = get_comments_number();
?>
<h2 class="comments-title">
<?php if ( '1' === $twenty_twenty_one_comment_count ) : ?>
<?php esc_html_e( '1 Comment', 'twentytwentyone' ); ?>
<?php esc_html_e( '1 comment', 'twentytwentyone' ); ?>
<?php else : ?>
<?php
printf(
/* translators: %s: comment count number. */
esc_html( _nx( '%s Comment', '%s Comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone' ) ),
esc_html( _nx( '%s comment', '%s comments', $twenty_twenty_one_comment_count, 'Comments title', 'twentytwentyone' ) ),
esc_html( number_format_i18n( $twenty_twenty_one_comment_count ) )
);
?>

View File

@ -21,7 +21,7 @@
<footer id="colophon" class="site-footer" role="contentinfo">
<?php if ( has_nav_menu( 'footer' ) ) : ?>
<nav aria-label="<?php esc_attr_e( 'Secondary Menu', 'twentytwentyone' ); ?>" class="footer-navigation">
<nav aria-label="<?php esc_attr_e( 'Secondary menu', 'twentytwentyone' ); ?>" class="footer-navigation">
<ul class="footer-navigation-wrapper">
<?php
wp_nav_menu(

View File

@ -73,8 +73,8 @@ if ( ! function_exists( 'twenty_twenty_one_setup' ) ) {
register_nav_menus(
array(
'primary' => esc_html__( 'Primary Menu', 'twentytwentyone' ),
'footer' => __( 'Secondary Menu', 'twentytwentyone' ),
'primary' => esc_html__( 'Primary menu', 'twentytwentyone' ),
'footer' => __( 'Secondary menu', 'twentytwentyone' ),
)
);
@ -171,7 +171,7 @@ if ( ! function_exists( 'twenty_twenty_one_setup' ) ) {
'slug' => 'large',
),
array(
'name' => esc_html__( 'Extra Large', 'twentytwentyone' ),
'name' => esc_html__( 'Extra large', 'twentytwentyone' ),
'shortName' => esc_html_x( 'XL', 'Font size', 'twentytwentyone' ),
'size' => 40,
'slug' => 'extra-large',
@ -220,7 +220,7 @@ if ( ! function_exists( 'twenty_twenty_one_setup' ) ) {
'color' => $black,
),
array(
'name' => esc_html__( 'Dark Gray', 'twentytwentyone' ),
'name' => esc_html__( 'Dark gray', 'twentytwentyone' ),
'slug' => 'dark-gray',
'color' => $dark_gray,
),
@ -271,42 +271,42 @@ if ( ! function_exists( 'twenty_twenty_one_setup' ) ) {
'editor-gradient-presets',
array(
array(
'name' => esc_html__( 'Purple to Yellow', 'twentytwentyone' ),
'name' => esc_html__( 'Purple to yellow', 'twentytwentyone' ),
'gradient' => 'linear-gradient(160deg, ' . $purple . ', ' . $yellow . ')',
'slug' => 'purple-to-yellow',
),
array(
'name' => esc_html__( 'Yellow to Purple', 'twentytwentyone' ),
'name' => esc_html__( 'Yellow to purple', 'twentytwentyone' ),
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $purple . ')',
'slug' => 'yellow-to-purple',
),
array(
'name' => esc_html__( 'Green to Yellow', 'twentytwentyone' ),
'name' => esc_html__( 'Green to yellow', 'twentytwentyone' ),
'gradient' => 'linear-gradient(160deg, ' . $green . ', ' . $yellow . ')',
'slug' => 'green-to-yellow',
),
array(
'name' => esc_html__( 'Yellow to Green', 'twentytwentyone' ),
'name' => esc_html__( 'Yellow to green', 'twentytwentyone' ),
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $green . ')',
'slug' => 'yellow-to-green',
),
array(
'name' => esc_html__( 'Red to Yellow', 'twentytwentyone' ),
'name' => esc_html__( 'Red to yellow', 'twentytwentyone' ),
'gradient' => 'linear-gradient(160deg, ' . $red . ', ' . $yellow . ')',
'slug' => 'red-to-yellow',
),
array(
'name' => esc_html__( 'Yellow to Red', 'twentytwentyone' ),
'name' => esc_html__( 'Yellow to red', 'twentytwentyone' ),
'gradient' => 'linear-gradient(160deg, ' . $yellow . ', ' . $red . ')',
'slug' => 'yellow-to-red',
),
array(
'name' => esc_html__( 'Purple to Red', 'twentytwentyone' ),
'name' => esc_html__( 'Purple to red', 'twentytwentyone' ),
'gradient' => 'linear-gradient(160deg, ' . $purple . ', ' . $red . ')',
'slug' => 'purple-to-red',
),
array(
'name' => esc_html__( 'Red to Purple', 'twentytwentyone' ),
'name' => esc_html__( 'Red to purple', 'twentytwentyone' ),
'gradient' => 'linear-gradient(160deg, ' . $red . ', ' . $purple . ')',
'slug' => 'red-to-purple',
),

File diff suppressed because one or more lines are too long

View File

@ -104,7 +104,7 @@ if ( function_exists( 'register_block_style' ) ) {
'core/social-links',
array(
'name' => 'twentytwentyone-social-icons-color',
'label' => esc_html__( 'Dark Gray', 'twentytwentyone' ),
'label' => esc_html__( 'Dark gray', 'twentytwentyone' ),
)
);
}

View File

@ -32,7 +32,7 @@ function twenty_twenty_one_add_sub_menu_toggle( $output, $item, $depth, $args )
$output .= '<button class="sub-menu-toggle" aria-expanded="false" onClick="twentytwentyoneExpandSubMenu(this)">';
$output .= '<span class="icon-plus">' . twenty_twenty_one_get_icon_svg( 'ui', 'plus', 18 ) . '</span>';
$output .= '<span class="icon-minus">' . twenty_twenty_one_get_icon_svg( 'ui', 'minus', 18 ) . '</span>';
$output .= '<span class="screen-reader-text">' . esc_html__( 'Open Menu', 'twentytwentyone' ) . '</span>';
$output .= '<span class="screen-reader-text">' . esc_html__( 'Open menu', 'twentytwentyone' ) . '</span>';
$output .= '</button>';
}
return $output;

View File

@ -151,7 +151,7 @@ function twenty_twenty_one_get_starter_content() {
'nav_menus' => array(
// Assign a menu to the "primary" location.
'primary' => array(
'name' => esc_html__( 'Primary Menu', 'twentytwentyone' ),
'name' => esc_html__( 'Primary menu', 'twentytwentyone' ),
'items' => array(
'link_home', // Note that the core "home" page is actually a link in case a static front page is not used.
'page_about',
@ -162,7 +162,7 @@ function twenty_twenty_one_get_starter_content() {
// Assign a menu to the "footer" location.
'footer' => array(
'name' => esc_html__( 'Secondary Menu', 'twentytwentyone' ),
'name' => esc_html__( 'Secondary menu', 'twentytwentyone' ),
'items' => array(
'link_facebook',
'link_twitter',

View File

@ -10,7 +10,7 @@
?>
<?php if ( has_nav_menu( 'primary' ) ) : ?>
<nav id="site-navigation" class="primary-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary Menu', 'twentytwentyone' ); ?>">
<nav id="site-navigation" class="primary-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Primary menu', 'twentytwentyone' ); ?>">
<div class="menu-button-container">
<button id="primary-mobile-menu" class="button" aria-controls="primary-menu-list" aria-expanded="false">
<span class="dropdown-icon open"><?php esc_html_e( 'Menu', 'twentytwentyone' ); ?>

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.6-beta3-49577';
$wp_version = '5.6-beta3-49578';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.