Making WordPress.org

Changeset 6405


Ignore:
Timestamp:
01/19/2018 11:58:36 PM (9 years ago)
Author:
obenland
Message:

Plugins: Add translator comments.

Provides more context for strings with placeholders.

Props felipeelia.
Fixes #3204.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-upload.php

    r6287 r6405  
    7979                                        <?php
    8080                                        if ( 1 === ( $plugins->new + $plugins->pending ) ) {
    81                                                  _e( 'Currently there is 1 plugin in the review queue.', 'wporg-plugins' );
     81                                                esc_html_e( 'Currently there is 1 plugin in the review queue.', 'wporg-plugins' );
    8282                                        } else {
    8383                                                printf(
    84                                                         _n(
     84                                                        /* translators: 1: Total amount of pending plugins; 2: Amount of new plugins. */
     85                                                        esc_html( _n(
    8586                                                                'Currently there are %1$s plugins in the review queue, %2$s of which is awaiting its initial review.',
    8687                                                                'Currently there are %1$s plugins in the review queue, %2$s of which are awaiting their initial review.',
    8788                                                                $plugins->new,
    8889                                                                'wporg-plugins'
    89                                                         ),
     90                                                        ) ),
    9091                                                        '<strong>' . ( $plugins->new + $plugins->pending ) . '</strong>',
    9192                                                        '<strong>' . $plugins->new . '</strong>'
     
    102103                                                <?php
    103104                                                if ( 1 === $submitted_counts->total ) {
    104                                                         _e( 'You already have a plugin in the review queue. Please wait for it to be approved before submitting any more.', 'wporg-plugins' );
     105                                                        esc_html_e( 'You already have a plugin in the review queue. Please wait for it to be approved before submitting any more.', 'wporg-plugins' );
    105106                                                } else {
    106107                                                        printf(
    107                                                                 _n(
     108                                                                /* translators: 1: Total amount of plugins; 2: Amount of pending plugins. */
     109                                                                esc_html( _n(
    108110                                                                        'You have %1$s plugins in the review queue, %2$s is being actively reviewed. Please wait for them to be approved before submitting any more.',
    109111                                                                        'You have %1$s plugins in the review queue, %2$s are being actively reviewed. Please wait for them to be approved before submitting any more.',
    110112                                                                        $submitted_counts->pending,
    111113                                                                        'wporg-plugins'
    112                                                                 ),
     114                                                                ) ),
    113115                                                                '<strong>' . $submitted_counts->total . '</strong>',
    114116                                                                '<strong>' . $submitted_counts->pending . '</strong>'
     
    128130                                                <p>
    129131                                                <?php
    130                                                         /* translators: %s: plugins@wordpress.org */
    131132                                                        printf(
     133                                                                /* translators: plugins@wordpress.org */
    132134                                                                __( 'Please wait at least 7 business days before asking for an update status from <a href="mailto:%1$s">%1$s</a>.', 'wporg-plugins' ),
    133135                                                                'plugins@wordpress.org'
     
    162164
    163165                                        <p>
    164                                                 <small><?php printf( __( 'Maximum allowed file size: %s', 'wporg-plugins' ), esc_html( self::get_max_allowed_file_size() ) ); ?></small>
     166                                                <small>
     167                                                        <?php
     168                                                        printf(
     169                                                                /* translators: Maximum allowed file size. */
     170                                                                esc_html__( 'Maximum allowed file size: %s', 'wporg-plugins' ),
     171                                                                esc_html( self::get_max_allowed_file_size() )
     172                                                        );
     173                                                        ?>
     174                                                </small>
    165175                                        </p>
    166176                                </form>
     
    185195                <?php else : ?>
    186196
    187                         <p><?php printf( __( 'Before you can upload a new plugin, <a href="%s">please log in</a>.', 'wporg-plugins' ), esc_url( wp_login_url() ) ); ?></p>
     197                        <p>
     198                        <?php
     199                        printf(
     200                                /* translators: Login URL */
     201                                __( 'Before you can upload a new plugin, <a href="%s">please log in</a>.', 'wporg-plugins' ),
     202                                esc_url( wp_login_url() )
     203                        );
     204                        ?>
     205                        </p>
    188206
    189207                <?php
Note: See TracChangeset for help on using the changeset viewer.