Make WordPress Core

Ticket #26066: 26066.2.patch

File 26066.2.patch, 3.4 KB (added by dimadin, 11 years ago)
  • wp-admin/includes/dashboard.php

     
    197197        // Comments
    198198        $num_comm = wp_count_comments();
    199199        if ( $num_comm && $num_comm->total_comments ) {
    200                 $text = _n( 'comment', 'comments', $num_comm->total_comments );
    201                 printf(
    202                         '<li class="comment-count"><a href="edit-comments.php">%1$s %2$s</a></li>',
    203                         number_format_i18n( $num_comm->total_comments ),
    204                         $text
    205                 );
     200                $text = sprintf( _n( '%s comment', '%s comments', $num_comm->total_comments ), number_format_i18n( $num_comm->total_comments ) );
     201                ?>
     202                <li class="comment-count"><a href="edit-comments.php"><?php echo $text; ?></a></li>
     203                <?php
    206204                if ( $num_comm->moderated ) {
    207                         $text = _n( 'in moderation', 'in moderation', $num_comm->total_comments );
    208                         printf(
    209                                 '<li class="comment-mod-count"><a href="edit-comments.php?comment_status=moderated">%1$s %2$s</a></li>',
    210                                 number_format_i18n( $num_comm->moderated ),
    211                                 $text
    212                         );
     205                        /* translators: Number of comments in moderation */
     206                        $text = sprintf( _nx( '%s in moderation', '%s in moderation', $num_comm->moderated, 'comments' ), number_format_i18n( $num_comm->moderated ) );
     207                        ?>
     208                        <li class="comment-mod-count"><a href="edit-comments.php?comment_status=moderated"><?php echo $text; ?></a></li>
     209                        <?php
    213210                }
    214211        }
    215212        do_action( 'rightnow_list_end' );
     
    545542                $i = 0;
    546543                while ( $posts->have_posts() ) {
    547544                        $posts->the_post();
    548                         printf(
    549                                 '<li%s><span>%s, %s</span> <a href="%s">%s</a></li>',
    550                                 ( $i >= intval ( $args['display'] ) ? ' class="hidden"' : '' ),
     545                        /* translators: 1: relative date, 2: time, 4: post title */
     546                        $text = sprintf(
     547                                _x( '<span>%1$s, %2$s</span> <a href="%3$s">%4$s</a>', 'dashboard post list item' ),
    551548                                dashboard_relative_date( get_the_time( 'U' ) ),
    552549                                get_the_time(),
    553550                                get_edit_post_link(),
    554551                                _draft_or_post_title()
    555552                        );
     553                        printf(
     554                                '<li%1$s>%2$s</li>',
     555                                ( $i >= intval ( $args['display'] ) ? ' class="hidden"' : '' ),
     556                                $text
     557                        );
    556558                        $i++;
    557559                }
    558560
     
    643645        if ( date( 'Y-m-d', $time ) == $tomorrow )
    644646                return __( 'Tomorrow' );
    645647
    646         return date( 'M jS', $time);
     648        return date_i18n( __( 'M jS' ), $time);
    647649
    648650}
    649651
     
    898900        <div class="mu-storage">
    899901        <ul>
    900902                <li class="storage-count">
    901                         <?php printf(
    902                                 '<a href="%1$s" title="%3$s">%2$sMB %4$s</a>',
     903                        <?php $text = sprintf(
     904                                /* translators: number of megabytes */
     905                                __( '%sMB Space Allowed' ),
     906                                number_format_i18n( $quota )
     907                        );
     908                        printf(
     909                                '<a href="%1$s" title="%2$s">%3$s</a>',
    903910                                esc_url( admin_url( 'upload.php' ) ),
    904                                 number_format_i18n( $quota ),
    905911                                __( 'Manage Uploads' ),
    906                                 __( 'Space Allowed' )
     912                                $text
    907913                        ); ?>
    908914                </li><li class="storage-count <?php echo $used_class; ?>">
    909                         <?php printf(
    910                                 '<a href="%1$s" title="%4$s" class="musublink">%2$sMB (%3$s%%) %5$s</a>',
     915                        <?php $text = sprintf(
     916                                /* translators: 1: number of megabytes, 2: percentage */
     917                                __( '%1$sMB (%2$s%%) Space Used' ),
     918                                number_format_i18n( $used, 2 ),
     919                                $percentused
     920                        );
     921                        printf(
     922                                '<a href="%1$s" title="%2$s" class="musublink">%3$s</a>',
    911923                                esc_url( admin_url( 'upload.php' ) ),
    912                                 number_format_i18n( $used, 2 ),
    913                                 $percentused,
    914924                                __( 'Manage Uploads' ),
    915                                 __( 'Space Used' )
     925                                $text
    916926                        ); ?>
    917927                </li>
    918928        </ul>