Skip to:
Content

BuddyPress.org

Ticket #4: bp_xprofile.patch

File bp_xprofile.patch, 4.0 KB (added by momo360modena, 17 years ago)
  • .

     
    8686{
    8787        global $wpdb, $bp_xprofile_table_name, $wpmuBaseTablePrefix, $bp_xprofile, $groups;
    8888
    89         add_menu_page("Profile", "Profile", 1, basename(__FILE__), "xprofile_picture");
    90         add_submenu_page(basename(__FILE__), "Picture", "Picture", 1, basename(__FILE__), "xprofile_picture");         
     89        add_menu_page(__("Profile"), __("Profile"), 1, basename(__FILE__), "xprofile_picture");
     90        add_submenu_page(basename(__FILE__), __("Picture"), __("Picture"), 1, basename(__FILE__), "xprofile_picture");         
    9191       
    9292        $groups = BP_XProfile_Group::get_all();
    9393
     
    9898        }
    9999       
    100100        /* Add the administration tab under the "Site Admin" tab for site administrators */
    101         add_submenu_page('bp_core.php', "Profiles", "Profiles", 1, "xprofile_settings", "xprofile_admin");
     101        add_submenu_page('bp_core.php', __("Profiles"), __("Profiles"), 1, "xprofile_settings", "xprofile_admin");
    102102
    103103        /* Need to check db tables exist, activate hook no-worky in mu-plugins folder. */
    104104        if($wpdb->get_var("show tables like '$bp_xprofile_table_name'") != $bp_xprofile_table_name) xprofile_install();
     
    238238                                                   ($field->is_required && $current_field == ''))
    239239                                                {
    240240                                                        // Validate the field.
    241                                                         $field->message = __($field->name . ' cannot be left blank.');
     241                                                        $field->message = sprintf(__('%s cannot be left blank.'), $field->name);
    242242                                                        $errors[] = $field->message . "<br />";
    243243                                                }
    244244                                                else if(!$field->is_required && $current_field == '')
     
    286286                                $list_html .= '</ul>';
    287287                               
    288288                                $list_html .= '<p class="submit">
    289                                                                 <input type="submit" name="save" id="save" value="Save Changes &raquo;" />
     289                                                                <input type="submit" name="save" id="save" value="'.__('Save Changes &raquo;').'" />
    290290                                                           </p>';
    291291
    292292                                if($errors && isset($_POST['save']))
     
    308308                        }
    309309                        else
    310310                        {
    311                                 $list_html .= '<p>This group is currently empty. Please contact the site admin if this is incorrect.</p>';
     311                                $list_html .= '<p>'.__('This group is currently empty. Please contact the site admin if this is incorrect.').'</p>';
    312312                        }
    313313                       
    314314                ?>
     
    412412                        <div id="profilePicture">
    413413                       
    414414                                <div id="currentPicture">
    415                                         <h2>Current Picture</h2>
     415                                        <h2><?php _e('Current Picture'); ?></h2>
    416416                                        <?php echo $current_thumbnail->html; ?>
    417417                                       
    418418                                        <p style="text-align: center">[ <a href="admin.php?page=bp_xprofile.php&amp;mode=delete_picture&amp;file=<?php echo $current["picture"]; ?>">delete picture</a> ]</p>
    419419                                       
    420420                                        <form action="admin.php?page=bp_xprofile.php" enctype="multipart/form-data" method="post">
    421                                                 <h3>Upload a Picture</h3>
     421                                                <h3><?php _e('Upload a Picture'); ?></h3>
    422422
    423423                                                <input type="file" name="profile_image" id="profile_image" />
    424                                                 <p class="submit" style="text-align: center"><input type="submit" name="submit" value="Upload Picture &raquo;" /></p>
     424                                                <p class="submit" style="text-align: center">
     425                                                        <input type="submit" name="submit" value="<?php _e('Upload Picture &raquo;'); ?>" /></p>
    425426
    426427                                                <input type="hidden" name="action" value="save" />
    427428                                                <input type="hidden" name="max_file_size" value="1000000" />
     
    431432                        </div>
    432433                       
    433434                        <div id="otherPictures">
    434                                 <h2>Previously Uploaded</h2>
     435                                <h2><?php _e('Previously Uploaded'); ?></h2>
    435436                                <?php $pictures = BP_XProfile_Picture::get_all(ABSPATH . $profile_picture_path); ?>
    436437                                <ul>
    437438                                <?php for($i=0; $i<count($pictures); $i++) { ?>
    438439                                        <li>
    439440                                                <a href="admin.php?page=bp_xprofile.php&amp;mode=set_picture&amp;file=<?php echo $pictures[$i]["file"]; ?>">
    440                                                         <img src="<?php echo get_option('site_url') . 'files/profilepics/' . $pictures[$i]["thumbnail"]; ?>" alt="Alternate Pic" style="height: 100px;" /></li>
     441                                                        <img src="<?php echo get_option('site_url') . 'files/profilepics/' . $pictures[$i]["thumbnail"]; ?>" alt="<?php _e('Alternate Pic'); ?>" style="height: 100px;" /></li>
    441442                                                </a>
    442443                                        </li>
    443444                                <?php } ?>