Make WordPress Core

Changeset 48520


Ignore:
Timestamp:
07/20/2020 11:12:33 PM (6 years ago)
Author:
SergeyBiryukov
Message:

I18N: Add context to some plugin and theme strings for consistency.

Props ramiy, audrasjb.
Fixes #50710.

Location:
trunk/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/_enqueues/wp/updates.js

    r48479 r48520  
    814814                                sprintf(
    815815                                        /* translators: %s: Plugin name. */
    816                                          _x( 'Install %s now', 'plugin' ),
    817                                          pluginName
     816                                        _x( 'Install %s now', 'plugin' ),
     817                                        pluginName
    818818                                )
    819819                        )
  • trunk/src/wp-admin/import.php

    r48115 r48520  
    157157                                                esc_attr( $data[0] ),
    158158                                                /* translators: %s: Importer name. */
    159                                                 esc_attr( sprintf( __( 'Install %s now' ), $data[0] ) ),
     159                                                esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $data[0] ) ),
    160160                                                __( 'Install Now' )
    161161                                        );
  • trunk/src/wp-admin/includes/class-wp-plugin-install-list-table.php

    r48105 r48520  
    529529                                                                        esc_url( $status['url'] ),
    530530                                                                        /* translators: %s: Plugin name and version. */
    531                                                                         esc_attr( sprintf( __( 'Install %s now' ), $name ) ),
     531                                                                        esc_attr( sprintf( _x( 'Install %s now', 'plugin' ), $name ) ),
    532532                                                                        esc_attr( $name ),
    533533                                                                        __( 'Install Now' )
    … …  
    551551                                                                        esc_url( $status['url'] ),
    552552                                                                        /* translators: %s: Plugin name and version. */
    553                                                                         esc_attr( sprintf( __( 'Update %s now' ), $name ) ),
     553                                                                        esc_attr( sprintf( _x( 'Update %s now', 'plugin' ), $name ) ),
    554554                                                                        esc_attr( $name ),
    555555                                                                        __( 'Update Now' )
  • trunk/src/wp-admin/includes/class-wp-theme-install-list-table.php

    r48292 r48520  
    324324                                        esc_url( wp_nonce_url( $install_url, 'install-theme_' . $theme->slug ) ),
    325325                                        /* translators: %s: Theme name. */
    326                                         esc_attr( sprintf( __( 'Install %s' ), $name ) ),
     326                                        esc_attr( sprintf( _x( 'Install %s', 'theme' ), $name ) ),
    327327                                        __( 'Install Now' )
    328328                                );
  • trunk/src/wp-admin/includes/deprecated.php

    r48121 r48520  
    13801380                        '&nbsp;<a href="' . $ilink . '" class="thickbox open-plugin-details-modal" aria-label="' .
    13811381                        /* translators: %s: Plugin name. */
    1382                         esc_attr( sprintf( __( 'Install %s' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>';
     1382                        esc_attr( sprintf( _x( 'Install %s', 'plugin' ), $raw_title ) ) . '">(' . __( 'Install' ) . ')</a></li>';
    13831383
    13841384                $feed->__destruct();
  • trunk/src/wp-admin/includes/theme.php

    r48109 r48520  
    241241                                                'aria-label="%s" id="update-theme" data-slug="%s"',
    242242                                                /* translators: %s: Theme name. */
    243                                                 esc_attr( sprintf( __( 'Update %s now' ), $theme_name ) ),
     243                                                esc_attr( sprintf( _x( 'Update %s now', 'theme' ), $theme_name ) ),
    244244                                                $stylesheet
    245245                                        )
  • trunk/src/wp-admin/includes/update.php

    r48316 r48520  
    510510                                                'class="update-link" aria-label="%s"',
    511511                                                /* translators: %s: Plugin name. */
    512                                                 esc_attr( sprintf( __( 'Update %s now' ), $plugin_name ) )
     512                                                esc_attr( sprintf( _x( 'Update %s now', 'plugin' ), $plugin_name ) )
    513513                                        )
    514514                                );
    … …  
    695695                                'class="update-link" aria-label="%s"',
    696696                                /* translators: %s: Theme name. */
    697                                 esc_attr( sprintf( __( 'Update %s now' ), $theme['Name'] ) )
     697                                esc_attr( sprintf( _x( 'Update %s now', 'theme' ), $theme['Name'] ) )
    698698                        )
    699699                );
  • trunk/src/wp-admin/theme-install.php

    r48111 r48520  
    324324                                        <?php
    325325                                        /* translators: %s: Theme name. */
    326                                         $aria_label = sprintf( __( 'Install %s' ), '{{ data.name }}' );
     326                                        $aria_label = sprintf( _x( 'Install %s', 'theme' ), '{{ data.name }}' );
    327327                                        ?>
    328328                                        <a class="button button-primary theme-install" data-name="{{ data.name }}" data-slug="{{ data.id }}" href="{{ data.install_url }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _e( 'Install' ); ?></a>
    … …  
    331331                                        <?php
    332332                                        /* translators: %s: Theme name. */
    333                                         $aria_label = sprintf( __( 'Cannot Install %s' ), '{{ data.name }}' );
     333                                        $aria_label = sprintf( _x( 'Cannot Install %s', 'theme' ), '{{ data.name }}' );
    334334                                        ?>
    335335                                        <a class="button button-primary disabled" data-name="{{ data.name }}" aria-label="<?php echo esc_attr( $aria_label ); ?>"><?php _ex( 'Cannot Install', 'theme' ); ?></a>
Note: See TracChangeset for help on using the changeset viewer.