WordPress.org

Make WordPress Core

Ticket #47832: 47832.diff

File 47832.diff, 3.8 KB (added by birgire, 3 months ago)
  • src/wp-admin/edit-form-advanced.php

    diff --git src/wp-admin/edit-form-advanced.php src/wp-admin/edit-form-advanced.php
    index 977448a..a45c0b3 100644
    if ( $viewable ) { 
    166166
    167167}
    168168
    169 /* translators: Publish box date format, see https://secure.php.net/date */
    170 $scheduled_date = date_i18n( __( 'M j, Y @ H:i' ), strtotime( $post->post_date ) );
     169$scheduled_date = sprintf(
     170        /* translators: Publish box datetime format. 1: date, 2: time */
     171        __( '%1$s at %2$s' ),
     172        date_i18n( _x( 'M j, Y', 'publish box date format' ), strtotime( $post->post_date ) ),
     173        date_i18n( _x( 'H:i', 'publish box time format' ), strtotime( $post->post_date ) )
     174);
    171175
    172176$messages['post']       = array(
    173177        0  => '', // Unused. Messages start at index 1.
  • src/wp-admin/includes/meta-boxes.php

    diff --git src/wp-admin/includes/meta-boxes.php src/wp-admin/includes/meta-boxes.php
    index 188d8d2..aa77169 100644
    function post_submit_meta_box( $post, $args = array() ) { 
    194194</div><!-- .misc-pub-section -->
    195195
    196196        <?php
    197         /* translators: Publish box date format, see https://secure.php.net/date */
    198         $datef = __( 'M j, Y @ H:i' );
     197        /* translators: Publish box datetime format. 1: date, 2: time */
     198        $datef = __( '%1$s at %2$s' );
     199        $datef_date = _x( 'M j, Y', 'publish box date format' );
     200        $datef_time = _x( 'H:i', 'publish box time format' );
    199201        if ( 0 != $post->ID ) {
    200202                if ( 'future' == $post->post_status ) { // scheduled for publishing at a future date
    201203                        /* translators: Post date information. %s: Date on which the post is currently scheduled to be published */
    function post_submit_meta_box( $post, $args = array() ) { 
    212214                        /* translators: Post date information. %s: Date on which the post is to be published */
    213215                        $stamp = __( 'Publish on: <b>%s</b>' );
    214216                }
    215                 $date = date_i18n( $datef, strtotime( $post->post_date ) );
     217                $date = sprintf(
     218                        $datef,
     219                        date_i18n( $datef_date, strtotime( $post->post_date ) ),
     220                        date_i18n( $datef_time, strtotime( $post->post_date ) )
     221                );
    216222        } else { // draft (no saves, and thus no date specified)
    217223                $stamp = __( 'Publish <b>immediately</b>' );
    218                 $date  = date_i18n( $datef, strtotime( current_time( 'mysql' ) ) );
     224                $date = sprintf(
     225                        $datef,
     226                        date_i18n( $datef_date, strtotime( current_time( 'mysql' ) ) ),
     227                        date_i18n( $datef_time, strtotime( current_time( 'mysql' ) ) )
     228                );
    219229        }
    220230
    221231        if ( ! empty( $args['args']['revisions_count'] ) ) :
  • src/wp-admin/includes/template.php

    diff --git src/wp-admin/includes/template.php src/wp-admin/includes/template.php
    index be6d028..e62e5b5 100644
    function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { 
    812812
    813813        echo '<div class="timestamp-wrap">';
    814814        /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
    815         printf( __( '%1$s %2$s, %3$s @ %4$s:%5$s' ), $month, $day, $year, $hour, $minute );
     815        printf( __( '%1$s %2$s, %3$s at %4$s:%5$s' ), $month, $day, $year, $hour, $minute );
    816816
    817817        echo '</div><input type="hidden" id="ss" name="ss" value="' . $ss . '" />';
    818818
  • src/wp-includes/script-loader.php

    diff --git src/wp-includes/script-loader.php src/wp-includes/script-loader.php
    index c06680c..9b6ab4f 100644
    function wp_default_scripts( &$scripts ) { 
    15791579                                'publishOnFuture'    => __( 'Schedule for:' ),
    15801580                                'publishOnPast'      => __( 'Published on:' ),
    15811581                                /* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
    1582                                 'dateFormat'         => __( '%1$s %2$s, %3$s @ %4$s:%5$s' ),
     1582                                'dateFormat'         => __( '%1$s %2$s, %3$s at %4$s:%5$s' ),
    15831583                                'showcomm'           => __( 'Show more comments' ),
    15841584                                'endcomm'            => __( 'No more comments found.' ),
    15851585                                'publish'            => __( 'Publish' ),