Ticket #35111: 35111.patch
File 35111.patch, 4.2 KB (added by , 9 years ago) |
---|
-
src/wp-admin/css/common.css
2545 2545 margin: 0 0 10px; 2546 2546 } 2547 2547 2548 #plugin-information .fyi-description { 2549 margin-top: 0; 2550 } 2551 2548 2552 #plugin-information .counter-container { 2549 2553 margin: 3px 0; 2550 2554 } -
src/wp-admin/includes/plugin-install.php
537 537 538 538 echo "</div>\n"; 539 539 540 $date_format = __( 'M j, Y @ H:i' );541 542 540 if ( ! empty( $api->last_updated ) ) { 543 541 $last_updated_timestamp = strtotime( $api->last_updated ); 542 543 /* translators: 1: plugin last update date, 2: plugin last update time */ 544 $last_updated = sprintf( __( '%1$s at %2$s' ), 545 /* translators: plugin last update date format. See http://php.net/date */ 546 date_i18n( __( 'M j, Y' ), $last_updated_timestamp ), 547 /* translators: plugin last update time format. See http://php.net/date */ 548 date_i18n( __( 'H:i' ), $last_updated_timestamp ) 549 ); 550 } else { 551 $last_updated = ''; 544 552 } 545 553 546 554 ?> … … 552 560 <?php } if ( ! empty( $api->author ) ) { ?> 553 561 <li><strong><?php _e( 'Author:' ); ?></strong> <?php echo links_add_target( $api->author, '_blank' ); ?></li> 554 562 <?php } if ( ! empty( $api->last_updated ) ) { ?> 555 <li><strong><?php _e( 'Last Updated:' ); ?></strong> <span title="<?php echo esc_attr( date_i18n( $date_format, $last_updated_timestamp ) ); ?>"> 556 <?php printf( __( '%s ago' ), human_time_diff( $last_updated_timestamp ) ); ?> 557 </span></li> 563 <li><strong><?php _e( 'Last Updated:' ); ?></strong> <span><?php echo $last_updated; ?></span></li> 558 564 <?php } if ( ! empty( $api->requires ) ) { ?> 559 565 <li><strong><?php _e( 'Requires WordPress Version:' ); ?></strong> <?php printf( __( '%s or higher' ), $api->requires ); ?></li> 560 566 <?php } if ( ! empty( $api->tested ) ) { ?> … … 578 584 <?php if ( ! empty( $api->rating ) ) { ?> 579 585 <h3><?php _e( 'Average Rating' ); ?></h3> 580 586 <?php wp_star_rating( array( 'rating' => $api->rating, 'type' => 'percent', 'number' => $api->num_ratings ) ); ?> 581 <small aria-hidden="true"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></small> 587 <p aria-hidden="true" class="fyi-description"><?php printf( _n( '(based on %s rating)', '(based on %s ratings)', $api->num_ratings ), number_format_i18n( $api->num_ratings ) ); ?></p> 588 589 <h3><?php _e( 'Reviews' ); ?></h3> 590 <p class="fyi-description"><?php _e( 'Read all reviews on WordPress.org or write your own!' ); ?></p> 582 591 <?php } 583 592 584 593 if ( ! empty( $api->ratings ) && array_sum( (array) $api->ratings ) > 0 ) { … … 585 594 foreach ( $api->ratings as $key => $ratecount ) { 586 595 // Avoid div-by-zero. 587 596 $_rating = $api->num_ratings ? ( $ratecount / $api->num_ratings ) : 0; 597 /* translators: 1: number of stars, 2: number of reviews */ 598 $aria_label = esc_attr( sprintf( _n( 'Reviews with %1$d star: %2$d. Opens in a new window.', 'Reviews with %1$d stars: %2$d. Opens in a new window.', $key ), 599 $key, 600 number_format_i18n( $ratecount ) 601 ) ); 588 602 ?> 589 603 <div class="counter-container"> 590 604 <span class="counter-label"><a href="https://wordpress.org/support/view/plugin-reviews/<?php echo $api->slug; ?>?filter=<?php echo $key; ?>" 591 target="_blank" 592 title="<?php echo esc_attr( sprintf( _n( 'Click to see reviews that provided a rating of %d star', 'Click to see reviews that provided a rating of %d stars', $key ), $key ) ); ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span> 605 target="_blank" aria-label="<?php echo $aria_label; ?>"><?php printf( _n( '%d star', '%d stars', $key ), $key ); ?></a></span> 593 606 <span class="counter-back"> 594 607 <span class="counter-bar" style="width: <?php echo 92 * $_rating; ?>px;"></span> 595 608 </span> 596 <span class="counter-count" ><?php echo number_format_i18n( $ratecount ); ?></span>609 <span class="counter-count" aria-hidden="true"><?php echo number_format_i18n( $ratecount ); ?></span> 597 610 </div> 598 611 <?php 599 612 }