Skip to:
Content

BuddyPress.org

Changeset 391 for trunk/bp-xprofile.php


Ignore:
Timestamp:
10/12/2008 08:19:04 PM (18 years ago)
Author:
apeatling
Message:

Added the 'buddypress' textdomain

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-xprofile.php

    r375 r391  
    7070                id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete
    7171              ) VALUES (
    72                 1, 1, 0, 'textbox', 'First Name', '', 1, 1, 0, '', 1, 0
     72                1, 1, 0, 'textbox', '" . __( 'First Name', 'buddypress') . "', '', 1, 1, 0, '', 1, 0
    7373              );";
    7474           
     
    7676                id, group_id, parent_id, type, name, description, is_required, field_order, option_order, order_by, is_public, can_delete
    7777              ) VALUES (
    78                 2, 1, 0, 'textbox', 'Last Name', '', 1, 2, 0, '', 1, 0
     78                2, 1, 0, 'textbox', '" . __( 'Last Name', 'buddypress') . "', '', 1, 2, 0, '', 1, 0
    7979              );";
    8080   
     
    138138   
    139139    if ( $wpdb->blogid == $bp['current_homebase_id'] ) {
    140         add_menu_page( __('Profile'), __('Profile'), 1, basename(__FILE__), 'bp_core_avatar_admin' );
    141         add_submenu_page( basename(__FILE__), __('Profile › Avatar'), __('Avatar'), 1, basename(__FILE__), 'xprofile_avatar_admin' );       
     140        add_menu_page( __('Profile', 'buddypress'), __('Profile', 'buddypress'), 1, basename(__FILE__), 'bp_core_avatar_admin' );
     141        add_submenu_page( basename(__FILE__), __('Profile › Avatar', 'buddypress'), __('Avatar', 'buddypress'), 1, basename(__FILE__), 'xprofile_avatar_admin' );       
    142142       
    143143        $groups = BP_XProfile_Group::get_all();
     
    145145        for ( $i=0; $i < count($groups); $i++ ) {
    146146            if ( $groups[$i]->fields ) {
    147                 add_submenu_page( basename(__FILE__), __('Profile') . '  &rsaquo; ' . $groups[$i]->name, $groups[$i]->name, 1, "xprofile_" . $groups[$i]->name, "xprofile_edit" );     
     147                add_submenu_page( basename(__FILE__), __('Profile', 'buddypress') . '  &rsaquo; ' . $groups[$i]->name, $groups[$i]->name, 1, "xprofile_" . $groups[$i]->name, "xprofile_edit" );       
    148148            }
    149149        }
     
    154154   
    155155        /* Add the administration tab under the "Site Admin" tab for site administrators */
    156         add_submenu_page( 'wpmu-admin.php', __("Profiles"), __("Profiles"), 1, "xprofile_settings", "xprofile_admin" );
     156        add_submenu_page( 'wpmu-admin.php', __("Profiles", 'buddypress'), __("Profiles", 'buddypress'), 1, "xprofile_settings", "xprofile_admin" );
    157157    }
    158158
     
    175175   
    176176    /* Add 'Profile' to the main navigation */
    177     bp_core_add_nav_item( __('Profile'), $bp['profile']['slug'] );
     177    bp_core_add_nav_item( __('Profile', 'buddypress'), $bp['profile']['slug'] );
    178178    bp_core_add_nav_default( $bp['profile']['slug'], 'xprofile_screen_display_profile', 'public' );
    179179   
     
    181181   
    182182    /* Add the subnav items to the profile */
    183     bp_core_add_subnav_item( $bp['profile']['slug'], 'public', __('Public'), $profile_link, 'xprofile_screen_display_profile' );
    184     bp_core_add_subnav_item( $bp['profile']['slug'], 'edit', __('Edit Profile'), $profile_link, 'xprofile_screen_edit_profile' );
    185     bp_core_add_subnav_item( $bp['profile']['slug'], 'change-avatar', __('Change Avatar'), $profile_link, 'xprofile_screen_change_avatar' );
     183    bp_core_add_subnav_item( $bp['profile']['slug'], 'public', __('Public', 'buddypress'), $profile_link, 'xprofile_screen_display_profile' );
     184    bp_core_add_subnav_item( $bp['profile']['slug'], 'edit', __('Edit Profile', 'buddypress'), $profile_link, 'xprofile_screen_edit_profile' );
     185    bp_core_add_subnav_item( $bp['profile']['slug'], 'change-avatar', __('Change Avatar', 'buddypress'), $profile_link, 'xprofile_screen_change_avatar' );
    186186
    187187    if ( $bp['current_component'] == $bp['profile']['slug'] ) {
    188188        if ( bp_is_home() ) {
    189             $bp['bp_options_title'] = __('My Profile');
     189            $bp['bp_options_title'] = __('My Profile', 'buddypress');
    190190        } else {
    191191            $bp['bp_options_avatar'] = bp_core_get_avatar( $bp['current_userid'], 1 );
     
    263263
    264264            if ( ( $wire_post->item_id == $bp['loggedin_userid'] && $wire_post->user_id == $bp['loggedin_userid'] ) || ( $wire_post->item_id == $bp['current_userid'] && $wire_post->user_id == $bp['current_userid'] ) ) {
    265                 $content = bp_core_get_userlink($wire_post->user_id) . ' ' . __('wrote on their own wire') . ': <span class="time-since">%s</span>';               
     265                $content = bp_core_get_userlink($wire_post->user_id) . ' ' . __('wrote on their own wire', 'buddypress') . ': <span class="time-since">%s</span>';             
    266266            } else if ( ( $wire_post->item_id != $bp['loggedin_userid'] && $wire_post->user_id == $bp['loggedin_userid'] ) || ( $wire_post->item_id != $bp['current_userid'] && $wire_post->user_id == $bp['current_userid'] ) ) {
    267                 $content = bp_core_get_userlink($wire_post->user_id) . ' ' . __('wrote on ') . bp_core_get_userlink( $wire_post->item_id, false, false, true, true ) . ' wire: <span class="time-since">%s</span>';             
     267                $content = bp_core_get_userlink($wire_post->user_id) . ' ' . __('wrote on ', 'buddypress') . bp_core_get_userlink( $wire_post->item_id, false, false, true, true ) . ' wire: <span class="time-since">%s</span>';               
    268268            }
    269269           
     
    277277                return false;
    278278               
    279             return bp_core_get_userlink($bp['current_userid']) . ' ' . __('updated the') . ' "<a href="' . $bp['current_domain'] . $bp['profile']['slug'] . '">' . $profile_group->name . '</a>" ' . __('information on') . ' ' . bp_your_or_their() . ' ' . __('profile') . '. <span class="time-since">%s</span>';
     279            return bp_core_get_userlink($bp['current_userid']) . ' ' . __('updated the', 'buddypress') . ' "<a href="' . $bp['current_domain'] . $bp['profile']['slug'] . '">' . $profile_group->name . '</a>" ' . __('information on', 'buddypress') . ' ' . bp_your_or_their() . ' ' . __('profile', 'buddypress') . '. <span class="time-since">%s</span>';
    280280        break;
    281281    }
     
    309309    <div class="wrap">
    310310       
    311         <h2><?php echo $group->name ?> <?php _e("Information") ?></h2>
     311        <h2><?php echo $group->name ?> <?php _e("Information", 'buddypress') ?></h2>
    312312       
    313313        <?php
     
    329329                           
    330330                            // Validate the field.
    331                             $field->message = sprintf( __('%s cannot be left blank.'), $field->name );
     331                            $field->message = sprintf( __('%s cannot be left blank.', 'buddypress'), $field->name );
    332332                            $errors[] = $field->message . "<br />";
    333333                        } else if ( !$field->is_required && ( $current_field == '' || is_null($current_field) ) ) {
     
    357357
    358358                            if( !$profile_data->save() ) {
    359                                 $field->message = __('There was a problem saving changes to this field, please try again.');
     359                                $field->message = __('There was a problem saving changes to this field, please try again.', 'buddypress');
    360360                            } else {
    361361                                $field->data->value = $profile_data->value;
     
    370370               
    371371                $list_html .= '<p class="submit">
    372                                 <input type="submit" name="save" id="save" value="'.__('Save Changes &raquo;').'" />
     372                                <input type="submit" name="save" id="save" value="'.__('Save Changes &raquo;', 'buddypress').'" />
    373373                               </p>';
    374374
    375375                if ( $errors && isset($_POST['save']) ) {
    376376                    $type = 'error';
    377                     $message = __('There were problems saving your information. Please fix the following:<br />');
     377                    $message = __('There were problems saving your information. Please fix the following:<br />', 'buddypress');
    378378                   
    379379                    for ( $i = 0; $i < count($errors); $i++ ) {
     
    382382                } else if ( !$errors && isset($_POST['save'] ) ) {
    383383                    $type = 'success';
    384                     $message = __('Changes saved.');
     384                    $message = __('Changes saved.', 'buddypress');
    385385                   
    386386                    do_action( 'bp_xprofile_updated_profile', array( 'item_id' => $group->id, 'component_name' => 'profile', 'component_action' => 'updated_profile', 'is_private' => 0 ) );
     
    390390            else { ?>
    391391                <div id="message" class="error fade">
    392                     <p><?php _e('That group does not exist.'); ?></p>
     392                    <p><?php _e('That group does not exist.', 'buddypress'); ?></p>
    393393                </div>
    394394            <?php
     
    431431?>
    432432    <div class="wrap">
    433         <h2><?php _e('Profile Settings'); ?></h2>
     433        <h2><?php _e('Profile Settings', 'buddypress'); ?></h2>
    434434        <p>Member profile settings will appear here.</p>
    435435    </div>
Note: See TracChangeset for help on using the changeset viewer.