Skip to:
Content

BuddyPress.org

Changeset 12588


Ignore:
Timestamp:
03/28/2020 01:35:36 PM (5 years ago)
Author:
imath
Message:

BP Core: add missing /* translators */ comments

See #8260

Location:
trunk/src/bp-core
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/admin/bp-core-admin-components.php

    r11914 r12588  
    143143            $current_components = $retired_components;
    144144            break;
    145     } ?>
     145    }
     146
     147    $component_views = array(
     148        array(
     149            'action' => 'all',
     150            'view'   => sprintf(
     151                /* translators: %s: the number of installed components */
     152                _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $all_count, 'plugins', 'buddypress' ),
     153                number_format_i18n( $all_count )
     154            ),
     155        ),
     156        array(
     157            'action' => 'active',
     158            'view'   => sprintf(
     159                /* translators: %s: the number of active components */
     160                _n( 'Active <span class="count">(%s)</span>', 'Active <span class="count">(%s)</span>', count( $active_components ), 'buddypress' ),
     161                number_format_i18n( count( $active_components ) )
     162            ),
     163        ),
     164        array(
     165            'action' => 'inactive',
     166            'view'   => sprintf(
     167                /* translators: %s: the number of inactive components */
     168                _n( 'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', count( $inactive_components ), 'buddypress' ),
     169                number_format_i18n( count( $inactive_components ) )
     170            ),
     171        ),
     172        array(
     173            'action' => 'mustuse',
     174            'view'   => sprintf(
     175                /* translators: %s: the number of must-Use components */
     176                _n( 'Must-Use <span class="count">(%s)</span>', 'Must-Use <span class="count">(%s)</span>', count( $required_components ), 'buddypress' ),
     177                number_format_i18n( count( $required_components ) )
     178            ),
     179        ),
     180        array(
     181            'action' => 'retired',
     182            'view'   => sprintf(
     183                /* translators: %s: the number of retired components */
     184                _n( 'Retired <span class="count">(%s)</span>',  'Retired <span class="count">(%s)</span>',  count( $retired_components ),  'buddypress' ),
     185                number_format_i18n( count( $retired_components ) )
     186            ),
     187        ),
     188    );
     189    ?>
    146190
    147191    <h3 class="screen-reader-text"><?php
    148192        /* translators: accessibility text */
    149         _e( 'Filter components list', 'buddypress' );
     193        esc_html_e( 'Filter components list', 'buddypress' );
    150194    ?></h3>
    151195
    152196    <ul class="subsubsub">
    153         <li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => 'all'      ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === 'all'      ) : ?>class="current"<?php endif; ?>><?php printf( _nx( 'All <span class="count">(%s)</span>',      'All <span class="count">(%s)</span>',      $all_count,         'plugins', 'buddypress' ), number_format_i18n( $all_count                    ) ); ?></a> | </li>
    154         <li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => 'active'   ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === 'active'   ) : ?>class="current"<?php endif; ?>><?php printf( _n(  'Active <span class="count">(%s)</span>',   'Active <span class="count">(%s)</span>',   count( $active_components   ), 'buddypress' ), number_format_i18n( count( $active_components   ) ) ); ?></a> | </li>
    155         <li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => 'inactive' ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === 'inactive' ) : ?>class="current"<?php endif; ?>><?php printf( _n(  'Inactive <span class="count">(%s)</span>', 'Inactive <span class="count">(%s)</span>', count( $inactive_components ), 'buddypress' ), number_format_i18n( count( $inactive_components ) ) ); ?></a> | </li>
    156         <li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => 'mustuse'  ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === 'mustuse'  ) : ?>class="current"<?php endif; ?>><?php printf( _n(  'Must-Use <span class="count">(%s)</span>', 'Must-Use <span class="count">(%s)</span>', count( $required_components ), 'buddypress' ), number_format_i18n( count( $required_components ) ) ); ?></a> | </li>
    157         <li><a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => 'retired'  ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === 'retired'  ) : ?>class="current"<?php endif; ?>><?php printf( _n(  'Retired <span class="count">(%s)</span>',  'Retired <span class="count">(%s)</span>',  count( $retired_components ),  'buddypress' ), number_format_i18n( count( $retired_components  ) ) ); ?></a></li>
     197        <?php foreach ( $component_views as $component_view ) : ?>
     198            <li>
     199                <a href="<?php echo esc_url( add_query_arg( array( 'page' => 'bp-components', 'action' => $component_view['action'] ), bp_get_admin_url( $page ) ) ); ?>" <?php if ( $action === $component_view['action'] ) : ?>class="current"<?php endif; ?>>
     200                    <?php echo wp_kses( $component_view['view'], array( 'span' => array( 'class' => true ) ) ); ?>
     201                </a><?php echo 'retired' !== $component_view['action'] ? ' |' : ''; ?>
     202            </li>
     203        <?php endforeach ;?>
    158204    </ul>
    159205
    160206    <h3 class="screen-reader-text"><?php
    161207        /* translators: accessibility text */
    162         _e( 'Components list', 'buddypress' );
     208        esc_html_e( 'Components list', 'buddypress' );
    163209    ?></h3>
    164210
  • trunk/src/bp-core/admin/bp-core-admin-slugs.php

    r12550 r12588  
    191191        <?php else : ?>
    192192            <?php if ( is_multisite() ) : ?>
    193                 <p><?php printf( __( 'Registration is currently disabled.  Before associating a page is allowed, please enable registration by selecting either the "User accounts may be registered" or "Both sites and user accounts can be registered" option on <a href="%s">this page</a>.', 'buddypress' ), network_admin_url( 'settings.php' ) ); ?></p>
     193                <p>
     194                    <?php
     195                    /* translators: %s: the link to the Network settings page */
     196                    printf( __( 'Registration is currently disabled.  Before associating a page is allowed, please enable registration by selecting either the "User accounts may be registered" or "Both sites and user accounts can be registered" option on <a href="%s">this page</a>.', 'buddypress' ), network_admin_url( 'settings.php' ) );
     197                    ?>
     198                </p>
    194199            <?php else : ?>
    195                 <p><?php printf( __( 'Registration is currently disabled.  Before associating a page is allowed, please enable registration by clicking on the "Anyone can register" checkbox on <a href="%s">this page</a>.', 'buddypress' ), admin_url( 'options-general.php' ) ); ?></p>
     200                <p>
     201                    <?php
     202                    /* translators: %s: the link to the Site settings page */
     203                    printf( __( 'Registration is currently disabled.  Before associating a page is allowed, please enable registration by clicking on the "Anyone can register" checkbox on <a href="%s">this page</a>.', 'buddypress' ), admin_url( 'options-general.php' ) );
     204                    ?>
     205                </p>
    196206            <?php endif; ?>
    197207        <?php endif; ?>
  • trunk/src/bp-core/admin/bp-core-admin-tools.php

    r12391 r12588  
    174174    }
    175175
     176    /* translators: %s: the result of the action performed by the repair tool */
    176177    $statement = __( 'Counting the number of friends for each user&hellip; %s', 'buddypress' );
    177178    $result    = __( 'Failed!', 'buddypress' );
     
    232233    }
    233234
     235    /* translators: %s: the result of the action performed by the repair tool */
    234236    $statement = __( 'Counting the number of groups for each user&hellip; %s', 'buddypress' );
    235237    $result    = __( 'Failed!', 'buddypress' );
     
    274276function bp_admin_repair_blog_records() {
    275277
    276     // Description of this tool, displayed to the user.
     278    /* translators: %s: the result of the action performed by the repair tool */
    277279    $statement = __( 'Repopulating Blogs records&hellip; %s', 'buddypress' );
    278280
     
    303305 */
    304306function bp_admin_repair_count_members() {
     307    /* translators: %s: the result of the action performed by the repair tool */
    305308    $statement = __( 'Counting the number of active members on the site&hellip; %s', 'buddypress' );
    306309    delete_transient( 'bp_active_member_count' );
     
    317320 */
    318321function bp_admin_repair_last_activity() {
     322    /* translators: %s: the result of the action performed by the repair tool */
    319323    $statement = __( 'Determining last activity dates for each user&hellip; %s', 'buddypress' );
    320324    bp_last_activity_migrate();
     
    408412        <p>
    409413            <?php esc_html_e( 'BuddyPress keeps track of various relationships between users, groups, and activity items. Occasionally these relationships become out of sync, most often after an import, update, or migration.', 'buddypress' ); ?>
    410             <?php printf( esc_html_x( 'Use the %s to repair these relationships.', 'buddypress tools intro', 'buddypress' ), '<a href="' . esc_url( $url ) . '">' . esc_html__( 'BuddyPress Tools', 'buddypress' ) . '</a>' ); ?>
     414            <?php
     415            printf(
     416                /* translators: %s: the link to the BuddyPress repair tools */
     417                esc_html_x( 'Use the %s to repair these relationships.', 'buddypress tools intro', 'buddypress' ),
     418                '<a href="' . esc_url( $url ) . '">' . esc_html__( 'BuddyPress Tools', 'buddypress' ) . '</a>'
     419            );
     420            ?>
    411421        </p>
    412422    </div>
  • trunk/src/bp-core/bp-core-admin.php

    r11360 r12588  
    5555    );
    5656
     57    /* translators: %s: the link to the BuddyPress release notes */
    5758    __( 'For more information, see <a href="%s">the release notes</a>.', 'buddypress' );
    5859}
  • trunk/src/bp-core/bp-core-attachments.php

    r12572 r12588  
    641641        array(
    642642            'queue_limit_exceeded'      => __( 'You have attempted to queue too many files.', 'buddypress' ),
     643
     644            /* translators: %s: File name. */
    643645            'file_exceeds_size_limit'   => __( '%s exceeds the maximum upload size for this site.', 'buddypress' ),
    644646            'zero_byte_file'            => __( 'This file is empty. Please try another.', 'buddypress' ),
     
    652654            'http_error'                => __( 'HTTP error.', 'buddypress' ),
    653655            'upload_failed'             => __( 'Upload failed.', 'buddypress' ),
     656
     657            /* translators: 1: Opening link tag, 2: Closing link tag. */
    654658            'big_upload_failed'         => __( 'Please try uploading this file with the %1$sbrowser uploader%2$s.', 'buddypress' ),
     659
     660            /* translators: %s: File name. */
    655661            'big_upload_queued'         => __( '%s exceeds the maximum upload size for the multi-file uploader when used in your browser.', 'buddypress' ),
    656662            'io_error'                  => __( 'IO error.', 'buddypress' ),
     
    661667            'crunching'                 => __( 'Crunching&hellip;', 'buddypress' ),
    662668            'unique_file_warning'       => __( 'Make sure to upload a unique file', 'buddypress' ),
     669
     670            /* translators: %s: File name. */
    663671            'error_uploading'           => __( '&#8220;%s&#8221; has failed to upload.', 'buddypress' ),
    664672            'has_avatar_warning'        => __( 'If you&#39;d like to delete the existing profile photo but not upload a new one, please use the delete tab.', 'buddypress' )
     
    831839        $strings['cover_image_warnings'] = apply_filters( 'bp_attachments_cover_image_ui_warnings', array(
    832840            'dimensions'  => sprintf(
    833                     __( 'For better results, make sure to upload an image that is larger than %1$spx wide, and %2$spx tall.', 'buddypress' ),
    834                     (int) $cover_dimensions['width'],
    835                     (int) $cover_dimensions['height']
    836                 ),
     841                /* translators: 1: the advised width size in pixels. 2: the advised height size in pixels. */
     842                __( 'For better results, make sure to upload an image that is larger than %1$spx wide, and %2$spx tall.', 'buddypress' ),
     843                (int) $cover_dimensions['width'],
     844                (int) $cover_dimensions['height']
     845            ),
    837846        ) );
    838847    }
     
    13541363        bp_attachments_json_response( false, $is_html4, array(
    13551364            'type'    => 'upload_error',
    1356             'message' => sprintf( __( 'Upload Failed! Error was: %s', 'buddypress' ), $uploaded['error'] ),
     1365            'message' => sprintf(
     1366                /* translators: %s: the upload error message */
     1367                __( 'Upload Failed! Error was: %s', 'buddypress' ),
     1368                $uploaded['error']
     1369            ),
    13571370        ) );
    13581371    }
  • trunk/src/bp-core/bp-core-avatars.php

    r12565 r12588  
    912912    // In case of an error, stop the process and display a feedback to the user.
    913913    if ( ! empty( $bp->avatar_admin->original['error'] ) ) {
     914        /* translators: %s: the upload error message */
    914915        bp_core_add_message( sprintf( __( 'Upload Failed! Error was: %s', 'buddypress' ), $bp->avatar_admin->original['error'] ), 'error' );
    915916        return false;
     
    940941    // Check for WP_Error on what should be an image.
    941942    if ( is_wp_error( $bp->avatar_admin->image->dir ) ) {
     943        /* translators: %s: the upload error message */
    942944        bp_core_add_message( sprintf( __( 'Upload failed! Error was: %s', 'buddypress' ), $bp->avatar_admin->image->dir->get_error_message() ), 'error' );
    943945        return false;
     
    946948    // If the uploaded image is smaller than the "full" dimensions, throw a warning.
    947949    if ( $avatar_attachment->is_too_small( $bp->avatar_admin->image->file ) ) {
    948         bp_core_add_message( sprintf( __( 'You have selected an image that is smaller than recommended. For best results, upload a picture larger than %d x %d pixels.', 'buddypress' ), bp_core_avatar_full_width(), bp_core_avatar_full_height() ), 'error' );
     950        /* translators: 1: the advised width size in pixels. 2: the advised height size in pixels. */
     951        bp_core_add_message( sprintf( __( 'You have selected an image that is smaller than recommended. For best results, upload a picture larger than %1$d x %2$d pixels.', 'buddypress' ), bp_core_avatar_full_width(), bp_core_avatar_full_height() ), 'error' );
    949952    }
    950953
  • trunk/src/bp-core/bp-core-filters.php

    r12569 r12588  
    601601
    602602        if ( ( $paged >= 2 || $page >= 2 ) && ! is_404() && ! bp_is_single_activity() ) {
     603            /* translators: %s: the page number. */
    603604            $bp_title_parts['page'] = sprintf( __( 'Page %s', 'buddypress' ), max( $paged, $page ) );
    604605        }
  • trunk/src/bp-core/bp-core-functions.php

    r12569 r12588  
    11861186     * @param string $value String representing the time since the older date.
    11871187     */
    1188     $ago_text       = apply_filters( 'bp_core_time_since_ago_text',       __( '%s ago',    'buddypress' ) );
     1188    $ago_text = apply_filters(
     1189        'bp_core_time_since_ago_text',
     1190        /* translators: %s: the human time diff. */
     1191        __( '%s ago', 'buddypress' )
     1192    );
    11891193
    11901194    // Array of time period chunks.
     
    12471251            switch ( $seconds ) {
    12481252                case YEAR_IN_SECONDS :
     1253                    /* translators: %s: the number of years. */
    12491254                    $output = sprintf( _n( '%s year',   '%s years',   $count, 'buddypress' ), $count );
    12501255                    break;
    12511256                case 30 * DAY_IN_SECONDS :
     1257                    /* translators: %s: the number of months. */
    12521258                    $output = sprintf( _n( '%s month',  '%s months',  $count, 'buddypress' ), $count );
    12531259                    break;
    12541260                case WEEK_IN_SECONDS :
     1261                    /* translators: %s: the number of weeks. */
    12551262                    $output = sprintf( _n( '%s week',   '%s weeks',   $count, 'buddypress' ), $count );
    12561263                    break;
    12571264                case DAY_IN_SECONDS :
     1265                    /* translators: %s: the number of days. */
    12581266                    $output = sprintf( _n( '%s day',    '%s days',    $count, 'buddypress' ), $count );
    12591267                    break;
    12601268                case HOUR_IN_SECONDS :
     1269                    /* translators: %s: the number of hours. */
    12611270                    $output = sprintf( _n( '%s hour',   '%s hours',   $count, 'buddypress' ), $count );
    12621271                    break;
    12631272                case MINUTE_IN_SECONDS :
     1273                    /* translators: %s: the number of minutes. */
    12641274                    $output = sprintf( _n( '%s minute', '%s minutes', $count, 'buddypress' ), $count );
    12651275                    break;
    12661276                default:
     1277                    /* translators: %s: the number of seconds. */
    12671278                    $output = sprintf( _n( '%s second', '%s seconds', $count, 'buddypress' ), $count );
    12681279            }
     
    12841295                    switch ( $seconds2 ) {
    12851296                        case 30 * DAY_IN_SECONDS :
     1297                            /* translators: %s: the number of months. */
    12861298                            $output .= sprintf( _n( '%s month',  '%s months',  $count2, 'buddypress' ), $count2 );
    12871299                            break;
    12881300                        case WEEK_IN_SECONDS :
     1301                            /* translators: %s: the number of weeks. */
    12891302                            $output .= sprintf( _n( '%s week',   '%s weeks',   $count2, 'buddypress' ), $count2 );
    12901303                            break;
    12911304                        case DAY_IN_SECONDS :
     1305                            /* translators: %s: the number of days. */
    12921306                            $output .= sprintf( _n( '%s day',    '%s days',    $count2, 'buddypress' ), $count2 );
    12931307                            break;
    12941308                        case HOUR_IN_SECONDS :
     1309                            /* translators: %s: the number of hours. */
    12951310                            $output .= sprintf( _n( '%s hour',   '%s hours',   $count2, 'buddypress' ), $count2 );
    12961311                            break;
    12971312                        case MINUTE_IN_SECONDS :
     1313                            /* translators: %s: the number of minutes. */
    12981314                            $output .= sprintf( _n( '%s minute', '%s minutes', $count2, 'buddypress' ), $count2 );
    12991315                            break;
    13001316                        default:
     1317                            /* translators: %s: the number of seconds. */
    13011318                            $output .= sprintf( _n( '%s second', '%s seconds', $count2, 'buddypress' ), $count2 );
    13021319                    }
     
    32503267 */
    32513268function bp_email_get_appearance_settings() {
    3252     /* translators: This is the copyright text for email footers. 1. Copyright year, 2. Site name */
    32533269    $footer_text = array(
    32543270        sprintf(
    3255             _x( '&copy; %1$s %2$s', 'email', 'buddypress' ),
     3271            /* translators: 1. Copyright year, 2. Site name */
     3272            _x( '&copy; %1$s %2$s', 'copyright text for email footers', 'buddypress' ),
    32563273            date_i18n( 'Y' ),
    32573274            bp_get_option( 'blogname' )
  • trunk/src/bp-core/bp-core-template.php

    r12561 r12588  
    144144    // If none is found, concatenate.
    145145    } elseif ( isset( buddypress()->{$component}->name ) ) {
     146        /* translators: %s: Name of the BuddyPress component */
    146147        $title = sprintf( __( '%s Directory', 'buddypress' ), buddypress()->{$component}->name );
    147148    }
     
    196197        'item_id' => $comment->user_id,
    197198        'type'    => 'thumb',
    198         'alt'     => sprintf( __( 'Profile photo of %s', 'buddypress' ), bp_core_get_user_displayname( $comment->user_id ) )
     199        'alt'     => sprintf(
     200            /* translators: %s: member name */
     201            __( 'Profile photo of %s', 'buddypress' ),
     202            bp_core_get_user_displayname( $comment->user_id )
     203        ),
    199204    ) ) );
    200205}
     
    211216        'item_id' => $post->post_author,
    212217        'type'    => 'thumb',
    213         'alt'     => sprintf( __( 'Profile photo of %s', 'buddypress' ), bp_core_get_user_displayname( $post->post_author ) )
     218        'alt'     => sprintf(
     219            /* translators: %s: member name */
     220            __( 'Profile photo of %s', 'buddypress' ),
     221            bp_core_get_user_displayname( $post->post_author )
     222        ),
    214223    ) ) );
    215224}
     
    37583767         * @param string $token    The Recipient token.
    37593768         */
    3760         return apply_filters( 'bp_email_get_salutation', sprintf( _x( 'Hi %s,', 'recipient salutation', 'buddypress' ), $token ), $settings, $token );
    3761     }
     3769        return apply_filters(
     3770            'bp_email_get_salutation',
     3771            sprintf(
     3772                /* translators: %s: the email token for the recipient name */
     3773                _x( 'Hi %s,', 'recipient salutation', 'buddypress' ),
     3774                $token
     3775            ),
     3776            $settings,
     3777            $token
     3778        );
     3779    }
  • trunk/src/bp-core/classes/class-bp-admin.php

    r12553 r12588  
    780780                        <?php
    781781                        printf(
     782                            /* translators: 1: heart dashicons. 2: BP Credits screen url. 3: number of BuddyPress contributors to this version. */
    782783                            _n( 'Built with %1$s by <a href="%2$s">%3$d volunteer</a>.', 'Built with %1$s by <a href="%2$s">%3$d volunteers</a>.', 28, 'buddypress' ),
    783784                            '<span class="dashicons dashicons-heart"></span>',
     
    956957            </ul>
    957958
    958             <h3 class="wp-people-group"><?php printf( esc_html__( 'Contributors to BuddyPress %s', 'buddypress' ), self::display_version() ); ?></h3>
     959            <h3 class="wp-people-group">
     960                <?php
     961                printf(
     962                    /* translators: %s: BuddyPress version number */
     963                    esc_html__( 'Contributors to BuddyPress %s', 'buddypress' ),
     964                    self::display_version()
     965                );
     966                ?>
     967            </h3>
    959968            <p class="wp-credits-list">
    960969                <a href="https://github.com/baconbro">baconbro</a>,
  • trunk/src/bp-core/classes/class-bp-attachment-avatar.php

    r12547 r12588  
    3838            // Specific errors for avatars.
    3939            'upload_error_strings'  => array(
    40                 9  => sprintf( __( 'That photo is too big. Please upload one smaller than %s', 'buddypress' ), size_format( bp_core_avatar_original_max_filesize() ) ),
    41                 10 => sprintf( _n( 'Please upload only this file type: %s.', 'Please upload only these file types: %s.', count( $allowed_types ), 'buddypress' ), self::get_avatar_types( $allowed_types ) ),
     40                /* translators: %s: Max file size for the profile photo */
     41                9  => sprintf( _x( 'That photo is too big. Please upload one smaller than %s', 'profile photo upload error', 'buddypress' ), size_format( bp_core_avatar_original_max_filesize() ) ),
     42
     43                /* translators: %s: comma separated list of file types allowed for the profile photo */
     44                10 => sprintf( _nx( 'Please upload only this file type: %s.', 'Please upload only these file types: %s.', count( $allowed_types ), 'profile photo upload error', 'buddypress' ), self::get_avatar_types( $allowed_types ) ),
    4245            ),
    4346        ) );
  • trunk/src/bp-core/classes/class-bp-attachment-cover-image.php

    r11875 r12588  
    3838            // Specific errors for cover images.
    3939            'upload_error_strings'  => array(
    40                 11  => sprintf( __( 'That image is too big. Please upload one smaller than %s', 'buddypress' ), size_format( $max_upload_file_size ) ),
    41                 12  => sprintf( _n( 'Please upload only this file type: %s.', 'Please upload only these file types: %s.', count( $allowed_types ), 'buddypress' ), self::get_cover_image_types( $allowed_types ) ),
     40                /* translators: %s: Max file size for the cover image */
     41                11  => sprintf( _x( 'That image is too big. Please upload one smaller than %s', 'cover image upload error', 'buddypress' ), size_format( $max_upload_file_size ) ),
     42
     43                /* translators: %s: comma separated list of file types allowed for the cover image */
     44                12  => sprintf( _nx( 'Please upload only this file type: %s.', 'Please upload only these file types: %s.', count( $allowed_types ), 'cover image upload error', 'buddypress' ), self::get_cover_image_types( $allowed_types ) ),
    4245            ),
    4346        ) );
  • trunk/src/bp-core/classes/class-bp-attachment.php

    r12547 r12588  
    160160            0 => __( 'The file was uploaded successfully', 'buddypress' ),
    161161            1 => __( 'The uploaded file exceeds the maximum allowed file size for this site', 'buddypress' ),
     162
     163            /* translators: %s: Max file size for the file */
    162164            2 => sprintf( __( 'The uploaded file exceeds the maximum allowed file size of: %s', 'buddypress' ), size_format( $this->original_max_filesize ) ),
    163165            3 => __( 'The uploaded file was only partially uploaded.', 'buddypress' ),
     
    501503
    502504            if ( empty( $ext ) || empty( $supported_image_types[ $ext ] ) ) {
    503                 $wp_error->add( 'crop_error', sprintf( __( 'Cropping the file failed: %s is not a supported image file.', 'buddypress' ), $file['error'] ) );
     505                $wp_error->add(
     506                    'crop_error',
     507                    sprintf(
     508                        /* translators: %s: image file extension */
     509                        __( 'Cropping the file failed: %s is not a supported image file.', 'buddypress' ),
     510                        $file['error']
     511                    )
     512                );
     513
    504514                return $wp_error;
    505515            }
  • trunk/src/bp-core/classes/class-bp-core-user.php

    r11818 r12588  
    167167        }
    168168
    169         $this->avatar       = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'full', 'alt' => sprintf( __( 'Profile photo of %s', 'buddypress' ), $this->fullname ) ) );
    170         $this->avatar_thumb = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile photo of %s', 'buddypress' ), $this->fullname ) ) );
    171         $this->avatar_mini  = bp_core_fetch_avatar( array( 'item_id' => $this->id, 'type' => 'thumb', 'alt' => sprintf( __( 'Profile photo of %s', 'buddypress' ), $this->fullname ), 'width' => 30, 'height' => 30 ) );
    172         $this->last_active  = bp_core_get_last_activity( bp_get_user_last_activity( $this->id ), __( 'active %s', 'buddypress' ) );
     169        $this->avatar = bp_core_fetch_avatar(
     170            array(
     171                'item_id' => $this->id,
     172                'type'    => 'full',
     173                'alt'     => sprintf(
     174                    /* translators: %s: member name */
     175                    __( 'Profile photo of %s', 'buddypress' ),
     176                    $this->fullname
     177                )
     178            )
     179        );
     180
     181        $this->avatar_thumb = bp_core_fetch_avatar(
     182            array(
     183                'item_id' => $this->id,
     184                'type'    => 'thumb',
     185                'alt'     => sprintf(
     186                    /* translators: %s: member name */
     187                    __( 'Profile photo of %s', 'buddypress' ),
     188                    $this->fullname
     189                )
     190            )
     191        );
     192
     193        $this->avatar_mini = bp_core_fetch_avatar(
     194            array(
     195                'item_id' => $this->id,
     196                'type'    => 'thumb',
     197                'alt'     => sprintf(
     198                    /* translators: %s: member name */
     199                    __( 'Profile photo of %s', 'buddypress' ),
     200                    $this->fullname
     201                ),
     202                'width'   => 30,
     203                'height'  => 30
     204            )
     205        );
     206
     207        /* translators: %s: human time diff of the last time the user was active on the site. */
     208        $this->last_active = bp_core_get_last_activity( bp_get_user_last_activity( $this->id ), _x( 'active %s', 'last time the user was active', 'buddypress' ) );
    173209    }
    174210
     
    184220        if ( bp_is_active( 'groups' ) ) {
    185221            $this->total_groups = BP_Groups_Member::total_group_count( $this->id );
    186             $this->total_groups = sprintf( _n( '%d group', '%d groups', $this->total_groups, 'buddypress' ), $this->total_groups );
     222            $this->total_groups = sprintf(
     223                /* translators: %s: total groups count */
     224                _n( '%d group', '%d groups', $this->total_groups, 'buddypress' ),
     225                $this->total_groups
     226            );
    187227        }
    188228    }
  • trunk/src/bp-core/deprecated/1.5.php

    r12547 r12588  
    356356            $ud = bp_core_get_core_userdata( $receiver_user_id );
    357357            $to = $ud->user_email;
    358             $subject = bp_get_email_subject( array( 'text' => sprintf( __( '%1$s mentioned you in the group "%2$s"', 'buddypress' ), $poster_name, $group->name ) ) );
    359 
    360 $message = sprintf( __(
     358            $subject = bp_get_email_subject(
     359                array(
     360                    'text' => sprintf(
     361                        /* translators: 1: the poster name. 2: the group name. */
     362                        _x( '%1$s mentioned you in the group "%2$s"', 'deprecated string', 'buddypress' ),
     363                        $poster_name,
     364                        $group->name
     365                    )
     366                )
     367            );
     368
     369/* translators: 1: the poster name. 2: the group name. 3: the content of the activity. 4: the activity permalink. */
     370$message = sprintf( _x(
    361371'%1$s mentioned you in the group "%2$s":
    362372
     
    366376
    367377---------------------
    368 ', 'buddypress' ), $poster_name, $group->name, $content, $message_link );
     378', 'deprecated string', 'buddypress' ), $poster_name, $group->name, $content, $message_link );
    369379
    370380            /* Send the message */
  • trunk/src/bp-core/deprecated/2.1.php

    r12547 r12588  
    457457                'width'   => 15,
    458458                'height'  => 15,
    459                 'alt'     => sprintf( __( 'Profile picture of %s', 'buddypress' ), $author->display_name )
     459                'alt'     => sprintf(
     460                    /* translators: %s: member name */
     461                    __( 'Profile picture of %s', 'buddypress' ),
     462                    $author->display_name
     463                ),
    460464            ) );
    461465            echo ' ' . $author->display_name . '</a>';
     
    496500            <?php if ( bp_is_active( 'xprofile' ) ) : ?>
    497501
    498                 <li><a href="<?php bp_members_component_link( 'profile', 'edit' ); ?>"><?php printf( __( "Edit %s's Profile", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ) ?></a></li>
     502                <li>
     503                    <a href="<?php bp_members_component_link( 'profile', 'edit' ); ?>">
     504                        <?php
     505                        /* translators: %s: member name */
     506                        printf( __( "Edit %s's Profile", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) );
     507                        ?>
     508                    </a>
     509                </li>
    499510
    500511            <?php endif ?>
    501512
    502             <li><a href="<?php bp_members_component_link( 'profile', 'change-avatar' ); ?>"><?php printf( __( "Edit %s's Profile Photo", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ) ?></a></li>
     513            <li>
     514                <a href="<?php bp_members_component_link( 'profile', 'change-avatar' ); ?>">
     515                    <?php
     516                    /* translators: %s: member name */
     517                    printf( _x( "Edit %s's Profile Photo", 'deprecated string', 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) );
     518                    ?>
     519                </a>
     520            </li>
    503521
    504522            <li><a href="<?php bp_members_component_link( 'settings', 'capabilities' ); ?>"><?php _e( 'User Capabilities', 'buddypress' ); ?></a></li>
    505523
    506             <li><a href="<?php bp_members_component_link( 'settings', 'delete-account' ); ?>"><?php printf( __( "Delete %s's Account", 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) ); ?></a></li>
     524            <li>
     525                <a href="<?php bp_members_component_link( 'settings', 'delete-account' ); ?>">
     526                    <?php
     527                    /* translators: %s: member name */
     528                    printf( _x( "Delete %s's Account", 'deprecated string', 'buddypress' ), esc_attr( bp_get_displayed_user_fullname() ) );
     529                    ?>
     530                </a>
     531            </li>
    507532
    508533            <?php do_action( 'bp_members_adminbar_admin_menu' ) ?>
  • trunk/src/bp-core/deprecated/2.8.php

    r11941 r12588  
    196196    <div id="message" class="error notice is-dismissible bp-is-dismissible" data-noticeid="<?php echo esc_attr( $notice_id ); ?>">
    197197        <p><strong><?php esc_html_e( 'Your site is not ready for BuddyPress 2.8.', 'buddypress' ); ?></strong></p>
    198         <p><?php printf( esc_html__( 'Your site is currently running PHP version %s, while BuddyPress 2.8 will require version 5.3+.', 'buddypress' ), esc_html( phpversion() ) ); ?> <?php printf( __( 'See <a href="%s">the Codex guide</a> for more information.', 'buddypress' ), 'https://codex.buddypress.org/getting-started/buddypress-2-8-will-require-php-5-3/' ); ?></p>
     198        <p>
     199            <?php
     200            /* translators: %s: the site's PHP version number */
     201            printf( esc_html_x( 'Your site is currently running PHP version %s, while BuddyPress 2.8 will require version 5.3+.', 'deprecated string', 'buddypress' ), esc_html( phpversion() ) );
     202            ?>
     203            &nbsp;
     204            <?php
     205            /* translators: %s: the url to a codex page */
     206            printf( _x( 'See <a href="%s">the Codex guide</a> for more information.', 'deprecated string', 'buddypress' ), 'https://codex.buddypress.org/getting-started/buddypress-2-8-will-require-php-5-3/' );
     207            ?>
     208        </p>
    199209        <?php wp_nonce_field( "bp-dismissible-notice-$notice_id", "bp-dismissible-nonce-$notice_id" ); ?>
    200210    </div>
  • trunk/src/bp-core/deprecated/3.0.php

    r12264 r12588  
    172172
    173173        if ( bp_core_delete_account( bp_displayed_user_id() ) ) {
    174             bp_core_add_message( sprintf( __( '%s has been deleted from the system.', 'buddypress' ), bp_get_displayed_user_fullname() ) );
     174            bp_core_add_message(
     175                /* translators: %s: member name */
     176                sprintf( _x( '%s has been deleted from the system.', 'deprecated string', 'buddypress' ), bp_get_displayed_user_fullname() )
     177            );
    175178        } else {
    176             bp_core_add_message( sprintf( __( 'There was an error deleting %s from the system. Please try again.', 'buddypress' ), bp_get_displayed_user_fullname() ), 'error' );
     179            bp_core_add_message(
     180                /* translators: %s: member name */
     181                sprintf( _x( 'There was an error deleting %s from the system. Please try again.', 'deprecated string', 'buddypress' ), bp_get_displayed_user_fullname() ),
     182                'error'
     183            );
     184
    177185            $errors = true;
    178186        }
Note: See TracChangeset for help on using the changeset viewer.