Skip to:
Content

BuddyPress.org

Changeset 391 for trunk/bp-groups.php


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

Added the 'buddypress' textdomain

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups.php

    r388 r391  
    164164
    165165    /* 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'] );
    167167    bp_core_add_nav_default( $bp['groups']['slug'], 'groups_screen_my_groups', 'my-groups' );
    168168       
     
    170170   
    171171    /* 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' );
    176176   
    177177    if ( $bp['current_component'] == $bp['groups']['slug'] ) {
     
    179179        if ( bp_is_home() && !$is_single_group ) {
    180180           
    181             $bp['bp_options_title'] = __('My Groups');
     181            $bp['bp_options_title'] = __('My Groups', 'buddypress');
    182182           
    183183        } else if ( !bp_is_home() && !$is_single_group ) {
     
    208208            bp_core_add_nav_default( $bp['groups']['slug'], 'groups_screen_group_home', 'home' );
    209209           
    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');
    212212           
    213213            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' );
    215215            }
    216216           
    217217            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' );
    219219            }
    220220           
    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' );
    222222           
    223223            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' );
    226226            }
    227227        }
     
    279279
    280280        if ( $member->save() ) {
    281             $bp['message'] = __('Group invite accepted');
     281            $bp['message'] = __('Group invite accepted', 'buddypress');
    282282            $bp['message_type'] = 'success';
    283283        } else {
    284             $bp['message'] = __('Group invite could not be accepted');
     284            $bp['message'] = __('Group invite could not be accepted', 'buddypress');
    285285            $bp['message_type'] = 'error';                 
    286286        }
     
    288288    } else if ( isset($bp['action_variables']) && in_array( 'reject', $bp['action_variables'] ) && is_numeric($bp['action_variables'][1]) ) {
    289289        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');
    291291            $bp['message_type'] = 'success';
    292292        } else {
    293             $bp['message'] = __('Group invite could not be rejected');
     293            $bp['message'] = __('Group invite could not be rejected', 'buddypress');
    294294            $bp['message_type'] = 'error';             
    295295        }
     
    326326        } else {
    327327            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');
    329329                $bp['message_type'] = 'error';
    330330       
     
    373373                bp_catch_uri( 'groups/group-home' );
    374374            } else {
    375                 $bp['message'] = __('Wire message successfully posted.');
     375                $bp['message'] = __('Wire message successfully posted.', 'buddypress');
    376376                $bp['message_type'] = 'success';
    377377
     
    390390                bp_catch_uri( 'groups/group-home' );
    391391            } else {
    392                 $bp['message'] = __('Wire message successfully deleted.');
     392                $bp['message'] = __('Wire message successfully deleted.', 'buddypress');
    393393                $bp['message_type'] = 'success';
    394394
     
    438438            groups_send_invites($group_obj);
    439439           
    440             $bp['message'] = __('Group invites sent.');
     440            $bp['message'] = __('Group invites sent.', 'buddypress');
    441441            $bp['message_type'] = 'success';
    442442           
     
    458458            // remove the user from the group.
    459459            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');
    461461                $bp['message_type'] = 'error';                                     
    462462            } else {
    463                 $bp['message'] = __('You left the group successfully.');
     463                $bp['message'] = __('You left the group successfully.', 'buddypress');
    464464                $bp['message_type'] = 'success';   
    465465            }
     
    490490    if ( !BP_Groups_Member::check_is_member( $bp['loggedin_userid'], $group_obj->id ) ) {
    491491        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');
    493493            $bp['message_type'] = 'error';
    494494        } else {
    495             $bp['message'] = __('You joined the group!');
     495            $bp['message'] = __('You joined the group!', 'buddypress');
    496496            $bp['message_type'] = 'success';   
    497497        }
     
    540540                return false;
    541541               
    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>';
    543543        break;
    544544        case 'created_group':
     
    548548                return false;
    549549               
    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>';
    551551        break;
    552552        case 'new_wire_post':
     
    557557                return false;       
    558558                   
    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>';         
    560560            $content .= '<blockquote>' . bp_create_excerpt($wire_post->content) . '</blockquote>';
    561561            return $content;
     
    617617    // Set friendly error feedback.
    618618    $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')
    625625    );
    626626
    627627    if ( !bp_core_check_avatar_upload($file) ) {
    628628        $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');
    630630    }
    631631
     
    633633        $avatar_error = true;
    634634        $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);
    636636    }
    637637   
    638638    else if ( !bp_core_check_avatar_type($file) ) {
    639639        $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');     
    641641    }
    642642
     
    644644    else if ( !$original = bp_core_handle_avatar_upload($file) ) {
    645645        $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');                       
    647647    }
    648648
    649649    else if ( !bp_core_check_avatar_dimensions($original) ) {
    650650        $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 );
    652652    }
    653653   
     
    722722                    $admin = new BP_Groups_Member( $bp['loggedin_userid'], $group->id );
    723723                    $admin->is_admin = 1;
    724                     $admin->user_title = __('Group Admin');
     724                    $admin->user_title = __('Group Admin', 'buddypress');
    725725                    $admin->date_modified = time();
    726726                    $admin->inviter_id = 0;
     
    897897        $message .= "Reject the invite: " . $invited_user->user_url . $bp['groups']['slug'] . "/invites/reject/" . $group_obj->id . "\n";
    898898
    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' ]  );
    900900    }
    901901
Note: See TracChangeset for help on using the changeset viewer.