Skip to:
Content

BuddyPress.org

Changeset 2373


Ignore:
Timestamp:
01/19/2010 09:43:11 PM (15 years ago)
Author:
apeatling
Message:

Moving terms out of the JS so that they can be translated.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-adminbar.php

    r2312 r2373  
    2121
    2222    echo '</ul>';
    23     echo '</div></div>';
     23    echo "</div></div><!-- #wp-admin-bar -->\n\n";
    2424}
    2525
  • trunk/bp-themes/bp-default/_inc/global.js

    r2372 r2373  
    158158                if ( 'fav' == type ) {
    159159                    if ( !j('div.item-list-tabs li#activity-favorites').length )
    160                         j('div.item-list-tabs ul li#activity-atme').before( '<li id="activity-favorites"><a href="#">My Favorites (<span>0</span>)</a></li>');
     160                        j('div.item-list-tabs ul li#activity-atme').before( '<li id="activity-favorites"><a href="#">' + bp_terms_my_favs + ' (<span>0</span>)</a></li>');
    161161
    162162                    target.removeClass('fav');
     
    517517
    518518                    if ( !i )
    519                         j(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="Show all comments for this thread">Show all ' +  comment_count + ' comments</a></li>' );
     519                        j(this).before( '<li class="show-all"><a href="#' + parent_li.attr('id') + '/show-all/" title="' + bp_terms_show_all_comments + '">' + bp_terms_show_all + ' ' + comment_count + ' ' + bp_terms_comments + '</a></li>' );
    520520                }
    521521            });
     
    806806                button.fadeOut( 100, function() {
    807807                    if ( j(this).hasClass('accept') )
    808                         j(this).html( 'Accepted' ).fadeIn(50);
     808                        j(this).html( bp_terms_accepted ).fadeIn(50);
    809809                    else
    810                         j(this).html( 'Rejected' ).fadeIn(50);
     810                        j(this).html( bp_terms_rejected ).fadeIn(50);
    811811                });
    812812            }
  • trunk/bp-themes/bp-default/functions.php

    r2287 r2373  
    201201}
    202202
     203/* Add words that we need to use in JS to the end of the page so they can be translated and still used. */
     204function bp_dtheme_js_terms() { ?>
     205<script type="text/javascript">
     206    var bp_terms_my_favs = '<?php _e( "My Favorites", "buddypress" ) ?>';
     207    var bp_terms_accepted = '<?php _e( "Accepted", "buddypress" ) ?>';
     208    var bp_terms_rejected = '<?php _e( "Rejected", "buddypress" ) ?>';
     209    var bp_terms_show_all_comments = '<?php _e( "Show all comments for this thread", "buddypress" ) ?>';
     210    var bp_terms_show_all = '<?php _e( "Show all", "buddypress" ) ?>';
     211    var bp_terms_comments = '<?php _e( "comments", "buddypress" ) ?>';
     212    </script>
     213<?php
     214}
     215add_action( 'wp_footer', 'bp_dtheme_js_terms' );
     216
    203217/* Show a notice when the theme is activated - workaround by Ozh (http://old.nabble.com/Activation-hook-exist-for-themes--td25211004.html) */
    204218if ( is_admin() && isset($_GET['activated'] ) && $pagenow == "themes.php" ) {
Note: See TracChangeset for help on using the changeset viewer.