From bcb2d6d0db0570b5eb623ce8c6512900eccf8ed5 Mon Sep 17 00:00:00 2001 From: Ella Iseulde Van Dorpe Date: Tue, 21 Jul 2015 11:39:20 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/template.php | 7 ++++--- src/wp-admin/js/post.js | 5 +++-- src/wp-includes/script-loader.php | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php index 302e9b48dc..88c7155e95 100644 --- a/src/wp-admin/includes/template.php +++ b/src/wp-admin/includes/template.php @@ -784,9 +784,10 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { $month = ''; @@ -797,7 +798,7 @@ function touch_time( $edit = 1, $for_post = 1, $tab_index = 0, $multi = 0 ) { echo '
'; /* 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 '
'; diff --git a/src/wp-admin/js/post.js b/src/wp-admin/js/post.js index c2a14a647d..a02be9fb08 100644 --- a/src/wp-admin/js/post.js +++ b/src/wp-admin/js/post.js @@ -558,8 +558,9 @@ jQuery(document).ready( function($) { $('#timestamp').html(stamp); } else { $('#timestamp').html( - publishOn + ' ' + - postL10n.dateFormat.replace( '%1$s', $('option[value="' + $('#mm').val() + '"]', '#mm').text() ) + '\n' + publishOn + ' ' + + postL10n.dateFormat + .replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) ) .replace( '%2$s', jj ) .replace( '%3$s', aa ) .replace( '%4$s', hh ) diff --git a/src/wp-includes/script-loader.php b/src/wp-includes/script-loader.php index 9f42b8a254..8897e4af96 100644 --- a/src/wp-includes/script-loader.php +++ b/src/wp-includes/script-loader.php @@ -487,7 +487,7 @@ function wp_default_scripts( &$scripts ) { 'publishOnFuture' => __('Schedule for:'), 'publishOnPast' => __('Published on:'), /* 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'), 'endcomm' => __('No more comments found.'), 'publish' => __('Publish'),