Making WordPress.org

Changeset 6367

Timestamp:
01/12/2018 03:59:27 AM (7 years ago)
Author:
dd32
Message:

BuddyPress.org & bbPress.org: Internationalise some strings.

Props SergeyBiryukov.
See #2102.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/buddypress.org/public_html/wp-content/themes/bb-base/functions.php

    r5921 r6367  
    7878    <form role="search" method="get" id="searchform" action="">
    7979        <div>
    80             <h3><?php _e( 'Forum Search', 'bbporg'); ?></h3>
    81             <label class="screen-reader-text hidden" for="ts"><?php _e( 'Search for:', 'bbporg' ); ?></label>
     80            <h3><?php _e( 'Forum Search', 'bborg'); ?></h3>
     81            <label class="screen-reader-text hidden" for="ts"><?php _e( 'Search for:', 'bborg' ); ?></label>
    8282            <input type="text" value="<?php echo bb_base_topic_search_query(); ?>" name="ts" id="ts" />
    83             <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'bbporg' ); ?>" />
     83            <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'bborg' ); ?>" />
    8484        </div>
    8585    </form>
     
    9393    <form role="search" method="get" id="searchform" action="">
    9494        <div>
    95             <h3><?php _e( 'Reply Search', 'bbporg'); ?></h3>
    96             <label class="screen-reader-text hidden" for="rs"><?php _e( 'Search for:', 'bbporg' ); ?></label>
     95            <h3><?php _e( 'Reply Search', 'bborg'); ?></h3>
     96            <label class="screen-reader-text hidden" for="rs"><?php _e( 'Search for:', 'bborg' ); ?></label>
    9797            <input type="text" value="<?php echo bb_base_reply_search_query(); ?>" name="rs" id="rs" />
    98             <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'bbporg' ); ?>" />
     98            <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'bborg' ); ?>" />
    9999        </div>
    100100    </form>
     
    108108    <form role="search" method="get" id="searchform" action="">
    109109        <div>
    110             <h3><?php _e( 'Plugin Search', 'bbporg'); ?></h3>
    111             <label class="screen-reader-text hidden" for="ps"><?php _e( 'Search for:', 'bbporg' ); ?></label>
     110            <h3><?php _e( 'Plugin Search', 'bborg'); ?></h3>
     111            <label class="screen-reader-text hidden" for="ps"><?php _e( 'Search for:', 'bborg' ); ?></label>
    112112            <input type="text" value="<?php echo bb_base_plugin_search_query(); ?>" name="ps" id="ts" />
    113             <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'bbporg' ); ?>" />
     113            <input class="button" type="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'bborg' ); ?>" />
    114114        </div>
    115115    </form>
     
    174174
    175175    // Singular/Plural
    176     $voice_count = sprintf( _n( '%s participant', '%s participants', $voice_count, 'bbpress' ), bbp_number_format( $voice_count ) );
     176    $voice_count = sprintf( _n( '%s participant', '%s participants', $voice_count, 'bb' ), bbp_number_format( $voice_count ) );
    177177    $last_reply  = bbp_get_topic_last_active_id( $topic_id );
    178178
    179179    ?>
    180180
    181     <li class="topic-forum">In: <a href="<?php bbp_forum_permalink( bbp_get_topic_forum_id() ); ?>"><?php bbp_topic_forum_title(); ?></a></li>
    182     <?php if ( !empty( $reply_count ) ) : ?><li class="reply-count"><?php echo $reply_count; ?></li><?php endif; ?>
    183     <?php if ( !empty( $voice_count ) ) : ?><li class="voice-count"><?php echo $voice_count; ?></li><?php endif; ?>
     181    <li class="topic-forum"><?php
     182        /* translators: %s: forum title */
     183        printf( __( 'In: %s', 'bborg' ),
     184            sprintf( '<a href="%s">%s</a>',
     185                esc_url( bbp_get_forum_permalink( bbp_get_topic_forum_id() ) ),
     186                bbp_get_topic_forum_title()
     187            )
     188        );
     189    ?></li>
     190    <?php if ( !empty( $reply_count ) ) : ?>
     191        <li class="reply-count"><?php echo $reply_count; ?></li>
     192    <?php endif; ?>
     193    <?php if ( !empty( $voice_count ) ) : ?>
     194        <li class="voice-count"><?php echo $voice_count; ?></li>
     195    <?php endif; ?>
    184196    <?php if ( !empty( $last_reply  ) ) : ?>
    185         <li class="topic-freshness-author"><?php printf( __( 'Last reply from: %s', 'bbporg' ), bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_reply, 'size' => '15' ) ) ); ?></li>
    186     <?php endif; ?>
    187     <?php if ( !empty( $time_since  ) ) : ?><li class="topic-freshness-time"><?php printf( __( 'Last activity: %s', 'bbporg' ), $time_since ); ?></li><?php endif; ?>
     197        <li class="topic-freshness-author"><?php
     198            /* translators: %s: reply author link */
     199            printf( __( 'Last reply from: %s', 'bborg' ),
     200                bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_reply, 'size' => '15' ) )
     201            );
     202        ?></li>
     203    <?php endif; ?>
     204    <?php if ( !empty( $time_since  ) ) : ?>
     205        <li class="topic-freshness-time"><?php
     206            /* translators: %s: date/time link to the latest post */
     207            printf( __( 'Last activity: %s', 'bborg' ), $time_since );
     208        ?></li>
     209    <?php endif; ?>
    188210    <?php if ( is_user_logged_in() ) : ?>
    189211        <?php $_topic_id = bbp_is_reply_edit() ? bbp_get_reply_topic_id() : $topic_id; ?>
     
    208230    // Has replies
    209231    if ( !empty( $reply_count ) ) {
    210         $reply_text = sprintf( _n( '%s reply', '%s replies', $reply_count, 'bbpress' ), bbp_number_format( $reply_count ) );
     232        $reply_text = sprintf( _n( '%s reply', '%s replies', $reply_count, 'bb' ), bbp_number_format( $reply_count ) );
    211233    }
    212234
     
    218240    // Forum has no last active data
    219241    } else {
    220         $topic_text      = sprintf( _n( '%s topic', '%s topics', $topic_count, 'bbpress' ), bbp_number_format( $topic_count ) );
     242        $topic_text      = sprintf( _n( '%s topic', '%s topics', $topic_count, 'bb' ), bbp_number_format( $topic_count ) );
    221243    }
    222244    ?>
    223245
    224     <?php if ( bbp_get_forum_parent_id() ) : ?><li class="topic-parent">In: <a href="<?php bbp_forum_permalink( bbp_get_forum_parent_id() ); ?>"><?php bbp_forum_title( bbp_get_forum_parent_id() ); ?></a></li><?php endif; ?>
    225     <?php if ( !empty( $topic_count ) ) : ?><li class="topic-count"><?php echo $topic_text; ?></li><?php endif; ?>
    226     <?php if ( !empty( $reply_count ) ) : ?><li class="reply-count"><?php echo $reply_text; ?></li><?php endif; ?>
     246    <?php if ( bbp_get_forum_parent_id() ) : ?>
     247        <li class="topic-parent"><?php
     248            /* translators: %s: forum title */
     249            printf( __( 'In: %s', 'bborg' ),
     250                sprintf( '<a href="%s">%s</a>',
     251                    esc_url( bbp_get_forum_permalink( bbp_get_forum_parent_id() ) ),
     252                    bbp_get_forum_title( bbp_get_forum_parent_id() )
     253                )
     254            );
     255        ?></li>
     256    <?php endif; ?>
     257    <?php if ( !empty( $topic_count ) ) : ?>
     258        <li class="topic-count"><?php echo $topic_text; ?></li>
     259    <?php endif; ?>
     260    <?php if ( !empty( $reply_count ) ) : ?>
     261        <li class="reply-count"><?php echo $reply_text; ?></li>
     262    <?php endif; ?>
    227263    <?php if ( !empty( $last_active  ) ) : ?>
    228         <li class="forum-freshness-author"><?php printf( __( 'Last post by: %s', 'bbporg' ), bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_active ) ) ); ?></li>
    229     <?php endif; ?>
    230     <?php if ( !empty( $time_since  ) ) : ?><li class="forum-freshness-time"><?php printf( __( 'Last activity: %s', 'bbporg' ), $time_since ); ?></li><?php endif; ?>
     264        <li class="forum-freshness-author"><?php
     265            /* translators: %s: post author link */
     266            printf( __( 'Last post by: %s', 'bborg' ),
     267                bbp_get_author_link( array( 'type' => 'name', 'post_id' => $last_active ) )
     268            );
     269        ?></li>
     270    <?php endif; ?>
     271    <?php if ( !empty( $time_since  ) ) : ?>
     272        <li class="forum-freshness-time"><?php
     273            /* translators: %s: date/time link to the latest post */
     274            printf( __( 'Last activity: %s', 'bborg' ), $time_since );
     275        ?></li>
     276    <?php endif; ?>
    231277    <?php if ( is_user_logged_in() ) : ?>
    232278        <li class="forum-subscribe"><?php bbp_forum_subscription_link( array( 'forum_id' => $forum_id ) ); ?></li>
Note: See TracChangeset for help on using the changeset viewer.