Skip to:
Content

bbPress.org

Changeset 6649


Ignore:
Timestamp:
08/11/2017 07:01:51 PM (9 years ago)
Author:
SergeyBiryukov
Message:

i18n: Simplify [6645] with translate_nooped_plural().

See #3139.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/formatting.php

    r6646 r6649  
    630630                // array of time period chunks
    631631                $chunks = array(
    632                         array( YEAR_IN_SECONDS,   '%s year',   '%s years',   _n_noop( '%s year',   '%s years',   'bbpress' ) ),
    633                         array( MONTH_IN_SECONDS,  '%s month',  '%s months',  _n_noop( '%s month',  '%s months',  'bbpress' ) ),
    634                         array( WEEK_IN_SECONDS,   '%s week',   '%s weeks',   _n_noop( '%s week',   '%s weeks',   'bbpress' ) ),
    635                         array( DAY_IN_SECONDS,    '%s day',    '%s days',    _n_noop( '%s day',    '%s days',    'bbpress' ) ),
    636                         array( HOUR_IN_SECONDS,   '%s hour',   '%s hours',   _n_noop( '%s hour',   '%s hours',   'bbpress' ) ),
    637                         array( MINUTE_IN_SECONDS, '%s minute', '%s minutes', _n_noop( '%s minute', '%s minutes', 'bbpress' ) ),
    638                         array( 1,                 '%s second', '%s seconds', _n_noop( '%s second', '%s seconds', 'bbpress' ) ),
     632                        array( YEAR_IN_SECONDS,   _n_noop( '%s year',   '%s years',   'bbpress' ) ),
     633                        array( MONTH_IN_SECONDS,  _n_noop( '%s month',  '%s months',  'bbpress' ) ),
     634                        array( WEEK_IN_SECONDS,   _n_noop( '%s week',   '%s weeks',   'bbpress' ) ),
     635                        array( DAY_IN_SECONDS,    _n_noop( '%s day',    '%s days',    'bbpress' ) ),
     636                        array( HOUR_IN_SECONDS,   _n_noop( '%s hour',   '%s hours',   'bbpress' ) ),
     637                        array( MINUTE_IN_SECONDS, _n_noop( '%s minute', '%s minutes', 'bbpress' ) ),
     638                        array( 1,                 _n_noop( '%s second', '%s seconds', 'bbpress' ) ),
    639639                );
    640640
    … …  
    681681
    682682                                // Set output var
    683                                 $output = sprintf( _n( $chunks[ $i ][1], $chunks[ $i ][2], $count, 'bbpress' ), bbp_number_format_i18n( $count ) );
     683                                $output = sprintf( translate_nooped_plural( $chunks[ $i ][1], $count, 'bbpress' ), bbp_number_format_i18n( $count ) );
    684684
    685685                                // Step two: the second chunk
    … …  
    691691                                        if ( 0 != $count2 ) {
    692692                                                $output .= _x( ',', 'Separator in time since', 'bbpress' ) . ' ';
    693                                                 $output .= sprintf( _n( $chunks[ $i + 1 ][1], $chunks[ $i + 1 ][2], $count2, 'bbpress' ), bbp_number_format_i18n( $count2 ) );
     693                                                $output .= sprintf( translate_nooped_plural( $chunks[ $i + 1 ][1], $count2, 'bbpress' ), bbp_number_format_i18n( $count2 ) );
    694694                                        }
    695695                                }
Note: See TracChangeset for help on using the changeset viewer.