Making WordPress.org

Ticket #2534: meta-2534.patch

File meta-2534.patch, 6.9 KB (added by SergeyBiryukov, 7 years ago)
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/class-customizations.php

     
    8080                $num_posts = wp_count_posts( $post_type );
    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
    8686                        if ( $post_type_object && current_user_can( $post_type_object->cap->edit_posts ) ) {
     
    197197                        set_transient( 'settings_errors', array( array(
    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                        ) ) );
    203203                }
     
    527527                $response['supplemental'] = array(
    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                        )
    537537                );
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/list-table/class-plugin-posts.php

     
    361361                                        'Mine <span class="count">(%s)</span>',
    362362                                        $user_post_count,
    363363                                        'posts',
    364                                         'wporg-posts'
     364                                        'wporg-plugins'
    365365                                ),
    366366                                number_format_i18n( $user_post_count )
    367367                        );
     
    387387                                'All <span class="count">(%s)</span>',
    388388                                $total_posts,
    389389                                'posts',
    390                                 'wporg-posts'
     390                                'wporg-plugins'
    391391                        ),
    392392                        number_format_i18n( $total_posts )
    393393                );
     
    441441                                        'Sticky <span class="count">(%s)</span>',
    442442                                        $this->sticky_posts_count,
    443443                                        'posts',
    444                                         'wporg-posts'
     444                                        'wporg-plugins'
    445445                                ),
    446446                                number_format_i18n( $this->sticky_posts_count )
    447447                        );
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/admin/metabox/class-author-card.php

     
    9696                        if ( empty( $author_commit ) && empty( $author_plugins ) ) {
    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>';
    102102                                foreach ( $all_plugins as $plugin ) {
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-template.php

     
    2424                if ( $count <= 10 ) {
    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 ) . '+';
    3132                }
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-meta.php

     
    5959                                <li><?php printf( __( 'Tested up to: %s', 'wporg-plugins' ), '<strong>' . $tested_up_to . '</strong>' ); ?></li>
    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>
    6572
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/widgets/class-ratings.php

     
    5252                                        ?>
    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>
    5858                                        </span>