Skip to:
Content

BuddyPress.org

Ticket #172: buddypress_l18n_4.patch

File buddypress_l18n_4.patch, 8.1 KB (added by GIGALinux, 16 years ago)
  • bp-wire/bp-wire-templatetags.php

     
    224224        echo $bp['wire']['image_base'] . '/ajax-loader.gif';
    225225}
    226226
    227 function bp_wire_post_date( $date_format = null ) {
     227function bp_wire_post_date( $date_format = null, $echo = true ) {
    228228        global $wire_posts_template;
    229229
    230230        if ( !$date_format )
    231231                $date_format = get_option('date_format');
    232232               
    233         echo mysql2date( $date_format, $wire_posts_template->wire_post->date_posted ); 
     233        if ( $echo == true )
     234                echo mysql2date( $date_format, $wire_posts_template->wire_post->date_posted );
     235        else
     236                return mysql2date( $date_format, $wire_posts_template->wire_post->date_posted );       
    234237}
    235238
    236 function bp_wire_post_author_name() {
     239function bp_wire_post_author_name( $echo = true ) {
    237240        global $wire_posts_template;
    238241       
    239         echo bp_core_get_userlink( $wire_posts_template->wire_post->user_id );
     242        if ( $echo == true )
     243                echo bp_core_get_userlink( $wire_posts_template->wire_post->user_id );
     244        else
     245                return bp_core_get_userlink( $wire_posts_template->wire_post->user_id );
    240246}
    241247
    242248function bp_wire_post_author_avatar() {
     
    273279        echo bp_core_get_avatar( $bp['loggedin_userid'], 1 );
    274280}
    275281
    276 function bp_wire_poster_name() {
     282function bp_wire_poster_name( $echo = true ) {
    277283        global $bp;
    278284       
    279         echo '<a href="' . $bp['loggedin_domain'] . $bp['profile']['slug'] . '">' . __('You', 'buddypress') . '</a>';
     285        if ( $echo == true )
     286                echo '<a href="' . $bp['loggedin_domain'] . $bp['profile']['slug'] . '">' . __('You', 'buddypress') . '</a>';
     287        else
     288                return '<a href="' . $bp['loggedin_domain'] . $bp['profile']['slug'] . '">' . __('You', 'buddypress') . '</a>';
    280289}
    281290
    282 function bp_wire_poster_date( $date_format = null ) {
     291function bp_wire_poster_date( $date_format = null, $echo = true ) {
    283292        if ( !$date_format )
    284293                $date_format = get_option('date_format');
    285294
    286         echo mysql2date( $date_format, date("Y-m-d H:i:s") );   
     295        if ( $echo == true )
     296                echo mysql2date( $date_format, date("Y-m-d H:i:s") );
     297        else
     298                return mysql2date( $date_format, date("Y-m-d H:i:s") );
    287299}
    288300
    289301function bp_wire_delete_link() {
  • buddypress-theme/buddypress-member/404.php

     
    11<?php get_header() ?>
    22
    33<div class="content-header">
    4         Permission Denied
     4        <?php _e("Permission Denied", "buddypress"); ?>
    55</div>
    66
    77<div id="content">
    8         <h2>Not Found / No Access</h2>
    9         <p>The page you are looking for either does not exist, or you do not have the permissions to access it.</p>
     8        <h2><?php _e("Not Found / No Access", "buddypress"); ?></h2>
     9        <p><?php _e("The page you are looking for either does not exist, or you do not have the permissions to access it.", "buddypress"); ?></p>
    1010</div>
    1111
    1212
  • buddypress-theme/buddypress-member/profile/change-avatar.php

     
    44
    55<div id="content">
    66       
    7         <h2>Change Avatar</h2>
     7        <h2><?php _e("Change Avatar", "buddypress"); ?></h2>
    88       
    99        <?php bp_avatar_upload_form() ?>
    1010
  • buddypress-theme/buddypress-member/profile/edit.php

     
    88
    99<div id="content">
    1010       
    11         <h2>Editing '<?php bp_profile_group_name() ?>'</h2>
     11        <h2><?php printf(__("Editing '%s'", "buddypress"), bp_profile_group_name(false)); ?></h2>
    1212       
    1313        <?php bp_edit_profile_form() ?>
    1414
  • buddypress-theme/buddypress-member/profile/profile-loop.php

     
    2828<?php else: ?>
    2929       
    3030        <div id="message" class="info">
    31                 <p>Sorry, this person does not have a public profile.</p>
     31                <p><?php _e("Sorry, this person does not have a public profile.", "buddypress"); ?></p>
    3232        </div>
    3333       
    3434<?php endif;?>
  • buddypress-theme/buddypress-member/userbar.php

     
    11<div id="userbar">
    2         <h3>Me</h3>
     2        <h3><?php _e("Me", "buddypress"); ?></h3>
    33        <?php if ( is_user_logged_in() ) : ?>
    44               
    55                <?php if ( function_exists('bp_loggedinuser_avatar_thumbnail') ) : ?>
     
    1818                        <img src="<?php get_option('home') ?>/wp-content/mu-plugins/bp-xprofile/images/none-thumbnail.gif" alt="No User" />
    1919                </p>
    2020               
    21                 <p id="login-text">You must log in to access your account.</p>
     21                <p id="login-text"><?php _e("You must log in to access your account.", "buddypress"); ?></p>
    2222       
    2323                <form name="loginform" id="loginform" action="<?php get_option('home') ?>/wp-login.php" method="post">
    2424                        <p>
  • buddypress-theme/buddypress-member/wire/post-form.php

     
    22        <form action="<?php bp_wire_get_action() ?>" id="wire-post-new-form" method="post">
    33                <div id="wire-post-new-metadata">
    44                        <?php bp_wire_poster_avatar() ?>
    5                         On <?php bp_wire_poster_date() ?>
    6                         <?php bp_wire_poster_name() ?> said:
     5                        <?php printf(__('On %1$s %2$s said:', "buddypress"), bp_wire_poster_date(null, false), bp_wire_poster_name(false)); ?>
    76                </div>
    87       
    98                <div id="wire-post-new-input">
    109                        <textarea name="wire-post-textarea" id="wire-post-textarea"></textarea>
    1110
    1211                        <?php if ( bp_wire_show_email_notify() ) : ?>
    13                                 <p><input type="checkbox" name="wire-post-email-notify" id="wire-post-email-notify" value="1" /> Notify members via email (will slow down posting)</p>
     12                                <p><input type="checkbox" name="wire-post-email-notify" id="wire-post-email-notify" value="1" /> <?php _e("Notify members via email (will slow down posting)", "buddypress"); ?></p>
    1413                        <?php endif; ?>
    1514                       
    1615                        <input type="submit" name="wire-post-submit" id="wire-post-submit" value="Post &raquo;" />
  • buddypress-theme/buddypress-member/wire/post-list.php

     
    11<div class="info-group">
    2         <h4><?php bp_wire_title() ?> <a href="<?php bp_wire_see_all_link() ?>">See All &raquo;</a></h4>
     2        <h4><?php bp_wire_title() ?> <a href="<?php bp_wire_see_all_link() ?>"><?php _e("See All &raquo;", "buddypress"); ?></a></h4>
    33
    44        <form name="wire-post-list-form" id="wire-post-list-form" action="" method="post">
    55        <?php if ( bp_has_wire_posts( bp_wire_item_id(), bp_wire_can_post() ) ) : ?>
     
    77                <?php if ( bp_wire_needs_pagination() ) : ?>
    88                        <div id="wire-count" class="pag-count">
    99                                <?php bp_wire_pagination_count() ?> &nbsp;
    10                                 <img id="ajax-loader" src="<?php bp_wire_ajax_loader_src() ?>" height="7" alt="Loading" style="display: none;" />
     10                                <img id="ajax-loader" src="<?php bp_wire_ajax_loader_src() ?>" height="7" alt="<?php _e("Loading", "buddypress"); ?>" style="display: none;" />
    1111                        </div>
    1212               
    1313                        <div id="wire-pagination" class="pagination-links">
     
    2020                        <li>
    2121                                <div class="wire-post-metadata">
    2222                                        <?php bp_wire_post_author_avatar() ?>
    23                                         On <?php bp_wire_post_date() ?>
    24                                         <?php bp_wire_post_author_name() ?> said:
     23                                        <?php printf(__('On %1$s %2$s said:', "buddypress"), bp_wire_post_date(null, false), bp_wire_post_author_name(false)); ?>
    2524                                        <?php bp_wire_delete_link() ?>
    2625                                </div>
    2726