Skip to:
Content

BuddyPress.org

Changeset 10955


Ignore:
Timestamp:
07/24/2016 11:35:31 AM (10 years ago)
Author:
djpaul
Message:

Forums: fix i18n error in legacy forums templating code.

Fixes #6120

Props tw2113, DJPaul

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-forums/bp-forums-template.php

    r10825 r10955  
    14521452                global $forum_template;
    14531453
    1454                 if ( $forum_template->topic->topic_posts == 1 ) {
    1455 
    1456                         /**
    1457                          * Filters a 'x posts' string with the number of posts in the current topic.
    1458                          *
    1459                          * @since 1.0.0
    1460                          *
    1461                          * @param string $value 'X posts' string value for the current topic.
    1462                          */
    1463                         return apply_filters( 'bp_get_the_topic_total_post_count', sprintf( __( '%d post', 'buddypress' ), $forum_template->topic->topic_posts ) );
    1464                 } else {
    1465 
    1466                         /** This filter is documented in bp-forums/bp-forums-template.php */
    1467                         return apply_filters( 'bp_get_the_topic_total_post_count', sprintf( __( '%d posts', 'buddypress' ), $forum_template->topic->topic_posts ) );
    1468                 }
     1454                $output = _n( '%d post', '%d posts', (int) $forum_template->topic->topic_posts, 'buddypress' );
     1455
     1456                /**
     1457                 * Filters a 'x posts' string with the number of posts in the current topic.
     1458                 *
     1459                 * @since 1.0.0
     1460                 *
     1461                 * @param string $value 'X posts' string value for the current topic.
     1462                 */
     1463                return apply_filters( 'bp_get_the_topic_total_post_count', sprintf( $output, $forum_template->topic->topic_posts ) );
    14691464        }
    14701465
Note: See TracChangeset for help on using the changeset viewer.