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
This commit is contained in:
parent
2e6178bf3d
commit
d6a1170c70
|
@ -221,8 +221,8 @@ class Plugin_Installer_Skin extends WP_Upgrader_Skin {
|
|||
);
|
||||
|
||||
$table = '<table class="update-from-upload-comparison"><tbody>';
|
||||
$table .= '<tr><th></th><th>' . esc_html( __( 'Current' ) ) . '</th>';
|
||||
$table .= '<th>' . esc_html( __( 'Uploaded' ) ) . '</th></tr>';
|
||||
$table .= '<tr><th></th><th>' . esc_html_x( 'Current', 'plugin' ) . '</th>';
|
||||
$table .= '<th>' . esc_html_x( 'Uploaded', 'plugin' ) . '</th></tr>';
|
||||
|
||||
$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(
|
||||
'<a class="button button-primary update-from-upload-overwrite" href="%s" target="_parent">%s</a>',
|
||||
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;
|
||||
|
|
|
@ -245,7 +245,7 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin {
|
|||
);
|
||||
|
||||
$table = '<table class="update-from-upload-comparison"><tbody>';
|
||||
$table .= '<tr><th></th><th>' . esc_html( __( 'Current' ) ) . '</th><th>' . esc_html( __( 'Uploaded' ) ) . '</th></tr>';
|
||||
$table .= '<tr><th></th><th>' . esc_html_x( 'Current', 'theme' ) . '</th><th>' . esc_html_x( 'Uploaded', 'theme' ) . '</th></tr>';
|
||||
|
||||
$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(
|
||||
'<a class="button button-primary update-from-upload-overwrite" href="%s" target="_parent">%s</a>',
|
||||
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;
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue