From ad9f02ed809ddce2daa6c697d620644adf9ccafe Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 26 Aug 2020 01:33:45 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@48861 602fd350-edb4-49c9-b593-d223f7449a82 --- .../twentytwenty/classes/class-twentytwenty-customize.php | 4 ++-- src/wp-content/themes/twentytwenty/functions.php | 4 ++-- src/wp-content/themes/twentytwenty/header.php | 6 +++--- .../themes/twentytwenty/template-parts/modal-menu.php | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php b/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php index 6d5e4feea1..c6f0d7d869 100644 --- a/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php +++ b/src/wp-content/themes/twentytwenty/classes/class-twentytwenty-customize.php @@ -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' ), ), ) ); diff --git a/src/wp-content/themes/twentytwenty/functions.php b/src/wp-content/themes/twentytwenty/functions.php index 8f7826dd98..adcef29f1a 100644 --- a/src/wp-content/themes/twentytwenty/functions.php +++ b/src/wp-content/themes/twentytwenty/functions.php @@ -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' ), ), diff --git a/src/wp-content/themes/twentytwenty/header.php b/src/wp-content/themes/twentytwenty/header.php index 7095b4a8a9..dd63f33767 100644 --- a/src/wp-content/themes/twentytwenty/header.php +++ b/src/wp-content/themes/twentytwenty/header.php @@ -50,7 +50,7 @@ - + @@ -85,7 +85,7 @@ if ( has_nav_menu( 'primary' ) || ! has_nav_menu( 'expanded' ) ) { ?> -