Making WordPress.org


Ignore:
Timestamp:
01/12/2018 03:47:10 AM (7 years ago)
Author:
dd32
Message:

BuddyPress.org: Localise strings in the BuddyPress theme.

Props SergeyBiryukov, ramiy.
Fixes #1284.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/buddypress.org/public_html/wp-content/themes/buddypress-org/page-plugins.php

    r1644 r6364  
    1313                    <div class="bbp-pagination-count">
    1414
    15                         <?php printf( 'Viewing %1$s to %2$s (%3$s)', number_format_i18n( $from_num ), number_format_i18n( $to_num ), number_format_i18n( $plugins->info['results'] ) ); ?>
     15                        <?php
     16                            /* translators: 1: starting number of plugins, 2: ending number, 3: total number */
     17                            printf( __( 'Viewing %1$s to %2$s (%3$s)', 'bporg' ),
     18                                number_format_i18n( $from_num ),
     19                                number_format_i18n( $to_num ),
     20                                number_format_i18n( $plugins->info['results'] )
     21                            );
     22                        ?>
    1623
    1724                    </div>
     
    4148                        $plugin_author_id = 0;
    4249
    43                         if ( !empty( $plugin->contributors ) ) {
     50                        if ( ! empty( $plugin->contributors ) ) {
    4451                            $plugin_author    = get_user_by( 'login', key( $plugin->contributors ) );
    4552                            $plugin_author_id = $plugin_author->ID;
     
    4855
    4956                <div class="single-plugin">
    50                     <h3 class="plugin-title"><a href="<?php echo esc_url( 'https://wordpress.org/extend/plugins/' . $plugin->slug ); ?>/" title="Plugin Information"><?php echo esc_html( $plugin->name ); ?></a></h3>
     57                    <h3 class="plugin-title"><a href="<?php echo esc_url( 'https://wordpress.org/plugins/' . $plugin->slug ); ?>/"><?php echo esc_html( $plugin->name ); ?></a></h3>
    5158
    5259                    <div class="plugin-meta">
    53                         <?php if ( !empty( $plugin->version  ) ) : ?><div>Version: <?php echo esc_html( $plugin->version ); ?></div><?php if ( !empty( $plugin->requires ) ) : ?><?php endif; ?><?php endif; ?>
    54                         <?php if ( !empty( $plugin->requires ) ) : ?><div>Requires: <?php echo esc_html( $plugin->requires ); ?></div><?php if ( !empty( $plugin->tested ) ) : ?><?php endif; ?><?php endif; ?>
    55                         <?php if ( !empty( $plugin->tested   ) ) : ?><div>Compatible up to: <?php echo esc_html( $plugin->tested ); ?></div><?php endif; ?>
    56                         <div>Rating: <?php echo $plugin->rating_html; // raw html - do not escape ?></div>
     60                        <?php if ( ! empty( $plugin->version ) ) : ?>
     61                            <div><?php _e( 'Version:', 'bporg' ); ?> <?php echo esc_html( $plugin->version ); ?></div>
     62                        <?php endif; ?>
     63                        <?php if ( ! empty( $plugin->requires ) ) : ?>
     64                            <div><?php _e( 'Requires:', 'bporg' ); ?> <?php echo esc_html( $plugin->requires ); ?></div>
     65                        <?php endif; ?>
     66                        <?php if ( ! empty( $plugin->tested ) ) : ?>
     67                            <div><?php _e( 'Compatible up to:', 'bporg' ); ?> <?php echo esc_html( $plugin->tested ); ?></div>
     68                        <?php endif; ?>
     69                        <div><?php _e( 'Rating:', 'bporg' ); ?> <?php echo $plugin->rating_html; // raw html - do not escape ?></div>
    5770                    </div>
    5871
     
    6881                    <div class="bbp-pagination-count">
    6982
    70                         <?php printf( 'Viewing %1$s to %2$s (%3$s)', number_format_i18n( $from_num ), number_format_i18n( $to_num ), number_format_i18n( $plugins->info['results'] ) ); ?>
     83                        <?php
     84                            /* translators: 1: starting number of plugins, 2: ending number, 3: total number */
     85                            printf( __( 'Viewing %1$s to %2$s (%3$s)', 'bporg' ),
     86                                number_format_i18n( $from_num ),
     87                                number_format_i18n( $to_num ),
     88                                number_format_i18n( $plugins->info['results'] )
     89                            );
     90                        ?>
    7191
    7292                    </div>
Note: See TracChangeset for help on using the changeset viewer.