Skip to:
Content

BuddyPress.org

Changeset 12596


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

BP xProfile: add missing /* translators */ comments

Fixes #8260

Location:
trunk/src/bp-xprofile
Files:
5 edited

Legend:

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

    r12393 r12596  
    6161function bp_xprofile_format_activity_action_new_avatar( $action, $activity ) {
    6262    $userlink = bp_core_get_userlink( $activity->user_id );
    63     $action   = sprintf( esc_html__( '%s changed their profile picture', 'buddypress' ), $userlink );
     63
     64    /* translators: %s: user link */
     65    $action = sprintf( esc_html__( '%s changed their profile picture', 'buddypress' ), $userlink );
    6466
    6567    // Legacy filter - pass $user_id instead of $activity.
     
    9597    // natural translation.
    9698    $profile_link = trailingslashit( bp_core_get_user_domain( $activity->user_id ) . bp_get_profile_slug() );
    97     $action       = sprintf( esc_html__( "%s's profile was updated", 'buddypress' ), '<a href="' . esc_url( $profile_link ) . '">' . bp_core_get_user_displayname( $activity->user_id ) . '</a>' );
     99
     100    /* translators: %s: user profile link */
     101    $action = sprintf( esc_html__( "%s's profile was updated", 'buddypress' ), '<a href="' . esc_url( $profile_link ) . '">' . bp_core_get_user_displayname( $activity->user_id ) . '</a>' );
    98102
    99103    /**
  • trunk/src/bp-xprofile/bp-xprofile-admin.php

    r12529 r12596  
    571571
    572572    if ( !$field->delete( (bool) $delete_data ) ) {
     573        /* translators: %s: the field type */
    573574        $message = sprintf( __( 'There was an error deleting the %s. Please try again.', 'buddypress' ), $field_type );
    574575        $type    = 'error';
    575576    } else {
     577        /* translators: %s: the field type */
    576578        $message = sprintf( __( 'The %s was deleted successfully!', 'buddypress' ), $field_type );
    577579        $type    = 'success';
  • trunk/src/bp-xprofile/bp-xprofile-template.php

    r12555 r12596  
    11651165             * @param string $value Formatted last updated indicator string.
    11661166             */
    1167             return apply_filters( 'bp_get_profile_last_updated', sprintf( __( 'Profile updated %s', 'buddypress' ), bp_core_time_since( strtotime( $last_updated ) ) ) );
     1167            return apply_filters(
     1168                'bp_get_profile_last_updated',
     1169                /* translators: %s: last activity timestamp (e.g. "active 1 hour ago") */
     1170                sprintf( __( 'Profile updated %s', 'buddypress' ), bp_core_time_since( strtotime( $last_updated ) ) )
     1171            );
    11681172        }
    11691173
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-component.php

    r12559 r12596  
    385385                    'item_id' => bp_displayed_user_id(),
    386386                    'type'    => 'thumb',
     387
     388                    /* translators: %s: member name */
    387389                    'alt'     => sprintf( _x( 'Profile picture of %s', 'Avatar alt', 'buddypress' ), bp_get_displayed_user_fullname() )
    388390                ) );
  • trunk/src/bp-xprofile/classes/class-bp-xprofile-field.php

    r12532 r12596  
    785785            }
    786786
     787            /* translators: %s: comma separated list of member types */
    787788            $label = sprintf( __( '(Member types: %s)', 'buddypress' ), implode( ', ', array_map( 'esc_html', $member_type_labels ) ) );
    788789        } else {
     
    11121113        // Check that field is of valid type.
    11131114        if ( ! in_array( $_POST['fieldtype'], array_keys( bp_xprofile_get_field_types() ), true ) ) {
     1115            /* translators: %s: field type name */
    11141116            $message = sprintf( esc_html__( 'The profile field type %s is not registered.', 'buddypress' ), '<code>' . esc_attr( $_POST['fieldtype'] ) . '</code>' );
    11151117            return false;
     
    11381140            // Check for missing or malformed options.
    11391141            if ( 0 === $field_count ) {
     1142                /* translators: %s: field type name */
    11401143                $message = sprintf( esc_html__( '%s require at least one option.', 'buddypress' ), $field_type->name );
    11411144                return false;
     
    11441147            // If only one option exists, it cannot be an empty string.
    11451148            if ( ( 1 === $field_count ) && ( '' === $field_options[0] ) ) {
     1149                /* translators: %s: field type name */
    11461150                $message = sprintf( esc_html__( '%s require at least one option.', 'buddypress' ), $field_type->name );
    11471151                return false;
Note: See TracChangeset for help on using the changeset viewer.