Make WordPress Core


Ignore:
Timestamp:
02/26/2024 08:33:46 PM (16 months ago)
Author:
swissspidy
Message:

Upgrade/Install: Improve localized strings related to plugin/theme installation and activation.

Adds context to strings where applicable to disambiguate them, coherently throughout the admin. Also improves some of the strings introduced in [57545] to ease localization.

Props swissspidy, costdev.
Fixes #60630. See #22316.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/plugin-install.php

    r57658 r57714  
    362362        </label>
    363363        <input type="file" id="pluginzip" name="pluginzip" accept=".zip" />
    364         <?php submit_button( __( 'Install Now' ), '', 'install-plugin-submit', false ); ?>
     364        <?php submit_button( _x( 'Install Now', 'plugin' ), '', 'install-plugin-submit', false ); ?>
    365365    </form>
    366366</div>
     
    888888        $button = str_replace( 'class="', 'class="right ', $button );
    889889
    890         if ( ! str_contains( $button, __( 'Activate' ) ) ) {
     890        if ( ! str_contains( $button, _x( 'Activate', 'plugin' ) ) ) {
    891891            $button = str_replace( 'class="', 'id="plugin_install_from_iframe" class="', $button );
    892892        }
     
    955955        esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $name ) ),
    956956        esc_attr( $name ),
    957         __( 'Install Now' )
     957        _x( 'Install Now', 'plugin' )
    958958    );
    959959
     
    970970                            esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $name ) ),
    971971                            esc_attr( $name ),
    972                             __( 'Install Now' )
     972                            _x( 'Install Now', 'plugin' )
    973973                        );
    974974                    } else {
     
    992992                            esc_attr( sprintf( _x( 'Update %s now', 'plugin' ), $name ) ),
    993993                            esc_attr( $name ),
    994                             __( 'Update Now' )
     994                            _x( 'Update Now', 'plugin' )
    995995                        );
    996996                    } else {
     
    10121012                } elseif ( current_user_can( 'activate_plugin', $status['file'] ) ) {
    10131013                    if ( $compatible_php && $compatible_wp && $all_plugin_dependencies_active ) {
    1014                         $button_text = __( 'Activate' );
     1014                        $button_text = _x( 'Activate', 'plugin' );
    10151015                        /* translators: %s: Plugin name. */
    10161016                        $button_label = _x( 'Activate %s', 'plugin' );
     
    10251025
    10261026                        if ( is_network_admin() ) {
    1027                             $button_text = __( 'Network Activate' );
     1027                            $button_text = _x( 'Network Activate', 'plugin' );
    10281028                            /* translators: %s: Plugin name. */
    10291029                            $button_label = _x( 'Network Activate %s', 'plugin' );
     
    10431043                        $button = sprintf(
    10441044                            '<button type="button" class="button button-disabled" disabled="disabled">%s</button>',
    1045                             is_network_admin() ? _x( 'Network Activate %s', 'plugin' ) : _x( 'Activate', 'plugin' )
     1045                            is_network_admin() ? _x( 'Network Activate', 'plugin' ) : _x( 'Activate', 'plugin' )
    10461046                        );
    10471047                    }
Note: See TracChangeset for help on using the changeset viewer.