Changeset 391 for trunk/bp-groups.php
- Timestamp:
- 10/12/2008 08:19:04 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups.php
r388 r391 164 164 165 165 /* Add 'Groups' to the main navigation */ 166 bp_core_add_nav_item( __('Groups' ), $bp['groups']['slug'] );166 bp_core_add_nav_item( __('Groups', 'buddypress'), $bp['groups']['slug'] ); 167 167 bp_core_add_nav_default( $bp['groups']['slug'], 'groups_screen_my_groups', 'my-groups' ); 168 168 … … 170 170 171 171 /* Add the subnav items to the groups nav item */ 172 bp_core_add_subnav_item( $bp['groups']['slug'], 'my-groups', __('My Groups' ), $groups_link, 'groups_screen_my_groups' );173 bp_core_add_subnav_item( $bp['groups']['slug'], 'group-finder', __('Group Finder' ), $groups_link, 'groups_screen_group_finder' );174 bp_core_add_subnav_item( $bp['groups']['slug'], 'create', __('Create a Group' ), $groups_link, 'groups_screen_create_group' );175 bp_core_add_subnav_item( $bp['groups']['slug'], 'invites', __('Invites' ), $groups_link, 'groups_screen_group_invites' );172 bp_core_add_subnav_item( $bp['groups']['slug'], 'my-groups', __('My Groups', 'buddypress'), $groups_link, 'groups_screen_my_groups' ); 173 bp_core_add_subnav_item( $bp['groups']['slug'], 'group-finder', __('Group Finder', 'buddypress'), $groups_link, 'groups_screen_group_finder' ); 174 bp_core_add_subnav_item( $bp['groups']['slug'], 'create', __('Create a Group', 'buddypress'), $groups_link, 'groups_screen_create_group' ); 175 bp_core_add_subnav_item( $bp['groups']['slug'], 'invites', __('Invites', 'buddypress'), $groups_link, 'groups_screen_group_invites' ); 176 176 177 177 if ( $bp['current_component'] == $bp['groups']['slug'] ) { … … 179 179 if ( bp_is_home() && !$is_single_group ) { 180 180 181 $bp['bp_options_title'] = __('My Groups' );181 $bp['bp_options_title'] = __('My Groups', 'buddypress'); 182 182 183 183 } else if ( !bp_is_home() && !$is_single_group ) { … … 208 208 bp_core_add_nav_default( $bp['groups']['slug'], 'groups_screen_group_home', 'home' ); 209 209 210 bp_core_add_subnav_item( $bp['groups']['slug'], 'home', __('Home' ), $group_link, 'groups_screen_group_home', 'group-home' );211 bp_core_add_subnav_item( $bp['groups']['slug'], 'forum', __('Forum' ), $group_link , 'groups_screen_group_forum', 'group-forum');210 bp_core_add_subnav_item( $bp['groups']['slug'], 'home', __('Home', 'buddypress'), $group_link, 'groups_screen_group_home', 'group-home' ); 211 bp_core_add_subnav_item( $bp['groups']['slug'], 'forum', __('Forum', 'buddypress'), $group_link , 'groups_screen_group_forum', 'group-forum'); 212 212 213 213 if ( function_exists('bp_wire_install') ) { 214 bp_core_add_subnav_item( $bp['groups']['slug'], 'wire', __('Wire' ), $group_link, 'groups_screen_group_wire', 'group-wire' );214 bp_core_add_subnav_item( $bp['groups']['slug'], 'wire', __('Wire', 'buddypress'), $group_link, 'groups_screen_group_wire', 'group-wire' ); 215 215 } 216 216 217 217 if ( function_exists('bp_gallery_install') ) { 218 bp_core_add_subnav_item( $bp['groups']['slug'], 'photos', __('Photos' ), $group_link, 'groups_screen_group_photos', 'group-photos' );218 bp_core_add_subnav_item( $bp['groups']['slug'], 'photos', __('Photos', 'buddypress'), $group_link, 'groups_screen_group_photos', 'group-photos' ); 219 219 } 220 220 221 bp_core_add_subnav_item( $bp['groups']['slug'], 'members', __('Members' ), $group_link, 'groups_screen_group_members', 'group-members' );221 bp_core_add_subnav_item( $bp['groups']['slug'], 'members', __('Members', 'buddypress'), $group_link, 'groups_screen_group_members', 'group-members' ); 222 222 223 223 if ( is_user_logged_in() && groups_is_user_member( $bp['loggedin_userid'], $group_obj->id ) ) { 224 bp_core_add_subnav_item( $bp['groups']['slug'], 'send-invites', __('Send Invites' ), $group_link, 'groups_screen_group_invite', 'group-invite' );225 bp_core_add_subnav_item( $bp['groups']['slug'], 'leave-group', __('Leave Group' ), $group_link, 'groups_screen_group_leave', 'group-leave' );224 bp_core_add_subnav_item( $bp['groups']['slug'], 'send-invites', __('Send Invites', 'buddypress'), $group_link, 'groups_screen_group_invite', 'group-invite' ); 225 bp_core_add_subnav_item( $bp['groups']['slug'], 'leave-group', __('Leave Group', 'buddypress'), $group_link, 'groups_screen_group_leave', 'group-leave' ); 226 226 } 227 227 } … … 279 279 280 280 if ( $member->save() ) { 281 $bp['message'] = __('Group invite accepted' );281 $bp['message'] = __('Group invite accepted', 'buddypress'); 282 282 $bp['message_type'] = 'success'; 283 283 } else { 284 $bp['message'] = __('Group invite could not be accepted' );284 $bp['message'] = __('Group invite could not be accepted', 'buddypress'); 285 285 $bp['message_type'] = 'error'; 286 286 } … … 288 288 } else if ( isset($bp['action_variables']) && in_array( 'reject', $bp['action_variables'] ) && is_numeric($bp['action_variables'][1]) ) { 289 289 if ( BP_Groups_Member::delete( $bp['loggedin_userid'], $bp['action_variables'][1] ) ) { 290 $bp['message'] = __('Group invite rejected' );290 $bp['message'] = __('Group invite rejected', 'buddypress'); 291 291 $bp['message_type'] = 'success'; 292 292 } else { 293 $bp['message'] = __('Group invite could not be rejected' );293 $bp['message'] = __('Group invite could not be rejected', 'buddypress'); 294 294 $bp['message_type'] = 'error'; 295 295 } … … 326 326 } else { 327 327 if ( !$group_obj_id = &groups_manage_group( $create_group_step, $_COOKIE['group_obj_id'] ) ) { 328 $bp['message'] = __('There was an error saving group details. Please try again.' );328 $bp['message'] = __('There was an error saving group details. Please try again.', 'buddypress'); 329 329 $bp['message_type'] = 'error'; 330 330 … … 373 373 bp_catch_uri( 'groups/group-home' ); 374 374 } else { 375 $bp['message'] = __('Wire message successfully posted.' );375 $bp['message'] = __('Wire message successfully posted.', 'buddypress'); 376 376 $bp['message_type'] = 'success'; 377 377 … … 390 390 bp_catch_uri( 'groups/group-home' ); 391 391 } else { 392 $bp['message'] = __('Wire message successfully deleted.' );392 $bp['message'] = __('Wire message successfully deleted.', 'buddypress'); 393 393 $bp['message_type'] = 'success'; 394 394 … … 438 438 groups_send_invites($group_obj); 439 439 440 $bp['message'] = __('Group invites sent.' );440 $bp['message'] = __('Group invites sent.', 'buddypress'); 441 441 $bp['message_type'] = 'success'; 442 442 … … 458 458 // remove the user from the group. 459 459 if ( !groups_leave_group( $group_obj->id ) ) { 460 $bp['message'] = __('There was an error leaving the group. Please try again.' );460 $bp['message'] = __('There was an error leaving the group. Please try again.', 'buddypress'); 461 461 $bp['message_type'] = 'error'; 462 462 } else { 463 $bp['message'] = __('You left the group successfully.' );463 $bp['message'] = __('You left the group successfully.', 'buddypress'); 464 464 $bp['message_type'] = 'success'; 465 465 } … … 490 490 if ( !BP_Groups_Member::check_is_member( $bp['loggedin_userid'], $group_obj->id ) ) { 491 491 if ( !groups_join_group($group_obj->id) ) { 492 $bp['message'] = __('There was an error joining the group. Please try again.' );492 $bp['message'] = __('There was an error joining the group. Please try again.', 'buddypress'); 493 493 $bp['message_type'] = 'error'; 494 494 } else { 495 $bp['message'] = __('You joined the group!' );495 $bp['message'] = __('You joined the group!', 'buddypress'); 496 496 $bp['message_type'] = 'success'; 497 497 } … … 540 540 return false; 541 541 542 return bp_core_get_userlink($bp['current_userid']) . ' ' . __('joined the group' ) . ' ' . '<a href="' . $bp['current_domain'] . $bp['groups']['slug'] . '/' . $group->slug . '">' . $group->name . '</a>. <span class="time-since">%s</span>';542 return bp_core_get_userlink($bp['current_userid']) . ' ' . __('joined the group', 'buddypress') . ' ' . '<a href="' . $bp['current_domain'] . $bp['groups']['slug'] . '/' . $group->slug . '">' . $group->name . '</a>. <span class="time-since">%s</span>'; 543 543 break; 544 544 case 'created_group': … … 548 548 return false; 549 549 550 return bp_core_get_userlink($bp['current_userid']) . ' ' . __('created the group' ) . ' ' . '<a href="' . $bp['current_domain'] . $bp['groups']['slug'] . '/' . $group->slug . '">' . $group->name . '</a>. <span class="time-since">%s</span>';550 return bp_core_get_userlink($bp['current_userid']) . ' ' . __('created the group', 'buddypress') . ' ' . '<a href="' . $bp['current_domain'] . $bp['groups']['slug'] . '/' . $group->slug . '">' . $group->name . '</a>. <span class="time-since">%s</span>'; 551 551 break; 552 552 case 'new_wire_post': … … 557 557 return false; 558 558 559 $content = bp_core_get_userlink($bp['current_userid']) . ' ' . __('wrote on the wire of the group' ) . ' ' . '<a href="' . $bp['current_domain'] . $bp['groups']['slug'] . '/' . $group->slug . '">' . $group->name . '</a>: <span class="time-since">%s</span>';559 $content = bp_core_get_userlink($bp['current_userid']) . ' ' . __('wrote on the wire of the group', 'buddypress') . ' ' . '<a href="' . $bp['current_domain'] . $bp['groups']['slug'] . '/' . $group->slug . '">' . $group->name . '</a>: <span class="time-since">%s</span>'; 560 560 $content .= '<blockquote>' . bp_create_excerpt($wire_post->content) . '</blockquote>'; 561 561 return $content; … … 617 617 // Set friendly error feedback. 618 618 $uploadErrors = array( 619 0 => __("There is no error, the file uploaded with success" ),620 1 => __("The uploaded file exceeds the upload_max_filesize directive in php.ini" ),621 2 => __("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form" ),622 3 => __("The uploaded file was only partially uploaded" ),623 4 => __("No file was uploaded" ),624 6 => __("Missing a temporary folder" )619 0 => __("There is no error, the file uploaded with success", 'buddypress'), 620 1 => __("The uploaded file exceeds the upload_max_filesize directive in php.ini", 'buddypress'), 621 2 => __("The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form", 'buddypress'), 622 3 => __("The uploaded file was only partially uploaded", 'buddypress'), 623 4 => __("No file was uploaded", 'buddypress'), 624 6 => __("Missing a temporary folder", 'buddypress') 625 625 ); 626 626 627 627 if ( !bp_core_check_avatar_upload($file) ) { 628 628 $avatar_error = true; 629 $avatar_error_msg = __('Your group avatar upload failed, please try again. Error was: ' . $uploadErrors[$file['file']['error']] );629 $avatar_error_msg = __('Your group avatar upload failed, please try again. Error was: ' . $uploadErrors[$file['file']['error']] , 'buddypress'); 630 630 } 631 631 … … 633 633 $avatar_error = true; 634 634 $avatar_size = size_format(1024 * CORE_MAX_FILE_SIZE); 635 $avatar_error_msg = __('The file you uploaded is too big. Please upload a file under' ) . size_format(1024 * CORE_MAX_FILE_SIZE);635 $avatar_error_msg = __('The file you uploaded is too big. Please upload a file under', 'buddypress') . size_format(1024 * CORE_MAX_FILE_SIZE); 636 636 } 637 637 638 638 else if ( !bp_core_check_avatar_type($file) ) { 639 639 $avatar_error = true; 640 $avatar_error_msg = __('Please upload only JPG, GIF or PNG photos.' );640 $avatar_error_msg = __('Please upload only JPG, GIF or PNG photos.', 'buddypress'); 641 641 } 642 642 … … 644 644 else if ( !$original = bp_core_handle_avatar_upload($file) ) { 645 645 $avatar_error = true; 646 $avatar_error_msg = __('Upload Failed! Your photo dimensions are likely too big.' );646 $avatar_error_msg = __('Upload Failed! Your photo dimensions are likely too big.', 'buddypress'); 647 647 } 648 648 649 649 else if ( !bp_core_check_avatar_dimensions($original) ) { 650 650 $avatar_error = true; 651 $avatar_error_msg = sprintf( __('The image you upload must have dimensions of %d x %d pixels or larger.' ), CORE_CROPPING_CANVAS_MAX, CORE_CROPPING_CANVAS_MAX );651 $avatar_error_msg = sprintf( __('The image you upload must have dimensions of %d x %d pixels or larger.', 'buddypress'), CORE_CROPPING_CANVAS_MAX, CORE_CROPPING_CANVAS_MAX ); 652 652 } 653 653 … … 722 722 $admin = new BP_Groups_Member( $bp['loggedin_userid'], $group->id ); 723 723 $admin->is_admin = 1; 724 $admin->user_title = __('Group Admin' );724 $admin->user_title = __('Group Admin', 'buddypress'); 725 725 $admin->date_modified = time(); 726 726 $admin->inviter_id = 0; … … 897 897 $message .= "Reject the invite: " . $invited_user->user_url . $bp['groups']['slug'] . "/invites/reject/" . $group_obj->id . "\n"; 898 898 899 wp_mail( $invited_user->email, __("New Group Invitation:" ) . $group_obj->name, $message, "From: noreply@" . $_SERVER[ 'HTTP_HOST' ] );899 wp_mail( $invited_user->email, __("New Group Invitation:", 'buddypress') . $group_obj->name, $message, "From: noreply@" . $_SERVER[ 'HTTP_HOST' ] ); 900 900 } 901 901
Note: See TracChangeset
for help on using the changeset viewer.