Skip to:
Content

BuddyPress.org


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

BP Activity: add missing /* translators */ comments

See #8260

File:
1 edited

Legend:

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

    r12542 r12586  
    661661
    662662    <div class="wrap">
    663         <h1><?php printf( __( 'Editing Activity (ID #%s)', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) ); ?></h1>
     663        <h1>
     664            <?php
     665            /* translators: %s: the activity ID */
     666            printf( __( 'Editing Activity (ID #%s)', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) );
     667            ?>
     668        </h1>
    664669
    665670        <?php if ( ! empty( $activity ) ) : ?>
     
    762767                    $date  = date_i18n( $datef, strtotime( $item->date_recorded ) );
    763768                    ?>
    764                     <span id="timestamp"><?php printf( __( 'Submitted on: %s', 'buddypress' ), '<strong>' . $date . '</strong>' ); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e( 'Edit', 'buddypress' ); ?></a>
     769                    <span id="timestamp">
     770                        <?php
     771                        /* translators: %s: the date the activity was submitted on */
     772                        printf( __( 'Submitted on: %s', 'buddypress' ), '<strong>' . $date . '</strong>' );
     773                        ?>
     774                    </span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e( 'Edit', 'buddypress' ); ?></a>
    765775
    766776                    <div id='timestampdiv' class='hide-if-js'>
     
    900910     */
    901911    if ( ! isset( $actions[ $selected ] ) ) {
    902         _doing_it_wrong( __FUNCTION__, sprintf( __( 'This activity item has a type (%s) that is not registered using bp_activity_set_action(), so no label is available.', 'buddypress' ), $selected ), '2.0.0' );
     912        _doing_it_wrong(
     913            __FUNCTION__,
     914            sprintf(
     915                /* translators: %s: the name of the activity type */
     916                __( 'This activity item has a type (%s) that is not registered using bp_activity_set_action(), so no label is available.', 'buddypress' ),
     917                $selected
     918            ),
     919            '2.0.0'
     920        );
     921
    903922        $actions[ $selected ] = $selected;
    904923    }
     
    974993        $errors = array_values( $errors );
    975994
    976         if ( $deleted > 0 )
     995        if ( $deleted > 0 ) {
     996            /* translators: %s: the number of permanently deleted activities */
    977997            $messages[] = sprintf( _n( '%s activity item has been permanently deleted.', '%s activity items have been permanently deleted.', $deleted, 'buddypress' ), number_format_i18n( $deleted ) );
     998        }
    978999
    9791000        if ( ! empty( $errors ) ) {
    9801001            if ( 1 == count( $errors ) ) {
     1002                /* translators: %s: the ID of the activity which errored during an update */
    9811003                $messages[] = sprintf( __( 'An error occurred when trying to update activity ID #%s.', 'buddypress' ), number_format_i18n( $errors[0] ) );
    9821004
     
    9871009                // Display each error as a list item.
    9881010                foreach ( $errors as $error ) {
    989                     // Translators: This is a bulleted list of item IDs.
     1011                    /* Translators: %s: the activity ID */
    9901012                    $error_msg .= '<li>' . sprintf( __( '#%s', 'buddypress' ), number_format_i18n( $error ) ) . '</li>';
    9911013                }
     
    9961018        }
    9971019
    998         if ( $spammed > 0 )
     1020        if ( $spammed > 0 ) {
     1021            /* translators: %s: the number of activities successfully marked as spam */
    9991022            $messages[] = sprintf( _n( '%s activity item has been successfully spammed.', '%s activity items have been successfully spammed.', $spammed, 'buddypress' ), number_format_i18n( $spammed ) );
    1000 
    1001         if ( $unspammed > 0 )
     1023        }
     1024
     1025        if ( $unspammed > 0 ) {
     1026            /* translators: %s: the number of activities successfully marked as ham */
    10021027            $messages[] = sprintf( _n( '%s activity item has been successfully unspammed.', '%s activity items have been successfully unspammed.', $unspammed, 'buddypress' ), number_format_i18n( $unspammed ) );
    1003 
    1004         if ( $updated > 0 )
     1028        }
     1029
     1030        if ( $updated > 0 ) {
    10051031            $messages[] = __( 'The activity item has been updated successfully.', 'buddypress' );
     1032        }
    10061033    }
    10071034
     
    10211048        <h1>
    10221049            <?php if ( !empty( $_REQUEST['aid'] ) ) : ?>
    1023                 <?php printf( __( 'Activity related to ID #%s', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) ); ?>
     1050                <?php
     1051                /* translators: %s: the activity ID */
     1052                printf( __( 'Activity related to ID #%s', 'buddypress' ), number_format_i18n( (int) $_REQUEST['aid'] ) );
     1053                ?>
    10241054            <?php else : ?>
    10251055                <?php _ex( 'Activity', 'Admin SWA page', 'buddypress' ); ?>
     
    10271057
    10281058            <?php if ( !empty( $_REQUEST['s'] ) ) : ?>
    1029                 <span class="subtitle"><?php printf( __( 'Search results for &#8220;%s&#8221;', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) ); ?></span>
     1059                <span class="subtitle">
     1060                    <?php
     1061                    /* translators: %s: the activity search terms */
     1062                    printf( __( 'Search results for &#8220;%s&#8221;', 'buddypress' ), wp_html_excerpt( esc_html( stripslashes( $_REQUEST['s'] ) ), 50 ) );
     1063                    ?>
     1064                </span>
    10301065            <?php endif; ?>
    10311066        </h1>
Note: See TracChangeset for help on using the changeset viewer.