Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
05/24/2013 01:33:06 PM (13 years ago)
Author:
boonebgorges
Message:

Use _n() for plurals in bp_core_time_since()

The previous implementation used a hardcoded distinction between singular and
plurals, which is not flexible enough for many languages.

Fixes #5015

Props SergeyBiryukov

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/testcases/core/functions.php

    r7101 r7102  
    160160
    161161    /**
     162     * Sanity check for the singular version of 'year'
     163     *
     164     * @group bp_core_time_since
     165     */
     166    public function test_bp_core_time_since_year() {
     167        $now = time();
     168        $then = $now - YEAR_IN_SECONDS;
     169        $this->assertEquals( '1 year ago', bp_core_time_since( $then, $now ) );
     170    }
     171
     172    /**
    162173     * @group bp_core_time_since
    163174     */
Note: See TracChangeset for help on using the changeset viewer.