From e4ce35dd119b85da3b9bb8daa603263b51ffb8df Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 20 Jul 2020 23:14:05 +0000 Subject: [PATCH] I18N: Add context to some plugin and theme strings for consistency. Props ramiy, audrasjb. Fixes #50710. Built from https://develop.svn.wordpress.org/trunk@48520 git-svn-id: http://core.svn.wordpress.org/trunk@48282 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/import.php | 2 +- wp-admin/includes/class-wp-plugin-install-list-table.php | 4 ++-- wp-admin/includes/class-wp-theme-install-list-table.php | 2 +- wp-admin/includes/deprecated.php | 2 +- wp-admin/includes/theme.php | 2 +- wp-admin/includes/update.php | 4 ++-- wp-admin/js/updates.js | 4 ++-- wp-admin/theme-install.php | 4 ++-- wp-includes/version.php | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/wp-admin/import.php b/wp-admin/import.php index 7326f185c1..e732c55b8f 100644 --- a/wp-admin/import.php +++ b/wp-admin/import.php @@ -156,7 +156,7 @@ if ( empty( $importers ) ) { esc_attr( $plugin_slug ), esc_attr( $data[0] ), /* translators: %s: Importer name. */ - esc_attr( sprintf( __( 'Install %s now' ), $data[0] ) ), + esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $data[0] ) ), __( 'Install Now' ) ); } else { diff --git a/wp-admin/includes/class-wp-plugin-install-list-table.php b/wp-admin/includes/class-wp-plugin-install-list-table.php index e22f203e2b..fe160cbd8b 100644 --- a/wp-admin/includes/class-wp-plugin-install-list-table.php +++ b/wp-admin/includes/class-wp-plugin-install-list-table.php @@ -528,7 +528,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { esc_attr( $plugin['slug'] ), esc_url( $status['url'] ), /* translators: %s: Plugin name and version. */ - esc_attr( sprintf( __( 'Install %s now' ), $name ) ), + esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $name ) ), esc_attr( $name ), __( 'Install Now' ) ); @@ -550,7 +550,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table { esc_attr( $plugin['slug'] ), esc_url( $status['url'] ), /* translators: %s: Plugin name and version. */ - esc_attr( sprintf( __( 'Update %s now' ), $name ) ), + esc_attr( sprintf( _x( 'Update %s now', 'plugin' ), $name ) ), esc_attr( $name ), __( 'Update Now' ) ); diff --git a/wp-admin/includes/class-wp-theme-install-list-table.php b/wp-admin/includes/class-wp-theme-install-list-table.php index 98eb212b26..37ee8d459d 100644 --- a/wp-admin/includes/class-wp-theme-install-list-table.php +++ b/wp-admin/includes/class-wp-theme-install-list-table.php @@ -323,7 +323,7 @@ class WP_Theme_Install_List_Table extends WP_Themes_List_Table { '%s', esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ), /* translators: %s: Theme name. */ - esc_attr( sprintf( __( 'Install %s' ), $name ) ), + esc_attr( sprintf( _x( 'Install %s', 'theme' ), $name ) ), __( 'Install Now' ) ); break; diff --git a/wp-admin/includes/deprecated.php b/wp-admin/includes/deprecated.php index 47201332dd..ede053de6f 100644 --- a/wp-admin/includes/deprecated.php +++ b/wp-admin/includes/deprecated.php @@ -1379,7 +1379,7 @@ function wp_dashboard_plugins_output( $rss, $args = array() ) { echo '
  • ' . __( 'Popular Plugin' ) . ': ' . esc_html( $raw_title ) . ' (' . __( 'Install' ) . ')
  • '; + esc_attr( sprintf( _x( 'Install %s', 'plugin' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')'; $feed->__destruct(); unset( $feed ); diff --git a/wp-admin/includes/theme.php b/wp-admin/includes/theme.php index 1839c939cb..adf642867c 100644 --- a/wp-admin/includes/theme.php +++ b/wp-admin/includes/theme.php @@ -240,7 +240,7 @@ function get_theme_update_available( $theme ) { sprintf( 'aria-label="%s" id="update-theme" data-slug="%s"', /* translators: %s: Theme name. */ - esc_attr( sprintf( __( 'Update %s now' ), $theme_name ) ), + esc_attr( sprintf( _x( 'Update %s now', 'theme' ), $theme_name ) ), $stylesheet ) ); diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 0d9fab024b..8a588921f0 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -509,7 +509,7 @@ function wp_plugin_update_row( $file, $plugin_data ) { sprintf( 'class="update-link" aria-label="%s"', /* translators: %s: Plugin name. */ - esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) ) + esc_attr( sprintf( _x( 'Update %s now', 'plugin' ), $plugin_name ) ) ) ); } else { @@ -694,7 +694,7 @@ function wp_theme_update_row( $theme_key, $theme ) { sprintf( 'class="update-link" aria-label="%s"', /* translators: %s: Theme name. */ - esc_attr( sprintf( __( 'Update %s now' ), $theme['Name'] ) ) + esc_attr( sprintf( _x( 'Update %s now', 'theme' ), $theme['Name'] ) ) ) ); } diff --git a/wp-admin/js/updates.js b/wp-admin/js/updates.js index 6990ce8e59..4cf5f46078 100644 --- a/wp-admin/js/updates.js +++ b/wp-admin/js/updates.js @@ -813,8 +813,8 @@ 'aria-label', sprintf( /* translators: %s: Plugin name. */ - _x( 'Install %s now', 'plugin' ), - pluginName + _x( 'Install %s now', 'plugin' ), + pluginName ) ) .text( __( 'Install Now' ) ); diff --git a/wp-admin/theme-install.php b/wp-admin/theme-install.php index 89ac910e9c..3746d0040e 100644 --- a/wp-admin/theme-install.php +++ b/wp-admin/theme-install.php @@ -323,14 +323,14 @@ if ( $tab ) { <# if ( data.compatible_wp && data.compatible_php ) { #> <# } else { #> diff --git a/wp-includes/version.php b/wp-includes/version.php index d2cc4b04db..26421ac0dc 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.5-beta2-48519'; +$wp_version = '5.5-beta2-48520'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.