Skip to:
Content

BuddyPress.org

Ticket #5784: 5784.02.patch

File 5784.02.patch, 19.9 KB (added by imath, 10 years ago)
  • src/bp-activity/bp-activity-admin.php

    diff --git src/bp-activity/bp-activity-admin.php src/bp-activity/bp-activity-admin.php
    index 7bb15b6..f48eb7e 100644
    function bp_activity_admin_edit() { 
    596596                                                <div id="post-body-content">
    597597                                                        <div id="postdiv">
    598598                                                                <div id="bp_activity_action" class="postbox">
    599                                                                         <h3><?php _e( 'Action', 'buddypress' ); ?></h3>
     599                                                                        <h3><?php _ex( 'Action', 'Activity editor column header', 'buddypress' ); ?></h3>
    600600                                                                        <div class="inside">
    601601                                                                                <?php wp_editor( stripslashes( $activity->action ), 'bp-activities-action', array( 'media_buttons' => false, 'textarea_rows' => 7, 'teeny' => true, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,code,spell,close' ) ) ); ?>
    602602                                                                        </div>
    603603                                                                </div>
    604604
    605605                                                                <div id="bp_activity_content" class="postbox">
    606                                                                         <h3><?php _e( 'Content', 'buddypress' ); ?></h3>
     606                                                                        <h3><?php _ex( 'Content', 'Activity editor column header', 'buddypress' ); ?></h3>
    607607                                                                        <div class="inside">
    608608                                                                                <?php wp_editor( stripslashes( $activity->content ), 'bp-activities-content', array( 'media_buttons' => false, 'teeny' => true, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,code,spell,close' ) ) ); ?>
    609609                                                                        </div>
    function bp_activity_admin_edit_metabox_status( $item ) { 
    665665
    666666                                <div class="misc-pub-section curtime misc-pub-section-last">
    667667                                        <?php
    668                                         // translators: Publish box date format, see http://php.net/date
    669                                         $datef = __( 'M j, Y @ G:i', 'buddypress' );
     668                                        // Publish box date format, see http://php.net/date
     669                                        $datef = _x( 'M j, Y @ G:i', 'Publish box date format', 'buddypress' );
    670670                                        $date  = date_i18n( $datef, strtotime( $item->date_recorded ) );
    671671                                        ?>
    672                                         <span id="timestamp"><?php printf( __( 'Submitted on: <strong>%1$s</strong>', 'buddypress' ), $date ); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e( 'Edit', 'buddypress' ); ?></a>
     672                                        <span id="timestamp"><?php printf( _x( 'Submitted on: <strong>%1$s</strong>', 'publishing action', 'buddypress' ), $date ); ?></span>&nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js" tabindex='4'><?php _e( 'Edit', 'buddypress' ); ?></a>
    673673
    674674                                        <div id='timestampdiv' class='hide-if-js'>
    675675                                                <?php touch_time( 1, 0, 5 ); ?>
    function bp_activity_admin_edit_metabox_status( $item ) { 
    702702function bp_activity_admin_edit_metabox_link( $item ) {
    703703?>
    704704
    705         <label class="screen-reader-text" for="bp-activities-link"><?php _e( 'Link', 'buddypress' ); ?></label>
     705        <label class="screen-reader-text" for="bp-activities-link"><?php _ex( 'Link', 'Link metabox for the Activity admin edit screen', 'buddypress' ); ?></label>
    706706        <input type="url" name="bp-activities-link" value="<?php echo esc_url( $item->primary_link ); ?>" />
    707707        <p><?php _e( 'Activity generated by posts and comments, forum topics and replies, and some plugins, uses the link field for a permalink back to the content item.', 'buddypress' ); ?></p>
    708708
    function bp_activity_admin_edit_metabox_link( $item ) { 
    719719function bp_activity_admin_edit_metabox_userid( $item ) {
    720720?>
    721721
    722         <label class="screen-reader-text" for="bp-activities-userid"><?php _e( 'Author ID', 'buddypress' ); ?></label>
     722        <label class="screen-reader-text" for="bp-activities-userid"><?php _ex( 'Author ID', 'Activity admin edit screen', 'buddypress' ); ?></label>
    723723        <input type="number" name="bp-activities-userid" value="<?php echo esc_attr( $item->user_id ); ?>" min="1" />
    724724
    725725<?php
    function bp_activity_admin_edit_metabox_type( $item ) { 
    813813function bp_activity_admin_edit_metabox_itemids( $item ) {
    814814?>
    815815
    816         <label for="bp-activities-primaryid"><?php _e( 'Primary Item ID', 'buddypress' ); ?></label>
     816        <label for="bp-activities-primaryid"><?php _ex( 'Primary Item ID', 'Primary item ID/Secondary item ID metabox for the Activity admin edit screen', 'buddypress' ); ?></label>
    817817        <input type="number" name="bp-activities-primaryid" id="bp-activities-primaryid" value="<?php echo esc_attr( $item->item_id ); ?>" min="0" />
    818818        <br />
    819819
    820         <label for="bp-activities-secondaryid"><?php _e( 'Secondary Item ID', 'buddypress' ); ?></label>
     820        <label for="bp-activities-secondaryid"><?php _ex( 'Secondary Item ID', 'Primary item ID/Secondary item ID metabox for the Activity admin edit screen.', 'buddypress' ); ?></label>
    821821        <input type="number" name="bp-activities-secondaryid" id="bp-activities-secondaryid" value="<?php echo esc_attr( $item->secondary_item_id ); ?>" min="0" />
    822822
    823823        <p><?php _e( 'These identify the object that created this activity. For example, the fields could reference a pair of site and comment IDs.', 'buddypress' ); ?></p>
    function bp_activity_admin_index() { 
    873873                                // Display each error as a list item
    874874                                foreach ( $errors as $error ) {
    875875                                        // Translators: This is a bulleted list of item IDs
    876                                         $error_msg .= '<li>' . sprintf( __( '#%s', 'buddypress' ), number_format_i18n( $error ) ) . '</li>';
     876                                        $error_msg .= '<li>' . sprintf( _x( '#%s', 'is a bulleted list of item IDs', 'buddypress' ), number_format_i18n( $error ) ) . '</li>';
    877877                                }
    878878
    879879                                $error_msg  .= '</ul>';
    function bp_activity_admin_index() { 
    931931                                <td colspan="4">
    932932                                        <form method="get" action="">
    933933
    934                                                 <h5 id="bp-replyhead"><?php _e( 'Reply to Activity', 'buddypress' ); ?></h5>
     934                                                <h5 id="bp-replyhead"><?php _ex( 'Reply to Activity', 'Activity reply form', 'buddypress' ); ?></h5>
    935935                                                <?php wp_editor( '', 'bp-activities', array( 'dfw' => false, 'media_buttons' => false, 'quicktags' => array( 'buttons' => 'strong,em,link,block,del,ins,img,code,spell,close' ), 'tinymce' => false, ) ); ?>
    936936
    937937                                                <p id="bp-replysubmit" class="submit">
  • src/bp-activity/bp-activity-filters.php

    diff --git src/bp-activity/bp-activity-filters.php src/bp-activity/bp-activity-filters.php
    index a85342e..19c99e8 100644
    function bp_activity_truncate_entry( $text ) { 
    382382
    383383        // Run the text through the excerpt function. If it's too short, the original text will be
    384384        // returned.
     385        // translators: the excerpt ending
    385386        $excerpt        = bp_create_excerpt( $text, $excerpt_length, array( 'ending' => __( '&hellip;', 'buddypress' ) ) );
    386387
    387388        // If the text returned by bp_create_excerpt() is different from the original text (ie it's
    function bp_activity_heartbeat_strings( $strings = array() ) { 
    564565        }
    565566
    566567        $strings = array_merge( $strings, array(
    567                 'newest' => __( 'Load Newest', 'buddypress' ),
     568                'newest' => _x( 'Load Newest', 'Activity heartbeat', 'buddypress' ),
    568569                'pulse'  => absint( $pulse ),
    569570        ) );
    570571
  • src/bp-core/bp-core-functions.php

    diff --git src/bp-core/bp-core-functions.php src/bp-core/bp-core-functions.php
    index 36bcecf..2328432 100644
    function bp_core_time_since( $older_date, $newer_date = false ) { 
    817817        }
    818818
    819819        // Setup the strings
    820         $unknown_text   = apply_filters( 'bp_core_time_since_unknown_text',   __( 'sometime', 'buddypress' ) );
    821         $right_now_text = apply_filters( 'bp_core_time_since_right_now_text', __( 'right now', 'buddypress' ) );
    822         $ago_text       = apply_filters( 'bp_core_time_since_ago_text',       __( '%s ago',    'buddypress' ) );
     820        $unknown_text   = apply_filters( 'bp_core_time_since_unknown_text',   _x( 'sometime', 'BP time_since calculation:  synonym of unknow', 'buddypress' ) );
     821        $right_now_text = apply_filters( 'bp_core_time_since_right_now_text', _x( 'right now', 'BP time_since calculation', 'buddypress' ) );
     822        $ago_text       = apply_filters( 'bp_core_time_since_ago_text',       _x( '%s ago', 'BP time_since calculation', 'buddypress' ) );
    823823
    824824        // array of time period chunks
    825825        $chunks = array(
    function bp_core_get_last_activity( $last_activity_date = '', $string = '' ) { 
    11151115
    11161116        // Setup a default string if none was passed
    11171117        $string = empty( $string )
    1118                 ? __( '%s', 'buddypress' )
     1118                ? _x( '%s', 'Format of last activity time of the form 3 years ago', 'buddypress' )
    11191119                : $string;
    11201120
    11211121        // Use the string if a last activity date was passed
  • src/bp-core/bp-core-template.php

    diff --git src/bp-core/bp-core-template.php src/bp-core/bp-core-template.php
    index 3d71621..97a5e35 100644
    function bp_format_time( $time, $just_date = false, $localize_time = true ) { 
    294294                $time = date_i18n( get_option( 'time_format' ), $time_offset );
    295295
    296296                // Return string formatted with date and time
    297                 $date = sprintf( __( '%1$s at %2$s', 'buddypress' ), $date, $time );
     297                $date = sprintf( _x( '%1$s at %2$s', 'Date and time. Used by bp_format_time', 'buddypress' ), $date, $time );
    298298        }
    299299
    300300        return apply_filters( 'bp_format_time', $date );
    function bp_create_excerpt( $text, $length = 225, $options = array() ) { 
    539539        $filter_shortcodes_default = is_bool( $options ) ? $options : true;
    540540
    541541        $r = bp_parse_args( $options, array(
    542                 'ending'            => __( ' [&hellip;]', 'buddypress' ),
     542                'ending'            => _x( ' [&hellip;]', 'exerpt ending text. Use space[...]', 'buddypress' ),
    543543                'exact'             => false,
    544544                'html'              => true,
    545545                'filter_shortcodes' => $filter_shortcodes_default
  • src/bp-core/bp-core-widgets.php

    diff --git src/bp-core/bp-core-widgets.php src/bp-core/bp-core-widgets.php
    index 2cd01c0..35f582c 100644
    class BP_Core_Login_Widget extends WP_Widget { 
    7979                        <?php do_action( 'bp_before_login_widget_loggedout' ); ?>
    8080
    8181                        <form name="bp-login-form" id="bp-login-widget-form" class="standard-form" action="<?php echo esc_url( site_url( 'wp-login.php', 'login_post' ) ); ?>" method="post">
    82                                 <label for="bp-login-widget-user-login"><?php _e( 'Username', 'buddypress' ); ?></label>
     82                                <label for="bp-login-widget-user-login"><?php _ex( 'Username', 'Login widget', 'buddypress' ); ?></label>
    8383                                <input type="text" name="log" id="bp-login-widget-user-login" class="input" value="" />
    8484
    85                                 <label for="bp-login-widget-user-pass"><?php _e( 'Password', 'buddypress' ); ?></label>
     85                                <label for="bp-login-widget-user-pass"><?php _ex( 'Password', 'Login widget', 'buddypress' ); ?></label>
    8686                                <input type="password" name="pwd" id="bp-login-widget-user-pass" class="input" value=""  />
    8787
    88                                 <div class="forgetmenot"><label><input name="rememberme" type="checkbox" id="bp-login-widget-rememberme" value="forever" /> <?php _e( 'Remember Me', 'buddypress' ); ?></label></div>
     88                                <div class="forgetmenot"><label><input name="rememberme" type="checkbox" id="bp-login-widget-rememberme" value="forever" /> <?php _ex( 'Remember Me', 'Login widget', 'buddypress' ); ?></label></div>
    8989
    90                                 <input type="submit" name="wp-submit" id="bp-login-widget-submit" value="<?php esc_attr_e( 'Log In', 'buddypress' ); ?>" />
     90                                <input type="submit" name="wp-submit" id="bp-login-widget-submit" value="<?php echo esc_attr_x( 'Log In', 'Login widget', 'buddypress' ); ?>" />
    9191
    9292                                <?php if ( bp_get_signup_allowed() ) : ?>
    9393
    94                                         <span class="bp-login-widget-register-link"><?php printf( __( '<a href="%s" title="Register for a new account">Register</a>', 'buddypress' ), bp_get_signup_page() ); ?></span>
     94                                        <span class="bp-login-widget-register-link"><?php printf( _x( '<a href="%s" title="Register for a new account">Register</a>', 'Login widget', 'buddypress' ), bp_get_signup_page() ); ?></span>
    9595
    9696                                <?php endif; ?>
    9797
  • src/bp-groups/bp-groups-admin.php

    diff --git src/bp-groups/bp-groups-admin.php src/bp-groups/bp-groups-admin.php
    index 30b5cdd..5c075a6 100644
    function bp_groups_admin_autocomplete_handler() { 
    10101010
    10111011                        $matches[] = array(
    10121012                                // translators: 1: user_login, 2: user_email
    1013                                 'label' => sprintf( __( '%1$s (%2$s)', 'buddypress' ), $user->name, $user->ID ),
     1013                                'label' => sprintf( _x( '%1$s (%2$s)', '1 is user_login, 2 is user_email', 'buddypress' ), $user->name, $user->ID ),
    10141014                                'value' => $user->ID,
    10151015                        );
    10161016                }
  • src/bp-templates/bp-legacy/buddypress/members/register.php

    diff --git src/bp-templates/bp-legacy/buddypress/members/register.php src/bp-templates/bp-legacy/buddypress/members/register.php
    index 0eb9012..15619bf 100644
     
    2929
    3030                                <h4><?php _e( 'Account Details', 'buddypress' ); ?></h4>
    3131
    32                                 <label for="signup_username"><?php _e( 'Username', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     32                                <label for="signup_username"><?php _ex( 'Username', 'Basic Account Details', 'buddypress' ); ?> <?php _ex( '(required)', 'Basic Account Details', 'buddypress' ); ?></label>
    3333                                <?php do_action( 'bp_signup_username_errors' ); ?>
    3434                                <input type="text" name="signup_username" id="signup_username" value="<?php bp_signup_username_value(); ?>" />
    3535
    36                                 <label for="signup_email"><?php _e( 'Email Address', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     36                                <label for="signup_email"><?php _ex( 'Email Address', 'Basic Account Details', 'buddypress' ); ?> <?php _ex( '(required)', 'Basic Account Details', 'buddypress' ); ?></label>
    3737                                <?php do_action( 'bp_signup_email_errors' ); ?>
    3838                                <input type="text" name="signup_email" id="signup_email" value="<?php bp_signup_email_value(); ?>" />
    3939
    40                                 <label for="signup_password"><?php _e( 'Choose a Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     40                                <label for="signup_password"><?php _ex( 'Choose a Password', 'Basic Account Details', 'buddypress' ); ?> <?php _ex( '(required)', 'Basic Account Details', 'buddypress' ); ?></label>
    4141                                <?php do_action( 'bp_signup_password_errors' ); ?>
    4242                                <input type="password" name="signup_password" id="signup_password" value="" class="password-entry" />
    4343                                <div id="pass-strength-result"></div>
    4444
    45                                 <label for="signup_password_confirm"><?php _e( 'Confirm Password', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     45                                <label for="signup_password_confirm"><?php _ex( 'Confirm Password', 'Basic Account Details', 'buddypress' ); ?> <?php _ex( '(required)', 'Basic Account Details', 'buddypress' ); ?></label>
    4646                                <?php do_action( 'bp_signup_password_confirm_errors' ); ?>
    4747                                <input type="password" name="signup_password_confirm" id="signup_password_confirm" value="" class="password-entry-confirm" />
    4848
     
    6060
    6161                                <div class="register-section" id="profile-details-section">
    6262
    63                                         <h4><?php _e( 'Profile Details', 'buddypress' ); ?></h4>
     63                                        <h4><?php _ex( 'Profile Details', 'Profile Details screen title', 'buddypress' ); ?></h4>
    6464
    6565                                        <?php /* Use the profile field loop to render input fields for the 'base' profile field group */ ?>
    6666                                        <?php if ( bp_is_active( 'xprofile' ) ) : if ( bp_has_profile( array( 'profile_group_id' => 1, 'fetch_field_data' => false ) ) ) : while ( bp_profile_groups() ) : bp_the_profile_group(); ?>
     
    7777
    7878                                                        if ( bp_current_user_can( 'bp_xprofile_change_field_visibility' ) ) : ?>
    7979                                                                <p class="field-visibility-settings-toggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
    80                                                                         <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></a>
     80                                                                        <?php printf( _x( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'Profile field visibility', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?> <a href="#" class="visibility-toggle-link"><?php _ex( 'Change', 'Change profile field visibility level', 'buddypress' ); ?></a>
    8181                                                                </p>
    8282
    8383                                                                <div class="field-visibility-settings" id="field-visibility-settings-<?php bp_the_profile_field_id() ?>">
    8484                                                                        <fieldset>
    85                                                                                 <legend><?php _e( 'Who can see this field?', 'buddypress' ) ?></legend>
     85                                                                                <legend><?php _ex( 'Who can see this field?', 'Profile field visibility', 'buddypress' ) ?></legend>
    8686
    8787                                                                                <?php bp_profile_visibility_radio_buttons() ?>
    8888
    8989                                                                        </fieldset>
    90                                                                         <a class="field-visibility-settings-close" href="#"><?php _e( 'Close', 'buddypress' ) ?></a>
     90                                                                        <a class="field-visibility-settings-close" href="#"><?php _ex( 'Close', 'Profile field visibility', 'buddypress' ) ?></a>
    9191
    9292                                                                </div>
    9393                                                        <?php else : ?>
    9494                                                                <p class="field-visibility-settings-notoggle" id="field-visibility-settings-toggle-<?php bp_the_profile_field_id() ?>">
    95                                                                         <?php printf( __( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
     95                                                                        <?php printf( _x( 'This field can be seen by: <span class="current-visibility-level">%s</span>', 'Profile field visibility', 'buddypress' ), bp_get_the_profile_field_visibility_level_label() ) ?>
    9696                                                                </p>
    9797                                                        <?php endif ?>
    9898
     
    124124
    125125                                <div class="register-section" id="blog-details-section">
    126126
    127                                         <h4><?php _e( 'Blog Details', 'buddypress' ); ?></h4>
     127                                        <h4><?php _ex( 'Blog Details', 'Blog creation screen title', 'buddypress' ); ?></h4>
    128128
    129                                         <p><input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes, I\'d like to create a new site', 'buddypress' ); ?></p>
     129                                        <p><input type="checkbox" name="signup_with_blog" id="signup_with_blog" value="1"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _ex( 'Yes, I\'d like to create a new site', 'Blog creation', 'buddypress' ); ?></p>
    130130
    131131                                        <div id="blog-details"<?php if ( (int) bp_get_signup_with_blog_value() ) : ?>class="show"<?php endif; ?>>
    132132
    133                                                 <label for="signup_blog_url"><?php _e( 'Blog URL', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     133                                                <label for="signup_blog_url"><?php _ex( 'Blog URL', 'Blog creation', 'buddypress' ); ?> <?php _ex( '(required)', 'Blog creation', 'buddypress' ); ?></label>
    134134                                                <?php do_action( 'bp_signup_blog_url_errors' ); ?>
    135135
    136136                                                <?php if ( is_subdomain_install() ) : ?>
     
    139139                                                        <?php echo home_url( '/' ); ?> <input type="text" name="signup_blog_url" id="signup_blog_url" value="<?php bp_signup_blog_url_value(); ?>" />
    140140                                                <?php endif; ?>
    141141
    142                                                 <label for="signup_blog_title"><?php _e( 'Site Title', 'buddypress' ); ?> <?php _e( '(required)', 'buddypress' ); ?></label>
     142                                                <label for="signup_blog_title"><?php _ex( 'Site Title', 'Blog creation', 'buddypress' ); ?> <?php _ex( '(required)', 'Blog creation', 'buddypress' ); ?></label>
    143143                                                <?php do_action( 'bp_signup_blog_title_errors' ); ?>
    144144                                                <input type="text" name="signup_blog_title" id="signup_blog_title" value="<?php bp_signup_blog_title_value(); ?>" />
    145145
    146                                                 <span class="label"><?php _e( 'I would like my site to appear in search engines, and in public listings around this network.', 'buddypress' ); ?></span>
     146                                                <span class="label"><?php _ex( 'I would like my site to appear in search engines, and in public listings around this network.', 'Blog creation', 'buddypress' ); ?></span>
    147147                                                <?php do_action( 'bp_signup_blog_privacy_errors' ); ?>
    148148
    149149                                                <label><input type="radio" name="signup_blog_privacy" id="signup_blog_privacy_public" value="public"<?php if ( 'public' == bp_get_signup_blog_privacy_value() || !bp_get_signup_blog_privacy_value() ) : ?> checked="checked"<?php endif; ?> /> <?php _e( 'Yes', 'buddypress' ); ?></label>
     
    162162                        <?php do_action( 'bp_before_registration_submit_buttons' ); ?>
    163163
    164164                        <div class="submit">
    165                                 <input type="submit" name="signup_submit" id="signup_submit" value="<?php esc_attr_e( 'Complete Sign Up', 'buddypress' ); ?>" />
     165                                <input type="submit" name="signup_submit" id="signup_submit" value="<?php echo esc_attr_x( 'Complete Sign Up', 'Blog creation', 'buddypress' ); ?>" />
    166166                        </div>
    167167
    168168                        <?php do_action( 'bp_after_registration_submit_buttons' ); ?>