WordPress.org

Make WordPress Core

Changeset 23743


Ignore:
Timestamp:
03/18/13 17:58:30 (13 months ago)
Author:
ryan
Message:

Fix i18n for revision diff strings displaying human time.

Props johnbillion
fixes #23723

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/ajax-actions.php

    r23735 r23743  
    21352135 
    21362136            $revision_from_date_author = sprintf( 
    2137                 '%s %s, %s %s (%s)', 
     2137                /* translators: post revision title: 1: author avatar, 2: author name, 3: time ago, 4: date */ 
     2138                _x( '%1$s %2$s, %3$s ago (%4$s)', 'post revision title' ), 
    21382139                $compare_to_gravatar, 
    21392140                $compare_to_author, 
    21402141                human_time_diff( strtotime( $left_revision->post_modified ), current_time( 'timestamp' ) ), 
    2141                 __( ' ago ' ), 
    21422142                $compare_to_date 
    21432143            ); 
     
    22062206        $date = date_i18n( $datef, strtotime( $revision->post_modified ) ); 
    22072207        $revision_date_author = sprintf( 
    2208             '%s %s, %s %s (%s)', 
     2208            /* translators: post revision title: 1: author avatar, 2: author name, 3: time ago, 4: date */ 
     2209            _x( '%1$s %2$s, %3$s ago (%4$s)', 'post revision title' ), 
    22092210            $gravatar, 
    22102211            $author, 
    22112212            human_time_diff( strtotime( $revision->post_modified ), current_time( 'timestamp' ) ), 
    2212             __( ' ago ' ), 
    22132213            $date 
    22142214        ); 
  • trunk/wp-includes/post-template.php

    r23730 r23743  
    13181318 
    13191319    $revision_date_author = sprintf( 
    1320         '%s %s, %s %s (%s)', 
     1320        /* translators: post revision title: 1: author avatar, 2: author name, 3: time ago, 4: date */ 
     1321        _x( '%1$s %2$s, %3$s ago (%4$s)', 'post revision title' ), 
    13211322        $gravatar, 
    13221323        $author, 
    13231324        human_time_diff( strtotime( $revision->post_modified ), current_time( 'timestamp' ) ), 
    1324         __( 'ago' ), 
    13251325        $date 
    13261326    ); 
     
    14851485            $datef = _x( 'j F, Y @ G:i:s', 'revision date format');  
    14861486            $date = date_i18n( $datef, strtotime( $restored_from_meta[ 'restored_time' ] ) );  
    1487             $timesince = human_time_diff( $restored_from_meta[ 'restored_time' ], current_time( 'timestamp' ) ) . __( ' ago ' );  
     1487            $timesince = human_time_diff( $restored_from_meta[ 'restored_time' ], current_time( 'timestamp' ) );  
    14881488            ?>  
    14891489            <hr /> 
    14901490            <div id="revisions-meta-restored">  
    14911491                <?php  
    1492                 printf( 'Previously restored from Revision ID %d, %s by %s (%s)',  
     1492                /* translators: restored revision details: 1: revision ID, 2: time ago, 3: author name, 4: date */ 
     1493                printf( _x( 'Previously restored from revision ID %1$d, %2$s ago by %3$s (%4$s)', 'restored revision details' ),  
    14931494                $restored_from_meta[ 'restored_revision_id'],  
    14941495                $timesince,  
Note: See TracChangeset for help on using the changeset viewer.