Twenty Twenty: Add context to adjectives and homonyms.

This allows for better localization in languages where adjectives are translated differently depending on which noun they modify, or when a different translation is required for a noun vs. a verb.

Props dimadin, justinahinon.
Fixes #49797.
Built from https://develop.svn.wordpress.org/trunk@48861


git-svn-id: http://core.svn.wordpress.org/trunk@48623 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2020-08-26 01:35:11 +00:00
parent 93f7b7fa81
commit 3a85c4741b
5 changed files with 10 additions and 10 deletions

View File

@ -122,8 +122,8 @@ if ( ! class_exists( 'TwentyTwenty_Customize' ) ) {
'section' => 'colors',
'label' => __( 'Primary Color', 'twentytwenty' ),
'choices' => array(
'default' => __( 'Default', 'twentytwenty' ),
'custom' => __( 'Custom', 'twentytwenty' ),
'default' => _x( 'Default', 'color', 'twentytwenty' ),
'custom' => _x( 'Custom', 'color', 'twentytwenty' ),
),
)
);

View File

@ -486,12 +486,12 @@ function twentytwenty_block_editor_settings() {
'color' => twentytwenty_get_color_for_area( 'content', 'accent' ),
),
array(
'name' => __( 'Primary', 'twentytwenty' ),
'name' => _x( 'Primary', 'color', 'twentytwenty' ),
'slug' => 'primary',
'color' => twentytwenty_get_color_for_area( 'content', 'text' ),
),
array(
'name' => __( 'Secondary', 'twentytwenty' ),
'name' => _x( 'Secondary', 'color', 'twentytwenty' ),
'slug' => 'secondary',
'color' => twentytwenty_get_color_for_area( 'content', 'secondary' ),
),

View File

@ -50,7 +50,7 @@
<span class="toggle-icon">
<?php twentytwenty_the_theme_svg( 'search' ); ?>
</span>
<span class="toggle-text"><?php _e( 'Search', 'twentytwenty' ); ?></span>
<span class="toggle-text"><?php _ex( 'Search', 'toggle text', 'twentytwenty' ); ?></span>
</span>
</button><!-- .search-toggle -->
@ -85,7 +85,7 @@
if ( has_nav_menu( 'primary' ) || ! has_nav_menu( 'expanded' ) ) {
?>
<nav class="primary-menu-wrapper" aria-label="<?php esc_attr_e( 'Horizontal', 'twentytwenty' ); ?>" role="navigation">
<nav class="primary-menu-wrapper" aria-label="<?php echo esc_attr_x( 'Horizontal', 'menu', 'twentytwenty' ); ?>" role="navigation">
<ul class="primary-menu reset-list-style">
@ -154,7 +154,7 @@
<button class="toggle search-toggle desktop-search-toggle" data-toggle-target=".search-modal" data-toggle-body-class="showing-search-modal" data-set-focus=".search-modal .search-field" aria-expanded="false">
<span class="toggle-inner">
<?php twentytwenty_the_theme_svg( 'search' ); ?>
<span class="toggle-text"><?php _e( 'Search', 'twentytwenty' ); ?></span>
<span class="toggle-text"><?php _ex( 'Search', 'toggle text', 'twentytwenty' ); ?></span>
</span>
</button><!-- .search-toggle -->

View File

@ -45,7 +45,7 @@
?>
<nav class="expanded-menu<?php echo esc_attr( $expanded_nav_classes ); ?>" aria-label="<?php esc_attr_e( 'Expanded', 'twentytwenty' ); ?>" role="navigation">
<nav class="expanded-menu<?php echo esc_attr( $expanded_nav_classes ); ?>" aria-label="<?php echo esc_attr_x( 'Expanded', 'menu', 'twentytwenty' ); ?>" role="navigation">
<ul class="modal-menu reset-list-style">
<?php
@ -70,7 +70,7 @@
if ( 'expanded' !== $mobile_menu_location ) {
?>
<nav class="mobile-menu" aria-label="<?php esc_attr_e( 'Mobile', 'twentytwenty' ); ?>" role="navigation">
<nav class="mobile-menu" aria-label="<?php echo esc_attr_x( 'Mobile', 'menu', 'twentytwenty' ); ?>" role="navigation">
<ul class="modal-menu reset-list-style">

View File

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