Make WordPress Core

Changeset 38071


Ignore:
Timestamp:
07/16/2016 11:19:05 PM (8 years ago)
Author:
SergeyBiryukov
Message:

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

See #37290.

Location:
trunk/src/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-themes-list-table.php

    r37714 r38071  
    473473
    474474            /* translators: %s: theme name */
    475             $aria_label = sprintf( __( 'Delete %s' ), $theme->display( 'Name' ) );
     475            $aria_label = sprintf( _x( 'Delete %s', 'theme' ), $theme->display( 'Name' ) );
    476476
    477477            $actions['delete'] = sprintf( '<a href="%s" class="delete" aria-label="%s">%s</a>',
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r37714 r38071  
    492492                                esc_url( $activate_url ),
    493493                                /* translators: %s: Plugin name */
    494                                 esc_attr( sprintf( __( 'Activate %s' ), $plugin['name'] ) ),
     494                                esc_attr( sprintf( _x( 'Activate %s', 'plugin' ), $plugin['name'] ) ),
    495495                                $button_text
    496496                            );
  • trunk/src/wp-admin/includes/class-wp-plugins-list-table.php

    r38033 r38071  
    601601                    if ( current_user_can( 'manage_network_plugins' ) ) {
    602602                        /* translators: %s: plugin name */
    603                         $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>';
     603                        $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>';
    604604                        }
    605605                } else {
    606606                    if ( current_user_can( 'manage_network_plugins' ) ) {
    607607                        /* translators: %s: plugin name */
    608                         $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>';
     608                        $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>';
    609609                    }
    610610                    if ( current_user_can( 'delete_plugins' ) && ! is_plugin_active( $plugin_file ) ) {
    611611                        /* translators: %s: plugin name */
    612                         $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>';
     612                        $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>';
    613613                    }
    614614                }
     
    624624                } elseif ( $is_active ) {
    625625                    /* translators: %s: plugin name */
    626                     $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>';
     626                    $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>';
    627627                } else {
    628628                    /* translators: %s: plugin name */
    629                     $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>';
     629                    $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>';
    630630
    631631                    if ( ! is_multisite() && current_user_can( 'delete_plugins' ) ) {
    632632                        /* translators: %s: plugin name */
    633                         $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>';
     633                        $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>';
    634634                    }
    635635                } // end if $is_active
  • trunk/src/wp-admin/theme-install.php

    r38057 r38071  
    251251            <?php
    252252            /* translators: %s: Theme name */
    253             $aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' );
     253            $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
    254254            ?>
    255255            <# if ( data.activate_url ) { #>
  • trunk/src/wp-admin/themes.php

    r38057 r38071  
    280280        <?php
    281281        /* translators: %s: Theme name */
    282         $aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' );
     282        $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
    283283        ?>
    284284        <a class="button button-secondary activate" href="<?php echo $theme['actions']['activate']; ?>" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Activate' ); ?></a>
     
    409409            <?php
    410410            /* translators: %s: Theme name */
    411             $aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' );
     411            $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
    412412            ?>
    413413            <a class="button button-secondary activate" href="{{{ data.actions.activate }}}" aria-label="<?php echo $aria_label; ?>"><?php _e( 'Activate' ); ?></a>
     
    467467                <?php
    468468                /* translators: %s: Theme name */
    469                 $aria_label = sprintf( __( 'Activate %s' ), '{{ data.name }}' );
     469                $aria_label = sprintf( _x( 'Activate %s', 'theme' ), '{{ data.name }}' );
    470470                ?>
    471471                <# if ( data.actions.activate ) { #>
Note: See TracChangeset for help on using the changeset viewer.