From 8b74b031c5bcf88cb7aea3623385150b9612adbb Mon Sep 17 00:00:00 2001 From: David Baumwald Date: Tue, 13 Apr 2021 17:36:39 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@50705 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-plugin-installer-skin.php | 6 +++--- src/wp-admin/includes/class-theme-installer-skin.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/class-plugin-installer-skin.php b/src/wp-admin/includes/class-plugin-installer-skin.php index 2067225d7e..1154a81004 100644 --- a/src/wp-admin/includes/class-plugin-installer-skin.php +++ b/src/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/src/wp-admin/includes/class-theme-installer-skin.php b/src/wp-admin/includes/class-theme-installer-skin.php index 41d7798a02..b9eed856d8 100644 --- a/src/wp-admin/includes/class-theme-installer-skin.php +++ b/src/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;
' . esc_html( __( 'Current' ) ) . '' . esc_html( __( 'Uploaded' ) ) . '
' . esc_html_x( 'Current', 'theme' ) . '' . esc_html_x( 'Uploaded', 'theme' ) . '