Proper translation of '<time> ago' in revisions. props johnbillion, fixes #24721.

git-svn-id: http://core.svn.wordpress.org/trunk@24643 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin 2013-07-10 16:15:18 +00:00
parent bfb3b89672
commit bcd2644d92
2 changed files with 4 additions and 4 deletions

View File

@ -91,7 +91,7 @@ function wp_prepare_revisions_for_js( $post, $selected_revision_id ) {
'date' => date_i18n( __( 'M j, Y @ G:i' ), $modified_gmt ),
'dateShort' => date_i18n( _x( 'j M @ G:i', 'revision date short format' ), $modified_gmt ),
'dateUnix' => $modified_gmt,
'timeAgo' => human_time_diff( $modified_gmt, $current ),
'timeAgo' => sprintf( __( '%s ago' ), human_time_diff( $modified_gmt, $current ) ),
'autosave' => wp_is_post_autosave( $revision ),
'current' => $revision->post_modified_gmt === $post->post_modified_gmt,
'restoreUrl' => urldecode( $restore_link ),

View File

@ -130,7 +130,7 @@ require_once( './admin-header.php' );
<div class="revisions-tooltip-content">
<# if ( 'undefined' !== typeof data && 'undefined' !== typeof data.author ) { #>
{{{ data.author.avatar }}} {{{ data.author.name }}},
{{{ data.timeAgo }}} <?php _e( 'ago' ); ?>
{{{ data.timeAgo }}}
({{{ data.dateShort }}})
<# } #>
</div>
@ -159,7 +159,7 @@ require_once( './admin-header.php' );
<strong><?php _ex( 'From:', 'Followed by post revision info' ); ?></strong>
<# if ( 'undefined' !== typeof data.from ) { #>
{{{ data.from.attributes.author.avatar }}} {{{ data.from.attributes.author.name }}},
{{{ data.from.attributes.timeAgo }}} <?php _e( 'ago' ); ?>
{{{ data.from.attributes.timeAgo }}}
({{{ data.from.attributes.dateShort }}})
<# } #>
</div>
@ -171,7 +171,7 @@ require_once( './admin-header.php' );
<strong><?php _ex( 'To:', 'Followed by post revision info' ); ?></strong>
<# if ( 'undefined' !== typeof data.to ) { #>
{{{ data.to.attributes.author.avatar }}} {{{ data.to.attributes.author.name }}},
{{{ data.to.attributes.timeAgo }}} <?php _e( 'ago' ); ?>
{{{ data.to.attributes.timeAgo }}}
({{{ data.to.attributes.dateShort }}})
<# } #>
</div>