From d6a1170c707a27ea77d36dea9a6b89d956ffaf08 Mon Sep 17 00:00:00 2001 From: davidbaumwald Date: Tue, 13 Apr 2021 17:38:05 +0000 Subject: [PATCH] I18N: Add context to strings when updating a plugin or theme with a ZIP package. After [48390], plugins and themes can be updated with an uploaded ZIP file. Strings were added for comparing the "current" and "uploaded" versions of a plugin or theme, but lacked context for each as to the object being referenced. This change adds a `plugin` or `theme` context to each of these strings for disambiguation. Props dimadin, SergeyBiryukov. Fixes #53017. Built from https://develop.svn.wordpress.org/trunk@50705 git-svn-id: http://core.svn.wordpress.org/trunk@50314 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-plugin-installer-skin.php | 6 +++--- wp-admin/includes/class-theme-installer-skin.php | 4 ++-- wp-includes/version.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/class-plugin-installer-skin.php b/wp-admin/includes/class-plugin-installer-skin.php index 2067225d7e..1154a81004 100644 --- a/wp-admin/includes/class-plugin-installer-skin.php +++ b/wp-admin/includes/class-plugin-installer-skin.php @@ -221,8 +221,8 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { ); $table = ''; - $table .= ''; - $table .= ''; + $table .= ''; + $table .= ''; $is_same_plugin = true; // Let's consider only these rows. @@ -310,7 +310,7 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin { $install_actions['overwrite_plugin'] = sprintf( '%s', wp_nonce_url( add_query_arg( 'overwrite', $overwrite, $this->url ), 'plugin-upload' ), - __( 'Replace current with uploaded' ) + _x( 'Replace current with uploaded', 'plugin' ) ); } else { echo $blocked_message; diff --git a/wp-admin/includes/class-theme-installer-skin.php b/wp-admin/includes/class-theme-installer-skin.php index 41d7798a02..b9eed856d8 100644 --- a/wp-admin/includes/class-theme-installer-skin.php +++ b/wp-admin/includes/class-theme-installer-skin.php @@ -245,7 +245,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { ); $table = '
' . esc_html( __( 'Current' ) ) . '' . esc_html( __( 'Uploaded' ) ) . '
' . esc_html_x( 'Current', 'plugin' ) . '' . esc_html_x( 'Uploaded', 'plugin' ) . '
'; - $table .= ''; + $table .= ''; $is_same_theme = true; // Let's consider only these rows. @@ -345,7 +345,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { $install_actions['overwrite_theme'] = sprintf( '%s', wp_nonce_url( add_query_arg( 'overwrite', $overwrite, $this->url ), 'theme-upload' ), - __( 'Replace current with uploaded' ) + _x( 'Replace current with uploaded', 'theme' ) ); } else { echo $blocked_message; diff --git a/wp-includes/version.php b/wp-includes/version.php index fa934b1825..57918d9d97 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-alpha-50704'; +$wp_version = '5.8-alpha-50705'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
' . esc_html( __( 'Current' ) ) . '' . esc_html( __( 'Uploaded' ) ) . '
' . esc_html_x( 'Current', 'theme' ) . '' . esc_html_x( 'Uploaded', 'theme' ) . '