594 | | array( 60 * 60 * 24 * 365 , __( 'year', 'buddypress' ), __( 'years', 'buddypress' ) ), |
595 | | array( 60 * 60 * 24 * 30 , __( 'month', 'buddypress' ), __( 'months', 'buddypress' ) ), |
596 | | array( 60 * 60 * 24 * 7, __( 'week', 'buddypress' ), __( 'weeks', 'buddypress' ) ), |
597 | | array( 60 * 60 * 24 , __( 'day', 'buddypress' ), __( 'days', 'buddypress' ) ), |
598 | | array( 60 * 60 , __( 'hour', 'buddypress' ), __( 'hours', 'buddypress' ) ), |
599 | | array( 60 , __( 'minute', 'buddypress' ), __( 'minutes', 'buddypress' ) ), |
600 | | array( 1, __( 'second', 'buddypress' ), __( 'seconds', 'buddypress' ) ) |
| 594 | YEAR_IN_SECONDS, |
| 595 | 30 * DAY_IN_SECONDS, |
| 596 | WEEK_IN_SECONDS, |
| 597 | DAY_IN_SECONDS, |
| 598 | HOUR_IN_SECONDS, |
| 599 | MINUTE_IN_SECONDS, |
| 600 | 1 |
649 | | $output = ( 1 == $count ) ? '1 '. $chunks[$i][1] : $count . ' ' . $chunks[$i][2]; |
| 649 | switch ( $seconds ) { |
| 650 | case YEAR_IN_SECONDS : |
| 651 | $output = sprintf( _n( '%s year', '%s years', $count, 'buddypress' ), $count ); |
| 652 | break; |
| 653 | case 30 * DAY_IN_SECONDS : |
| 654 | $output = sprintf( _n( '%s month', '%s months', $count, 'buddypress' ), $count ); |
| 655 | break; |
| 656 | case WEEK_IN_SECONDS : |
| 657 | $output = sprintf( _n( '%s week', '%s weeks', $count, 'buddypress' ), $count ); |
| 658 | break; |
| 659 | case DAY_IN_SECONDS : |
| 660 | $output = sprintf( _n( '%s day', '%s days', $count, 'buddypress' ), $count ); |
| 661 | break; |
| 662 | case HOUR_IN_SECONDS : |
| 663 | $output = sprintf( _n( '%s hour', '%s hours', $count, 'buddypress' ), $count ); |
| 664 | break; |
| 665 | case MINUTE_IN_SECONDS : |
| 666 | $output = sprintf( _n( '%s minute', '%s minutes', $count, 'buddypress' ), $count ); |
| 667 | break; |
| 668 | default: |
| 669 | $output = sprintf( _n( '%s second', '%s seconds', $count, 'buddypress' ), $count ); |
| 670 | } |
659 | | $output .= ( 1 == $count2 ) ? _x( ',', 'Separator in time since', 'buddypress' ) . ' 1 '. $name2 : _x( ',', 'Separator in time since', 'buddypress' ) . ' ' . $count2 . ' ' . $chunks[$i + 1][2]; |
| 679 | $output .= _x( ',', 'Separator in time since', 'buddypress' ) . ' '; |
| 680 | |
| 681 | switch ( $seconds2 ) { |
| 682 | case 30 * DAY_IN_SECONDS : |
| 683 | $output .= sprintf( _n( '%s month', '%s months', $count2, 'buddypress' ), $count2 ); |
| 684 | break; |
| 685 | case WEEK_IN_SECONDS : |
| 686 | $output .= sprintf( _n( '%s week', '%s weeks', $count2, 'buddypress' ), $count2 ); |
| 687 | break; |
| 688 | case DAY_IN_SECONDS : |
| 689 | $output .= sprintf( _n( '%s day', '%s days', $count2, 'buddypress' ), $count2 ); |
| 690 | break; |
| 691 | case HOUR_IN_SECONDS : |
| 692 | $output .= sprintf( _n( '%s hour', '%s hours', $count2, 'buddypress' ), $count2 ); |
| 693 | break; |
| 694 | case MINUTE_IN_SECONDS : |
| 695 | $output .= sprintf( _n( '%s minute', '%s minutes', $count2, 'buddypress' ), $count2 ); |
| 696 | break; |
| 697 | default: |
| 698 | $output .= sprintf( _n( '%s second', '%s seconds', $count2, 'buddypress' ), $count2 ); |
| 699 | } |