Skip to:
Content

BuddyPress.org

Changeset 12592


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

BP Messages: add missing /* translators */ comments

See #8260

Location:
trunk/src/bp-messages
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/actions/bulk-manage-star.php

    r11925 r12592  
    5353            }
    5454
     55            /* translators: %s: number of starred messages */
    5556            bp_core_add_message( sprintf( _n( '%s message was successfully starred', '%s messages were successfully starred', $count, 'buddypress' ), $count ) );
    5657            break;
     
    6768            }
    6869
     70            /* translators: %s: number of unstarred messages */
    6971            bp_core_add_message( sprintf( _n( '%s message was successfully unstarred', '%s messages were successfully unstarred', $count, 'buddypress' ), $count ) );
    7072            break;
  • trunk/src/bp-messages/bp-messages-functions.php

    r12448 r12592  
    9494        // Set a default reply subject if none was sent.
    9595        if ( empty( $message->subject ) ) {
     96            /* translators: %s: message subject */
    9697            $message->subject = sprintf( __( 'Re: %s', 'buddypress' ), $thread->messages[0]->subject );
    9798        }
  • trunk/src/bp-messages/bp-messages-notifications.php

    r12087 r12592  
    3535        if ( $total_items > 1 ) {
    3636            $amount = 'multiple';
    37             $text   = sprintf( __( 'You have %d new messages', 'buddypress' ), $total_items );
     37
     38            /* translators: %s: number of new messages */
     39            $text = sprintf( __( 'You have %d new messages', 'buddypress' ), $total_items );
    3840
    3941        } else {
     
    4648
    4749            if ( ! empty( $secondary_item_id ) ) {
     50                /* translators: %s: member name */
    4851                $text = sprintf( __( '%s sent you a new private message', 'buddypress' ), bp_core_get_user_displayname( $secondary_item_id ) );
    4952            } else {
     53                /* translators: %s: number of private messages */
    5054                $text = sprintf( _n( 'You have %s new private message', 'You have %s new private messages', $total_items, 'buddypress' ), bp_core_number_format( $total_items ) );
    5155            }
  • trunk/src/bp-messages/bp-messages-template.php

    r12415 r12592  
    640640            '<span class="thread-count">(%1$s)</span> <span class="bp-screen-reader-text">%2$s</span>',
    641641            number_format_i18n( $total ),
     642            /* translators: %d: number of unread messages */
    642643            sprintf( _n( '%d unread', '%d unread', $unread, 'buddypress' ), number_format_i18n( $unread ) )
    643644        );
     
    826827        $message = __( 'Viewing 1 message', 'buddypress' );
    827828    } else {
     829        /* translators: 1: message from number. 2: message to number. 3: total messages. */
    828830        $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s message', 'Viewing %1$s - %2$s of %3$s messages', $messages_template->total_thread_count, 'buddypress' ), $from_num, $to_num, $total );
    829831    }
     
    16761678function bp_get_the_thread_recipients() {
    16771679    if ( 5 <= bp_get_thread_recipients_count() ) {
     1680        /* translators: %s: number of message recipients */
    16781681        $recipients = sprintf( __( '%s recipients', 'buddypress' ), number_format_i18n( bp_get_thread_recipients_count() ) );
    16791682    } else {
     
    20672070         * @param string $value Default text of 'Sent x hours ago'.
    20682071         */
    2069         return apply_filters( 'bp_get_the_thread_message_time_since', sprintf( __( 'Sent %s', 'buddypress' ), bp_core_time_since( bp_get_the_thread_message_date_sent() ) ) );
     2072        return apply_filters(
     2073            'bp_get_the_thread_message_time_since',
     2074            sprintf(
     2075                /* translators: %s: last activity timestamp (e.g. "active 1 hour ago") */
     2076                __( 'Sent %s', 'buddypress' ),
     2077                bp_core_time_since( bp_get_the_thread_message_date_sent() )
     2078            )
     2079        );
    20702080    }
    20712081
  • trunk/src/bp-messages/classes/class-bp-messages-notices-list-table.php

    r11870 r12592  
    1717
    1818class BP_Messages_Notices_List_Table extends WP_List_Table {
    19    
     19
    2020    /**
    2121     * Constructor
     
    110110    public function column_subject( $item ) {
    111111        $actions = array(
    112             'activate_deactivate' => sprintf( '<a href="%s" data-bp-notice-id="%d" data-bp-action="activate">%s</a>', 
     112            'activate_deactivate' => sprintf( '<a href="%s" data-bp-notice-id="%d" data-bp-action="activate">%s</a>',
    113113                esc_url( wp_nonce_url( add_query_arg( array(
    114114                    'page'          => 'bp-notices',
     
    118118                (int) $item->id,
    119119                esc_html__( 'Activate Notice', 'buddypress' ) ),
    120             'delete' => sprintf( '<a href="%s" data-bp-notice-id="%d" data-bp-action="delete">%s</a>', 
     120            'delete' => sprintf( '<a href="%s" data-bp-notice-id="%d" data-bp-action="delete">%s</a>',
    121121                esc_url( wp_nonce_url( add_query_arg( array(
    122122                    'page'          => 'bp-notices',
     
    129129
    130130        if ( ! empty( $item->is_active ) ) {
     131            /* translators: %s: notice subject */
    131132            $item->subject = sprintf( _x( 'Active: %s', 'Tag prepended to active site-wide notice titles on WP Admin notices list table', 'buddypress' ), $item->subject );
    132             $actions['activate_deactivate'] = sprintf( '<a href="%s" data-bp-notice-id="%d" data-bp-action="deactivate">%s</a>', 
     133            $actions['activate_deactivate'] = sprintf( '<a href="%s" data-bp-notice-id="%d" data-bp-action="deactivate">%s</a>',
    133134                esc_url( wp_nonce_url( add_query_arg( array(
    134135                    'page'          => 'bp-notices',
  • trunk/src/bp-messages/classes/class-bp-messages-thread.php

    r12426 r12592  
    852852
    853853        if ( count( $recipients ) >= 5 ) {
     854            /* translators: %s: number of message recipients */
    854855            return sprintf( __( '%s Recipients', 'buddypress' ), number_format_i18n( count( $recipients ) ) );
    855856        }
  • trunk/src/bp-messages/screens/view.php

    r11925 r12592  
    5252    $count    = bp_get_total_unread_messages_count();
    5353    $class    = ( 0 === $count ) ? 'no-count' : 'count';
    54     $nav_name = sprintf( __( 'Messages <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), bp_core_number_format( $count ) );
     54
     55    /* translators: 1: class name. 2: number of messages */
     56    $nav_name = sprintf( __( 'Messages <span class="%1$s">%2$s</span>', 'buddypress' ), esc_attr( $class ), bp_core_number_format( $count ) );
    5557
    5658    // Edit the Navigation name.
Note: See TracChangeset for help on using the changeset viewer.