WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/13/2021 05:36:39 PM (8 months ago)
Author:
davidbaumwald
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-plugin-installer-skin.php

    r49675 r50705  
    222222
    223223        $table  = '<table class="update-from-upload-comparison"><tbody>';
    224         $table .= '<tr><th></th><th>' . esc_html( __( 'Current' ) ) . '</th>';
    225         $table .= '<th>' . esc_html( __( 'Uploaded' ) ) . '</th></tr>';
     224        $table .= '<tr><th></th><th>' . esc_html_x( 'Current', 'plugin' ) . '</th>';
     225        $table .= '<th>' . esc_html_x( 'Uploaded', 'plugin' ) . '</th></tr>';
    226226
    227227        $is_same_plugin = true; // Let's consider only these rows.
     
    311311                '<a class="button button-primary update-from-upload-overwrite" href="%s" target="_parent">%s</a>',
    312312                wp_nonce_url( add_query_arg( 'overwrite', $overwrite, $this->url ), 'plugin-upload' ),
    313                 __( 'Replace current with uploaded' )
     313                _x( 'Replace current with uploaded', 'plugin' )
    314314            );
    315315        } else {
Note: See TracChangeset for help on using the changeset viewer.