Publish box: fix strange date format after change
Part props tyxla. Fixes #30716. git-svn-id: https://develop.svn.wordpress.org/trunk@33340 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
810ace4a5e
commit
bcb2d6d0db
|
@ -784,9 +784,10 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
|
||||||
$month = '<label><span class="screen-reader-text">' . __( 'Month' ) . '</span><select ' . ( $multi ? '' : 'id="mm" ' ) . 'name="mm"' . $tab_index_attribute . ">\n";
|
$month = '<label><span class="screen-reader-text">' . __( 'Month' ) . '</span><select ' . ( $multi ? '' : 'id="mm" ' ) . 'name="mm"' . $tab_index_attribute . ">\n";
|
||||||
for ( $i = 1; $i < 13; $i = $i +1 ) {
|
for ( $i = 1; $i < 13; $i = $i +1 ) {
|
||||||
$monthnum = zeroise($i, 2);
|
$monthnum = zeroise($i, 2);
|
||||||
$month .= "\t\t\t" . '<option value="' . $monthnum . '" ' . selected( $monthnum, $mm, false ) . '>';
|
$monthtext = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );
|
||||||
|
$month .= "\t\t\t" . '<option value="' . $monthnum . '" data-text="' . $monthtext . '" ' . selected( $monthnum, $mm, false ) . '>';
|
||||||
/* translators: 1: month number (01, 02, etc.), 2: month abbreviation */
|
/* translators: 1: month number (01, 02, etc.), 2: month abbreviation */
|
||||||
$month .= sprintf( __( '%1$s-%2$s' ), $monthnum, $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) ) ) . "</option>\n";
|
$month .= sprintf( __( '%1$s-%2$s' ), $monthnum, $monthtext ) . "</option>\n";
|
||||||
}
|
}
|
||||||
$month .= '</select></label>';
|
$month .= '</select></label>';
|
||||||
|
|
||||||
|
@ -797,7 +798,7 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) {
|
||||||
|
|
||||||
echo '<div class="timestamp-wrap">';
|
echo '<div class="timestamp-wrap">';
|
||||||
/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
|
/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
|
||||||
printf( __( '%1$s %2$s, %3$s @ %4$s : %5$s' ), $month, $day, $year, $hour, $minute );
|
printf( __( '%1$s %2$s, %3$s @ %4$s:%5$s' ), $month, $day, $year, $hour, $minute );
|
||||||
|
|
||||||
echo '</div><input type="hidden" id="ss" name="ss" value="' . $ss . '" />';
|
echo '</div><input type="hidden" id="ss" name="ss" value="' . $ss . '" />';
|
||||||
|
|
||||||
|
|
|
@ -558,8 +558,9 @@ jQuery(document).ready( function($) {
|
||||||
$('#timestamp').html(stamp);
|
$('#timestamp').html(stamp);
|
||||||
} else {
|
} else {
|
||||||
$('#timestamp').html(
|
$('#timestamp').html(
|
||||||
publishOn + ' <b>' +
|
'\n' + publishOn + ' <b>' +
|
||||||
postL10n.dateFormat.replace( '%1$s', $('option[value="' + $('#mm').val() + '"]', '#mm').text() )
|
postL10n.dateFormat
|
||||||
|
.replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) )
|
||||||
.replace( '%2$s', jj )
|
.replace( '%2$s', jj )
|
||||||
.replace( '%3$s', aa )
|
.replace( '%3$s', aa )
|
||||||
.replace( '%4$s', hh )
|
.replace( '%4$s', hh )
|
||||||
|
|
|
@ -487,7 +487,7 @@ function wp_default_scripts( &$scripts ) {
|
||||||
'publishOnFuture' => __('Schedule for:'),
|
'publishOnFuture' => __('Schedule for:'),
|
||||||
'publishOnPast' => __('Published on:'),
|
'publishOnPast' => __('Published on:'),
|
||||||
/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
|
/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
|
||||||
'dateFormat' => __('%1$s %2$s, %3$s @ %4$s : %5$s'),
|
'dateFormat' => __('%1$s %2$s, %3$s @ %4$s:%5$s'),
|
||||||
'showcomm' => __('Show more comments'),
|
'showcomm' => __('Show more comments'),
|
||||||
'endcomm' => __('No more comments found.'),
|
'endcomm' => __('No more comments found.'),
|
||||||
'publish' => __('Publish'),
|
'publish' => __('Publish'),
|
||||||
|
|
Loading…
Reference in New Issue