Make WordPress Core

Ticket #35056: 35056.patch

File 35056.patch, 12.6 KB (added by SergeyBiryukov, 9 years ago)
  • src/wp-admin/includes/ajax-actions.php

     
    17651765                switch ( $post->post_status ) {
    17661766                        case 'publish' :
    17671767                        case 'private' :
    1768                                 $stat = __('Published');
     1768                                $stat = _x( 'Published', 'post status' );
    17691769                                break;
    17701770                        case 'future' :
    1771                                 $stat = __('Scheduled');
     1771                                $stat = _x( 'Scheduled', 'post status' );
    17721772                                break;
    17731773                        case 'pending' :
    1774                                 $stat = __('Pending Review');
     1774                                $stat = _x( 'Pending Review', 'post status' );
    17751775                                break;
    17761776                        case 'draft' :
    1777                                 $stat = __('Draft');
     1777                                $stat = _x( 'Draft', 'post status' );
    17781778                                break;
    17791779                }
    17801780
  • src/wp-admin/includes/class-wp-posts-list-table.php

     
    942942                }
    943943
    944944                if ( 'publish' === $post->post_status ) {
    945                         _e( 'Published' );
     945                        _ex( 'Published', 'post status' );
    946946                } elseif ( 'future' === $post->post_status ) {
    947947                        if ( $time_diff > 0 ) {
    948948                                echo '<strong class="error-message">' . __( 'Missed schedule' ) . '</strong>';
    949949                        } else {
    950                                 _e( 'Scheduled' );
     950                                _ex( 'Scheduled', 'post status' );
    951951                        }
    952952                } else {
    953953                        _e( 'Last Modified' );
     
    13701370                                </em>
    13711371                                <label class="alignleft inline-edit-private">
    13721372                                        <input type="checkbox" name="keep_private" value="private" />
    1373                                         <span class="checkbox-title"><?php _e( 'Private' ); ?></span>
     1373                                        <span class="checkbox-title"><?php _ex( 'Private', 'post status' ); ?></span>
    13741374                                </label>
    13751375                        </div>
    13761376
     
    15371537                                                <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
    15381538        <?php endif; // $bulk ?>
    15391539                                        <?php if ( $can_publish ) : // Contributors only get "Unpublished" and "Pending Review" ?>
    1540                                                 <option value="publish"><?php _e( 'Published' ); ?></option>
    1541                                                 <option value="future"><?php _e( 'Scheduled' ); ?></option>
     1540                                                <option value="publish"><?php _ex( 'Published', 'post status' ); ?></option>
     1541                                                <option value="future"><?php _ex( 'Scheduled', 'post status' ); ?></option>
    15421542        <?php if ( $bulk ) : ?>
    1543                                                 <option value="private"><?php _e( 'Private' ) ?></option>
     1543                                                <option value="private"><?php _ex( 'Private', 'post status' ) ?></option>
    15441544        <?php endif; // $bulk ?>
    15451545                                        <?php endif; ?>
    1546                                                 <option value="pending"><?php _e( 'Pending Review' ); ?></option>
    1547                                                 <option value="draft"><?php _e( 'Draft' ); ?></option>
     1546                                                <option value="pending"><?php _ex( 'Pending Review', 'post status' ); ?></option>
     1547                                                <option value="draft"><?php _ex( 'Draft', 'post status' ); ?></option>
    15481548                                        </select>
    15491549                                </label>
    15501550
     
    15531553        <?php   if ( $bulk ) : ?>
    15541554
    15551555                                <label class="alignright">
    1556                                         <span class="title"><?php _e( 'Sticky' ); ?></span>
     1556                                        <span class="title"><?php _ex( 'Sticky', 'post visibility' ); ?></span>
    15571557                                        <select name="sticky">
    15581558                                                <option value="-1"><?php _e( '&mdash; No Change &mdash;' ); ?></option>
    15591559                                                <option value="sticky"><?php _e( 'Sticky' ); ?></option>
    1560                                                 <option value="unsticky"><?php _e( 'Not Sticky' ); ?></option>
     1560                                                <option value="unsticky"><?php _ex( 'Not Sticky', 'post visibility' ); ?></option>
    15611561                                        </select>
    15621562                                </label>
    15631563
  • src/wp-admin/includes/meta-boxes.php

     
    7979<?php
    8080switch ( $post->post_status ) {
    8181        case 'private':
    82                 _e('Privately Published');
     82                _ex( 'Privately Published', 'post status' );
    8383                break;
    8484        case 'publish':
    85                 _e('Published');
     85                _ex( 'Published', 'post status' );
    8686                break;
    8787        case 'future':
    88                 _e('Scheduled');
     88                _ex( 'Scheduled', 'post status' );
    8989                break;
    9090        case 'pending':
    91                 _e('Pending Review');
     91                _ex( 'Pending Review', 'post status' );
    9292                break;
    9393        case 'draft':
    9494        case 'auto-draft':
    95                 _e('Draft');
     95                _ex( 'Draft', 'post status' );
    9696                break;
    9797}
    9898?>
     
    104104<input type="hidden" name="hidden_post_status" id="hidden_post_status" value="<?php echo esc_attr( ('auto-draft' == $post->post_status ) ? 'draft' : $post->post_status); ?>" />
    105105<select name='post_status' id='post_status'>
    106106<?php if ( 'publish' == $post->post_status ) : ?>
    107 <option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _e('Published') ?></option>
     107<option<?php selected( $post->post_status, 'publish' ); ?> value='publish'><?php _ex( 'Published', 'post status' ); ?></option>
    108108<?php elseif ( 'private' == $post->post_status ) : ?>
    109 <option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _e('Privately Published') ?></option>
     109<option<?php selected( $post->post_status, 'private' ); ?> value='publish'><?php _ex( 'Privately Published', 'post status' ); ?></option>
    110110<?php elseif ( 'future' == $post->post_status ) : ?>
    111 <option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _e('Scheduled') ?></option>
     111<option<?php selected( $post->post_status, 'future' ); ?> value='future'><?php _ex( 'Scheduled', 'post status' ); ?></option>
    112112<?php endif; ?>
    113 <option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _e('Pending Review') ?></option>
     113<option<?php selected( $post->post_status, 'pending' ); ?> value='pending'><?php _ex( 'Pending Review', 'post status' ); ?></option>
    114114<?php if ( 'auto-draft' == $post->post_status ) : ?>
    115 <option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _e('Draft') ?></option>
     115<option<?php selected( $post->post_status, 'auto-draft' ); ?> value='draft'><?php _ex( 'Draft', 'post status' ); ?></option>
    116116<?php else : ?>
    117 <option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _e('Draft') ?></option>
     117<option<?php selected( $post->post_status, 'draft' ); ?> value='draft'><?php _ex( 'Draft', 'post status' ); ?></option>
    118118<?php endif; ?>
    119119</select>
    120120 <a href="#post_status" class="save-post-status hide-if-no-js button"><?php _e('OK'); ?></a>
     
    130130if ( 'private' == $post->post_status ) {
    131131        $post->post_password = '';
    132132        $visibility = 'private';
    133         $visibility_trans = __('Private');
     133        $visibility_trans = _x( 'Private', 'post status' );
    134134} elseif ( !empty( $post->post_password ) ) {
    135135        $visibility = 'password';
    136         $visibility_trans = __('Password protected');
     136        $visibility_trans = _x( 'Password protected', 'post visibility' );
    137137} elseif ( $post_type == 'post' && is_sticky( $post->ID ) ) {
    138138        $visibility = 'public';
    139         $visibility_trans = __('Public, Sticky');
     139        $visibility_trans = _x( 'Public, Sticky', 'post visibility' );
    140140} else {
    141141        $visibility = 'public';
    142         $visibility_trans = __('Public');
     142        $visibility_trans = _x( 'Public', 'post visibility' );
    143143}
    144144
    145145echo esc_html( $visibility_trans ); ?></span>
     
    152152<input type="checkbox" style="display:none" name="hidden_post_sticky" id="hidden-post-sticky" value="sticky" <?php checked(is_sticky($post->ID)); ?> />
    153153<?php endif; ?>
    154154<input type="hidden" name="hidden_post_visibility" id="hidden-post-visibility" value="<?php echo esc_attr( $visibility ); ?>" />
    155 <input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _e('Public'); ?></label><br />
     155<input type="radio" name="visibility" id="visibility-radio-public" value="public" <?php checked( $visibility, 'public' ); ?> /> <label for="visibility-radio-public" class="selectit"><?php _ex( 'Public', 'post visibility' ); ?></label><br />
    156156<?php if ( $post_type == 'post' && current_user_can( 'edit_others_posts' ) ) : ?>
    157157<span id="sticky-span"><input id="sticky" name="sticky" type="checkbox" value="sticky" <?php checked( is_sticky( $post->ID ) ); ?> /> <label for="sticky" class="selectit"><?php _e( 'Stick this post to the front page' ); ?></label><br /></span>
    158158<?php endif; ?>
    159 <input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _e('Password protected'); ?></label><br />
     159<input type="radio" name="visibility" id="visibility-radio-password" value="password" <?php checked( $visibility, 'password' ); ?> /> <label for="visibility-radio-password" class="selectit"><?php _ex( 'Password protected', 'post visibility' ); ?></label><br />
    160160<span id="password-span"><label for="post_password"><?php _e('Password:'); ?></label> <input type="text" name="post_password" id="post_password" value="<?php echo esc_attr($post->post_password); ?>"  maxlength="20" /><br /></span>
    161 <input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _e('Private'); ?></label><br />
     161<input type="radio" name="visibility" id="visibility-radio-private" value="private" <?php checked( $visibility, 'private' ); ?> /> <label for="visibility-radio-private" class="selectit"><?php _ex( 'Private', 'post status' ); ?></label><br />
    162162
    163163<p>
    164164 <a href="#visibility" class="save-post-visibility hide-if-no-js button"><?php _e('OK'); ?></a>
  • src/wp-admin/includes/template.php

     
    16771677                $post_status = '';
    16781678
    16791679        if ( !empty($post->post_password) )
    1680                 $post_states['protected'] = __('Password protected');
     1680                $post_states['protected'] = _x( 'Password protected', 'post visibility' );
    16811681        if ( 'private' == $post->post_status && 'private' != $post_status )
    1682                 $post_states['private'] = __('Private');
     1682                $post_states['private'] = _x( 'Private', 'post status' );
    16831683        if ( 'draft' == $post->post_status && 'draft' != $post_status )
    1684                 $post_states['draft'] = __('Draft');
     1684                $post_states['draft'] = _x( 'Draft', 'post status' );
    16851685        if ( 'pending' == $post->post_status && 'pending' != $post_status )
    1686                 $post_states['pending'] = _x('Pending', 'post status');
     1686                $post_states['pending'] = _x( 'Pending', 'post status' );
    16871687        if ( is_sticky($post->ID) )
    1688                 $post_states['sticky'] = __('Sticky');
     1688                $post_states['sticky'] = _x( 'Sticky', 'post visibility' );
    16891689
    16901690        if ( 'future' === $post->post_status ) {
    1691                 $post_states['scheduled'] = __( 'Scheduled' );
     1691                $post_states['scheduled'] = _x( 'Scheduled', 'post status' );
    16921692        }
    16931693
    16941694        if ( 'page' === get_option( 'show_on_front' ) ) {
  • src/wp-includes/post.php

     
    595595 */
    596596function get_post_statuses() {
    597597        $status = array(
    598                 'draft'   => __( 'Draft' ),
    599                 'pending' => __( 'Pending Review' ),
    600                 'private' => __( 'Private' ),
    601                 'publish' => __( 'Published' )
     598                'draft'   => _x( 'Draft', 'post status' ),
     599                'pending' => _x( 'Pending Review', 'post status' ),
     600                'private' => _x( 'Private', 'post status' ),
     601                'publish' => _x( 'Published', 'post status' )
    602602        );
    603603
    604604        return $status;
     
    616616 */
    617617function get_page_statuses() {
    618618        $status = array(
    619                 'draft'   => __( 'Draft' ),
    620                 'private' => __( 'Private' ),
    621                 'publish' => __( 'Published' )
     619                'draft'   => _x( 'Draft', 'post status' ),
     620                'private' => _x( 'Private', 'post status' ),
     621                'publish' => _x( 'Published', 'post status' )
    622622        );
    623623
    624624        return $status;
  • src/wp-includes/script-loader.php

     
    517517                        'update' => __('Update'),
    518518                        'savePending' => __('Save as Pending'),
    519519                        'saveDraft' => __('Save Draft'),
    520                         'private' => __('Private'),
    521                         'public' => __('Public'),
    522                         'publicSticky' => __('Public, Sticky'),
    523                         'password' => __('Password Protected'),
    524                         'privatelyPublished' => __('Privately Published'),
    525                         'published' => __('Published'),
     520                        'private' => _x('Private', 'post status'),
     521                        'public' => _x('Public', 'post visibility'),
     522                        'publicSticky' => _x('Public, Sticky', 'post visibility'),
     523                        'password' => _x('Password Protected', 'post visibility'),
     524                        'privatelyPublished' => _x('Privately Published', 'post status'),
     525                        'published' => _x('Published', 'post status'),
    526526                        'saveAlert' => __('The changes you made will be lost if you navigate away from this page.'),
    527527                        'savingText' => __('Saving Draft&#8230;'),
    528528                        'permalinkSaved' => __( 'Permalink saved' ),