Make WordPress Core

Ticket #29299: 29299.2.diff

File 29299.2.diff, 6.8 KB (added by SergeyBiryukov, 8 years ago)
  • src/wp-admin/options-discussion.php

     
    7171
    7272<label for="close_comments_for_old_posts">
    7373<input name="close_comments_for_old_posts" type="checkbox" id="close_comments_for_old_posts" value="1" <?php checked('1', get_option('close_comments_for_old_posts')); ?> />
    74 <?php printf( __('Automatically close comments on articles older than %s days'), '</label><label for="close_comments_days_old"><input name="close_comments_days_old" type="number" min="0" step="1" id="close_comments_days_old" value="' . esc_attr(get_option('close_comments_days_old')) . '" class="small-text" />'); ?>
    75 </label>
     74<?php printf(
     75        /* translators: %s: number of days to close comments on old articles */
     76        _n( 'Automatically close comments on articles older than %s day',
     77            'Automatically close comments on articles older than %s days',
     78            (int) get_option( 'close_comments_days_old' )
     79        ),
     80        sprintf( '</label><label for="close_comments_days_old"><input name="close_comments_days_old" type="number" min="0" step="1" id="close_comments_days_old" value="%s" class="small-text" />',
     81                esc_attr( get_option( 'close_comments_days_old' ) )
     82        )
     83);
     84?></label>
    7685<br />
    7786<label for="thread_comments">
    7887<input name="thread_comments" type="checkbox" id="thread_comments" value="1" <?php checked('1', get_option('thread_comments')); ?> />
     
    94103}
    95104$thread_comments_depth .= '</select>';
    96105
    97 printf( __('Enable threaded (nested) comments %s levels deep'), $thread_comments_depth );
    98 
     106printf(
     107        /* translators: %s: number of comment levels */
     108        _n( 'Enable threaded (nested) comments %s level deep',
     109            'Enable threaded (nested) comments %s levels deep',
     110            (int) get_option( 'thread_comments_depth' )
     111        ),
     112        $thread_comments_depth
     113);
    99114?></label>
    100115<br />
    101116<label for="page_comments">
     
    107122if ( 'oldest' == get_option('default_comments_page') ) $default_comments_page .= ' selected="selected"';
    108123$default_comments_page .= '>' . __('first') . '</option></select>';
    109124
    110 printf( __('Break comments into pages with %1$s top level comments per page and the %2$s page displayed by default'), '</label><label for="comments_per_page"><input name="comments_per_page" type="number" step="1" min="0" id="comments_per_page" value="' . esc_attr(get_option('comments_per_page')) . '" class="small-text" />', $default_comments_page );
    111 
     125printf(
     126        /* translators: 1: number of top level comments per page, 2: 'first' or 'last' (translated) */
     127        _n( 'Break comments into pages with %1$s top level comment per page and the %2$s page displayed by default',
     128            'Break comments into pages with %1$s top level comments per page and the %2$s page displayed by default',
     129            (int) get_option( 'comments_per_page' )
     130        ),
     131        sprintf( '</label><label for="comments_per_page"><input name="comments_per_page" type="number" step="1" min="0" id="comments_per_page" value="%s" class="small-text" />',
     132                esc_attr( get_option( 'comments_per_page' ) )
     133        ),
     134        $default_comments_page
     135);
    112136?></label>
    113137<br />
    114138<label for="comment_order"><?php
     
    119143if ( 'desc' == get_option('comment_order') ) $comment_order .= ' selected="selected"';
    120144$comment_order .= '>' . __('newer') . '</option></select>';
    121145
     146/* translators: 'older' or 'newer' (translated) */
    122147printf( __('Comments should be displayed with the %s comments at the top of each page'), $comment_order );
    123148
    124149?></label>
     
    149174<tr>
    150175<th scope="row"><?php _e('Comment Moderation'); ?></th>
    151176<td><fieldset><legend class="screen-reader-text"><span><?php _e('Comment Moderation'); ?></span></legend>
    152 <p><label for="comment_max_links"><?php printf(__('Hold a comment in the queue if it contains %s or more links. (A common characteristic of comment spam is a large number of hyperlinks.)'), '<input name="comment_max_links" type="number" step="1" min="0" id="comment_max_links" value="' . esc_attr(get_option('comment_max_links')) . '" class="small-text" />' ); ?></label></p>
     177<p><label for="comment_max_links"><?php
     178printf(
     179        /* translators: %s: number of links to hold a comment in the queue */
     180        _n( 'Hold a comment in the queue if it contains %s or more links.',
     181            'Hold a comment in the queue if it contains %s or more links.',
     182            (int) get_option( 'comment_max_links' )
     183        ) . ' ',
     184        sprintf( '<input name="comment_max_links" type="number" step="1" min="0" id="comment_max_links" value="%s" class="small-text" />',
     185                esc_attr( get_option( 'comment_max_links' ) )
     186        )
     187);
    153188
     189_e( '(A common characteristic of comment spam is a large number of hyperlinks.)' );
     190?></label></p>
    154191<p><label for="moderation_keys"><?php _e('When a comment contains any of these words in its content, name, URL, email, or IP, it will be held in the <a href="edit-comments.php?comment_status=moderated">moderation queue</a>. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.'); ?></label></p>
    155192<p>
    156193<textarea name="moderation_keys" rows="10" cols="50" id="moderation_keys" class="large-text code"><?php echo esc_textarea( get_option( 'moderation_keys' ) ); ?></textarea>
  • src/wp-admin/options-reading.php

     
    9191<?php endif; ?>
    9292<tr>
    9393<th scope="row"><label for="posts_per_page"><?php _e( 'Blog pages show at most' ); ?></label></th>
    94 <td>
    95 <input name="posts_per_page" type="number" step="1" min="1" id="posts_per_page" value="<?php form_option( 'posts_per_page' ); ?>" class="small-text" /> <?php _e( 'posts' ); ?>
    96 </td>
     94<td><?php
     95        /* translators: %s: number of posts to show on archive pages */
     96        printf( _n( '%s post', '%s posts', (int) get_option( 'posts_per_page' ) ),
     97                sprintf( '<input name="posts_per_page" type="number" step="1" min="1" id="posts_per_page" value="%s" class="small-text" />',
     98                        esc_attr( get_option( 'posts_per_page' ) )
     99                )
     100        );
     101?></td>
    97102</tr>
    98103<tr>
    99104<th scope="row"><label for="posts_per_rss"><?php _e( 'Syndication feeds show the most recent' ); ?></label></th>
    100 <td><input name="posts_per_rss" type="number" step="1" min="1" id="posts_per_rss" value="<?php form_option( 'posts_per_rss' ); ?>" class="small-text" /> <?php _e( 'items' ); ?></td>
     105<td><?php
     106        /* translators: %s: number of posts to show in feeds */
     107        printf( _n( '%s item', '%s items', (int) get_option( 'posts_per_rss' ) ),
     108                sprintf( '<input name="posts_per_rss" type="number" step="1" min="1" id="posts_per_rss" value="%s" class="small-text" />',
     109                        esc_attr( get_option( 'posts_per_rss' ) )
     110                )
     111        );
     112?></td>
    101113</tr>
    102114<tr>
    103115<th scope="row"><?php _e( 'For each article in a feed, show' ); ?> </th>