I18N: After [38057], consistently use a context for other instances of `Activate %s`, `Network Activate %s`, and `Delete %s` strings.

See #37290.
Built from https://develop.svn.wordpress.org/trunk@38071


git-svn-id: http://core.svn.wordpress.org/trunk@38012 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov 2016-07-16 23:20:29 +00:00
parent 50a39d4b1f
commit 0be3a84ad0
6 changed files with 13 additions and 13 deletions

View File

@ -472,7 +472,7 @@ class WP_MS_Themes_List_Table extends WP_List_Table {
), 'themes.php' ); ), 'themes.php' );
/* translators: %s: theme name */ /* translators: %s: theme name */
$aria_label = sprintf( __( 'Delete %s' ), $theme->display( 'Name' ) ); $aria_label = sprintf( _x( 'Delete %s', 'theme' ), $theme->display( 'Name' ) );
$actions['delete'] = sprintf( '<a href="%s" class="delete" aria-label="%s">%s</a>', $actions['delete'] = sprintf( '<a href="%s" class="delete" aria-label="%s">%s</a>',
esc_url( wp_nonce_url( $url, 'bulk-themes' ) ), esc_url( wp_nonce_url( $url, 'bulk-themes' ) ),

View File

@ -491,7 +491,7 @@ class WP_Plugin_Install_List_Table extends WP_List_Table {
'<a href="%1$s" class="button activate-now button-secondary" aria-label="%2$s">%3$s</a>', '<a href="%1$s" class="button activate-now button-secondary" aria-label="%2$s">%3$s</a>',
esc_url( $activate_url ), esc_url( $activate_url ),
/* translators: %s: Plugin name */ /* translators: %s: Plugin name */
esc_attr( sprintf( __( 'Activate %s' ), $plugin['name'] ) ), esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin['name'] ) ),
$button_text $button_text
); );
} else { } else {

View File

@ -600,16 +600,16 @@ class WP_Plugins_List_Table extends WP_List_Table {
if ( $is_active ) { if ( $is_active ) {
if ( current_user_can( 'manage_network_plugins' ) ) { if ( current_user_can( 'manage_network_plugins' ) ) {
/* translators: %s: plugin name */ /* translators: %s: plugin name */
$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( __( 'Network deactivate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>'; $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Network deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Deactivate' ) . '</a>';
} }
} else { } else {
if ( current_user_can( 'manage_network_plugins' ) ) { if ( current_user_can( 'manage_network_plugins' ) ) {
/* translators: %s: plugin name */ /* translators: %s: plugin name */
$actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Network Activate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Activate' ) . '</a>'; $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Network Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Network Activate' ) . '</a>';
} }
if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) { if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) {
/* translators: %s: plugin name */ /* translators: %s: plugin name */
$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( __( 'Delete %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>'; $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
} }
} }
} else { } else {
@ -623,14 +623,14 @@ class WP_Plugins_List_Table extends WP_List_Table {
); );
} elseif ( $is_active ) { } elseif ( $is_active ) {
/* translators: %s: plugin name */ /* translators: %s: plugin name */
$actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( __( 'Deactivate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>'; $actions['deactivate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=deactivate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'deactivate-plugin_' . $plugin_file ) . '" aria-label="' . esc_attr( sprintf( _x( 'Deactivate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Deactivate' ) . '</a>';
} else { } else {
/* translators: %s: plugin name */ /* translators: %s: plugin name */
$actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( __( 'Activate %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>'; $actions['activate'] = '<a href="' . wp_nonce_url( 'plugins.php?action=activate&amp;plugin=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'activate-plugin_' . $plugin_file ) . '" class="edit" aria-label="' . esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Activate' ) . '</a>';
if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) { if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) {
/* translators: %s: plugin name */ /* translators: %s: plugin name */
$actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( __( 'Delete %s' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>'; $actions['delete'] = '<a href="' . wp_nonce_url( 'plugins.php?action=delete-selected&amp;checked[]=' . $plugin_file . '&amp;plugin_status=' . $context . '&amp;paged=' . $page . '&amp;s=' . $s, 'bulk-plugins' ) . '" class="delete" aria-label="' . esc_attr( sprintf( _x( 'Delete %s', 'plugin' ), $plugin_data['Name'] ) ) . '">' . __( 'Delete' ) . '</a>';
} }
} // end if $is_active } // end if $is_active

View File

@ -250,7 +250,7 @@ if ( $tab ) {
<# if ( data.installed ) { #> <# if ( data.installed ) { #>
<?php <?php
/* translators: %s: Theme name */ /* translators: %s: Theme name */
$aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' ); $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?> ?>
<# if ( data.activate_url ) { #> <# if ( data.activate_url ) { #>
<a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a> <a class="button button-primary activate" href="{{ data.activate_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>

View File

@ -279,7 +279,7 @@ foreach ( $themes as $theme ) :
<?php } else { ?> <?php } else { ?>
<?php <?php
/* translators: %s: Theme name */ /* translators: %s: Theme name */
$aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' ); $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?> ?>
<a class="button button-secondary activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a> <a class="button button-secondary activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
<?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?> <?php if ( current_user_can( 'edit_theme_options' ) && current_user_can( 'customize' ) ) { ?>
@ -408,7 +408,7 @@ $can_install = current_user_can( 'install_themes' );
<# } else { #> <# } else { #>
<?php <?php
/* translators: %s: Theme name */ /* translators: %s: Theme name */
$aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' ); $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?> ?>
<a class="button button-secondary activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a> <a class="button button-secondary activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
<a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a> <a class="button button-primary load-customize hide-if-no-customize" href="{{{ data.actions.customize }}}"><?php _e( 'Live Preview' ); ?></a>
@ -466,7 +466,7 @@ $can_install = current_user_can( 'install_themes' );
<div class="inactive-theme"> <div class="inactive-theme">
<?php <?php
/* translators: %s: Theme name */ /* translators: %s: Theme name */
$aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' ); $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
?> ?>
<# if ( data.actions.activate ) { #> <# if ( data.actions.activate ) { #>
<a href="{{{ data.actions.activate }}}" class="button button-secondary activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a> <a href="{{{ data.actions.activate }}}" class="button button-secondary activate" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.6-beta3-38070'; $wp_version = '4.6-beta3-38071';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.