Making WordPress.org

Changeset 5001


Ignore:
Timestamp:
02/24/2017 06:30:31 PM (10 years ago)
Author:
coffee2code
Message:

Plugin Directory: i18n cleanup.

Props SergeyBiryukov.
Fixes #2534.

Location:
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory
Files:
6 edited

Legend:

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

    r4401 r5001  
    8181
    8282                if ( $num_posts && $num_posts->publish ) {
    83                         $text             = sprintf( _n( '%s Plugin', '%s Plugins', $num_posts->publish ), number_format_i18n( $num_posts->publish ) );
     83                        $text             = sprintf( _n( '%s Plugin', '%s Plugins', $num_posts->publish, 'wporg-plugins' ), number_format_i18n( $num_posts->publish ) );
    8484                        $post_type_object = get_post_type_object( $post_type );
    8585
    … …  
    198198                                'setting' => 'wporg-plugins',
    199199                                'code'    => 'plugins-bulk-rejected',
    200                                 'message' => sprintf( _n( '1 plugin rejected.', '%d plugins rejected.', $rejected, 'wporg-plugins' ), $rejected ),
     200                                'message' => sprintf( _n( '%d plugin rejected.', '%d plugins rejected.', $rejected, 'wporg-plugins' ), $rejected ),
    201201                                'type'    => 'updated',
    202202                        ) ) );
    … …  
    528528                        'in_moderation'        => $counts->moderated,
    529529                        'i18n_comments_text'   => sprintf(
    530                                 _n( '%s Comment', '%s Comments', $counts->approved ),
     530                                _n( '%s Comment', '%s Comments', $counts->approved, 'wporg-plugins' ),
    531531                                number_format_i18n( $counts->approved )
    532532                        ),
    533533                        'i18n_moderation_text' => sprintf(
    534                                 _nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments' ),
     534                                _nx( '%s in moderation', '%s in moderation', $counts->moderated, 'comments', 'wporg-plugins' ),
    535535                                number_format_i18n( $counts->moderated )
    536536                        )
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php

    r4401 r5001  
    362362                                        $user_post_count,
    363363                                        'posts',
    364                                         'wporg-posts'
     364                                        'wporg-plugins'
    365365                                ),
    366366                                number_format_i18n( $user_post_count )
    … …  
    388388                                $total_posts,
    389389                                'posts',
    390                                 'wporg-posts'
     390                                'wporg-plugins'
    391391                        ),
    392392                        number_format_i18n( $total_posts )
    … …  
    442442                                        $this->sticky_posts_count,
    443443                                        'posts',
    444                                         'wporg-posts'
     444                                        'wporg-plugins'
    445445                                ),
    446446                                number_format_i18n( $this->sticky_posts_count )
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author-card.php

    r4605 r5001  
    9797                                echo 'Not a developer on any plugin.';
    9898                        } else {
    99                                 echo '<strong>' . sprintf( _n( '1 plugin:', '%d plugins:', count( $all_plugins ) ), count( $all_plugins ) ) . '</strong>';
     99                                echo '<strong>' . sprintf( _n( '%d plugin:', '%d plugins:', count( $all_plugins ), 'wporg-plugins' ), count( $all_plugins ) ) . '</strong>';
    100100
    101101                                echo '<ul>';
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php

    r5000 r5001  
    2525                        $text = __( 'Less than 10', 'wporg-plugins' );
    2626                } elseif ( $count >= 1000000 ) {
     27                        $million_count = intdiv( $count, 1000000 );
    2728                        /* translators: %d: The integer number of million active installs */
    28                         $text = sprintf( __( '%d+ million', 'wporg-plugins' ), intdiv( $count, 1000000 ) );
     29                        $text = sprintf( _n( '%d+ million', '%d+ million', $million_count, 'wporg-plugins' ), $million_count );
    2930                } else {
    3031                        $text = number_format_i18n( $count ) . '+';
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php

    r4223 r5001  
    6060                        <?php } ?>
    6161                        <?php if ( $tags = get_the_term_list( $post->ID, 'plugin_tags', '<div class="tags">', '', '</div>' ) ) : ?>
    62                                 <li><?php printf( _n( 'Tag: %s', 'Tags: %s', count( get_the_terms( $post, 'plugin_tags' ) ), 'wporg-plugins' ), $tags ); ?></li>
     62                                <li><?php
     63                                        $terms = get_the_terms( $post, 'plugin_tags' );
     64                                        if ( 1 == count( $terms ) ) {
     65                                                printf( __( 'Tag: %s', 'wporg-plugins' ), $tags );
     66                                        } else {
     67                                                printf( __( 'Tags: %s', 'wporg-plugins' ), $tags );
     68                                        }
     69                                ?></li>
    6370                        <?php endif; ?>
    6471                </ul>
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-ratings.php

    r4622 r5001  
    5353                                        <li class="counter-container">
    5454                                                <a href="<?php echo esc_url( 'https://wordpress.org/support/plugin/' . $post->post_name . '/reviews/?filter=' . $stars ); ?>">
    55                                                         <span class="counter-label"><?php printf( _n( '%d star', '%d stars', $stars, 'wporg-plugin' ), $stars ); ?></span>
     55                                                        <span class="counter-label"><?php printf( _n( '%d star', '%d stars', $stars, 'wporg-plugins' ), $stars ); ?></span>
    5656                                        <span class="counter-back">
    5757                                                <span class="counter-bar" style="width: <?php echo $rating_bar_width; ?>%;"></span>
Note: See TracChangeset for help on using the changeset viewer.